Skip to content

Commit

Permalink
уборка
Browse files Browse the repository at this point in the history
  • Loading branch information
modern-nm committed May 19, 2024
1 parent f50b36a commit c24038b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 55 deletions.
30 changes: 1 addition & 29 deletions Content.Server/ADT/Changeling/EntitySystems/ChangelingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,6 @@ private void OnMapInit(EntityUid uid, ChangelingComponent component, MapInitEven
_action.AddAction(uid, ref component.ChangelingAbsorbActionEntity, component.ChangelingAbsorbAction);
_action.AddAction(uid, ref component.ChangelingDNAStingActionEntity, component.ChangelingDNAStingAction);
_action.AddAction(uid, ref component.ChangelingDNACycleActionEntity, component.ChangelingDNACycleAction);
_action.AddAction(uid, ref component.ChangelingTransformActionEntity, component.ChangelingTransformAction);
_action.AddAction(uid, ref component.ChangelingStasisDeathActionEntity, component.ChangelingStasisDeathAction);

EnsureComp<CollectiveMindComponent>(uid);
var collectiveMind = EnsureComp<CollectiveMindComponent>(uid);
Expand All @@ -196,7 +194,6 @@ private void OnShutdown(EntityUid uid, ChangelingComponent component, ComponentS
_action.RemoveAction(uid, component.ChangelingAbsorbActionEntity);
_action.RemoveAction(uid, component.ChangelingDNAStingActionEntity);
_action.RemoveAction(uid, component.ChangelingDNACycleActionEntity);
_action.RemoveAction(uid, component.ChangelingTransformActionEntity);
_action.RemoveAction(uid, component.ChangelingStasisDeathActionEntity);

RemComp<CollectiveMindComponent>(uid);
Expand Down Expand Up @@ -309,23 +306,6 @@ public void OnCycleDNA(EntityUid uid, ChangelingComponent component, ChangelingC
if (args.Handled)
return;

// args.Handled = true;

// component.SelectedDNA += 1;

// if (component.StoredDNA.Count >= component.DNAStrandCap || component.SelectedDNA >= component.StoredDNA.Count)
// component.SelectedDNA = 0;

// var selectedHumanoidData = component.StoredDNA[component.SelectedDNA];
// if (selectedHumanoidData.MetaDataComponent == null)
// {
// var selfFailMessage = Loc.GetString("changeling-nodna-saved");
// _popup.PopupEntity(selfFailMessage, uid, uid);
// return;
// }

// var selfMessage = Loc.GetString("changeling-dna-switchdna", ("target", selectedHumanoidData.MetaDataComponent.EntityName));
// _popup.PopupEntity(selfMessage, uid, uid);

if (EntityManager.TryGetComponent<ActorComponent?>(uid, out var actorComponent))
{
Expand All @@ -338,16 +318,9 @@ public void OnCycleDNA(EntityUid uid, ChangelingComponent component, ChangelingC
continue;
if (item.EntityUid == null)
continue;
//ev.HumanoidData.Add(netEntity.Value);
HumanoidCharacterAppearance hca = new();
if (item.HumanoidAppearanceComponent == null)
continue;
// if (item.HumanoidAppearanceComponent.CustomBaseLayers.TryGetValue(HumanoidVisualLayers.FacialHair, out var facialHair))
// if (facialHair.Id != null)
// hca = hca.WithFacialHairStyleName(facialHair.Id.Value.Id);

// if (item.HumanoidAppearanceComponent.BaseLayers.TryGetValue(HumanoidVisualLayers.FacialHair, out var facialHair))
// hca = hca.WithFacialHairStyleName(facialHair.ID);

if (item.HumanoidAppearanceComponent.MarkingSet.Markings.TryGetValue(Shared.Humanoid.Markings.MarkingCategories.FacialHair, out var facialHair))
if (facialHair.TryGetValue(0, out var marking))
Expand All @@ -373,7 +346,7 @@ public void OnCycleDNA(EntityUid uid, ChangelingComponent component, ChangelingC
});
}

//ev.HumanoidData.Sort(); реализовать сортировку
// реализовать сортировку
RaiseNetworkEvent(ev, actorComponent.PlayerSession);
}
args.Handled = true;
Expand All @@ -388,7 +361,6 @@ public void TransformChangeling(EntityUid uid, ChangelingComponent component, Se
if (item.EntityUid == selectedEntity)
{
// transform
//var selectedHumanoidData = component.StoredDNA[component.SelectedDNA];
var selectedHumanoidData = component.StoredDNA[i];
if (ev.Handled)
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,6 @@ public sealed partial class ChangelingComponent : Component
[DataField, AutoNetworkedField]
public EntityUid? ChangelingDNACycleActionEntity;

[DataField]
public EntProtoId ChangelingTransformAction = "ActionChangelingTransform";

[DataField, AutoNetworkedField]
public EntityUid? ChangelingTransformActionEntity;

[DataField]
public EntProtoId ChangelingRefreshAction = "ActionLingRefresh";

Expand Down
9 changes: 3 additions & 6 deletions Content.Shared/ADT/Changeling/SharedChangeling.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,12 @@ public sealed partial class LingResonantShriekEvent : InstantActionEvent
{
}

/// <summary>
/// This event carries humanoid information list of entities, which DNA were stolen. Used for radial UI of "The genestealer".
/// </summary>
[Serializable, NetSerializable]
public sealed partial class RequestChangelingFormsMenuEvent : EntityEventArgs
{
//public List<NetEntity> HumanoidData = new();
public List<HDATA> HumanoidData = new();

public NetEntity Target;
Expand Down Expand Up @@ -170,8 +172,3 @@ public SelectChangelingFormEvent(NetEntity target, NetEntity entitySelected)
EntitySelected = entitySelected;
}
}
// public sealed partial class OpenEmotesActionEvent : InstantActionEvent
// {
// }
////////////ChangelingCycleDNAActionEvent/////////////////
///
28 changes: 14 additions & 14 deletions Resources/Prototypes/ADT/changeling/changeling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,20 @@
useDelay: 1
priority: -69

- type: entity
id: ActionChangelingTransform
name: action-transform
description: action-transform-desc
noSpawn: true
components:
- type: InstantAction
icon:
sprite: Interface/Actions/actions_ling.rsi
state: transform
itemIconStyle: BigAction
event: !type:ChangelingTransformActionEvent
useDelay: 5
priority: -68
# - type: entity ### это действие удалено всвязи с заменой UI выбора формы и трансформации генокрада.
# id: ActionChangelingTransform
# name: action-transform
# description: action-transform-desc
# noSpawn: true
# components:
# - type: InstantAction
# icon:
# sprite: Interface/Actions/actions_ling.rsi
# state: transform
# itemIconStyle: BigAction
# event: !type:ChangelingTransformActionEvent
# useDelay: 5
# priority: -68

- type: entity
id: ActionLingRegenerate
Expand Down

0 comments on commit c24038b

Please sign in to comment.