diff --git a/Content.Client/Changeling/Transform/ChangelingTransformBoundUserInterface.cs b/Content.Client/Changeling/Transform/ChangelingTransformBoundUserInterface.cs index 8e383bc967..9401231303 100644 --- a/Content.Client/Changeling/Transform/ChangelingTransformBoundUserInterface.cs +++ b/Content.Client/Changeling/Transform/ChangelingTransformBoundUserInterface.cs @@ -1,4 +1,4 @@ -using Content.Shared.Changeling.Transform; +using Content.Shared.Changeling.Systems; using JetBrains.Annotations; using Robust.Client.UserInterface; diff --git a/Content.Client/Changeling/Transform/ChangelingTransformMenu.xaml.cs b/Content.Client/Changeling/Transform/ChangelingTransformMenu.xaml.cs index beef9ae427..fa2deaf431 100644 --- a/Content.Client/Changeling/Transform/ChangelingTransformMenu.xaml.cs +++ b/Content.Client/Changeling/Transform/ChangelingTransformMenu.xaml.cs @@ -1,6 +1,6 @@ using System.Numerics; using Content.Client.UserInterface.Controls; -using Content.Shared.Changeling.Transform; +using Content.Shared.Changeling.Systems; using Robust.Client.AutoGenerated; using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.XAML; diff --git a/Content.Shared/Changeling/Devour/ChangelingDevourSystem.Events.cs b/Content.Shared/Changeling/ChangelingDevourEvents.cs similarity index 94% rename from Content.Shared/Changeling/Devour/ChangelingDevourSystem.Events.cs rename to Content.Shared/Changeling/ChangelingDevourEvents.cs index d063737e5c..ba8d25f30c 100644 --- a/Content.Shared/Changeling/Devour/ChangelingDevourSystem.Events.cs +++ b/Content.Shared/Changeling/ChangelingDevourEvents.cs @@ -2,7 +2,7 @@ using Content.Shared.DoAfter; using Robust.Shared.Serialization; -namespace Content.Shared.Changeling.Devour; +namespace Content.Shared.Changeling; /// /// Action event for Devour, someone has initiated a devour on someone, begin to windup. diff --git a/Content.Shared/Changeling/Transform/ChangelingTransformSystem.Events.cs b/Content.Shared/Changeling/ChangelingTransformEvents.cs similarity index 91% rename from Content.Shared/Changeling/Transform/ChangelingTransformSystem.Events.cs rename to Content.Shared/Changeling/ChangelingTransformEvents.cs index cfe2a56933..9940a60705 100644 --- a/Content.Shared/Changeling/Transform/ChangelingTransformSystem.Events.cs +++ b/Content.Shared/Changeling/ChangelingTransformEvents.cs @@ -2,7 +2,7 @@ using Content.Shared.DoAfter; using Robust.Shared.Serialization; -namespace Content.Shared.Changeling.Transform; +namespace Content.Shared.Changeling; /// /// Action event for opening the changeling transformation radial menu. diff --git a/Content.Shared/Changeling/Devour/ChangelingDevourComponent.cs b/Content.Shared/Changeling/Components/ChangelingDevourComponent.cs similarity index 98% rename from Content.Shared/Changeling/Devour/ChangelingDevourComponent.cs rename to Content.Shared/Changeling/Components/ChangelingDevourComponent.cs index 7798c6fec9..a874afe9ce 100644 --- a/Content.Shared/Changeling/Devour/ChangelingDevourComponent.cs +++ b/Content.Shared/Changeling/Components/ChangelingDevourComponent.cs @@ -1,3 +1,4 @@ +using Content.Shared.Changeling.Systems; using Content.Shared.Damage; using Content.Shared.Damage.Prototypes; using Content.Shared.FixedPoint; @@ -7,7 +8,7 @@ using Robust.Shared.GameStates; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; -namespace Content.Shared.Changeling.Devour; +namespace Content.Shared.Changeling.Components; /// /// Component responsible for Changelings Devour attack. Including the amount of damage diff --git a/Content.Shared/Changeling/ChangelingIdentityComponent.cs b/Content.Shared/Changeling/Components/ChangelingIdentityComponent.cs similarity index 95% rename from Content.Shared/Changeling/ChangelingIdentityComponent.cs rename to Content.Shared/Changeling/Components/ChangelingIdentityComponent.cs index 461315f4ce..2779164e4e 100644 --- a/Content.Shared/Changeling/ChangelingIdentityComponent.cs +++ b/Content.Shared/Changeling/Components/ChangelingIdentityComponent.cs @@ -2,7 +2,7 @@ using Content.Shared.Cloning; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; -namespace Content.Shared.Changeling; +namespace Content.Shared.Changeling.Components; /// /// The storage component for Changelings, it handles the link between a changeling and its consumed identities @@ -29,6 +29,7 @@ public sealed partial class ChangelingIdentityComponent : Component /// The cloning settings passed to the CloningSystem, contains a list of all components to copy or have handled by their /// respective systems. /// + [DataField] public ProtoId IdentityCloningSettings = "ChangelingCloningSettings"; public override bool SendOnlyToOwner => true; diff --git a/Content.Shared/Changeling/ChangelingStoredIdentityComponent.cs b/Content.Shared/Changeling/Components/ChangelingStoredIdentityComponent.cs similarity index 95% rename from Content.Shared/Changeling/ChangelingStoredIdentityComponent.cs rename to Content.Shared/Changeling/Components/ChangelingStoredIdentityComponent.cs index 44583190e6..010196bfd0 100644 --- a/Content.Shared/Changeling/ChangelingStoredIdentityComponent.cs +++ b/Content.Shared/Changeling/Components/ChangelingStoredIdentityComponent.cs @@ -1,7 +1,7 @@ using Robust.Shared.GameStates; using Robust.Shared.Player; -namespace Content.Shared.Changeling; +namespace Content.Shared.Changeling.Components; /// /// Marker component for cloned identities devoured by a changeling. diff --git a/Content.Shared/Changeling/Transform/ChangelingTransformComponent.cs b/Content.Shared/Changeling/Components/ChangelingTransformComponent.cs similarity index 95% rename from Content.Shared/Changeling/Transform/ChangelingTransformComponent.cs rename to Content.Shared/Changeling/Components/ChangelingTransformComponent.cs index 0a3b3f1985..7b465ea3b2 100644 --- a/Content.Shared/Changeling/Transform/ChangelingTransformComponent.cs +++ b/Content.Shared/Changeling/Components/ChangelingTransformComponent.cs @@ -1,9 +1,10 @@ +using Content.Shared.Changeling.Systems; using Content.Shared.Cloning; using Robust.Shared.Audio; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; -namespace Content.Shared.Changeling.Transform; +namespace Content.Shared.Changeling.Components; /// /// The component containing information about Changelings Transformation action diff --git a/Content.Shared/Changeling/Devour/ChangelingDevourSystem.cs b/Content.Shared/Changeling/Systems/ChangelingDevourSystem.cs similarity index 99% rename from Content.Shared/Changeling/Devour/ChangelingDevourSystem.cs rename to Content.Shared/Changeling/Systems/ChangelingDevourSystem.cs index 83a589a8e3..a064858d43 100644 --- a/Content.Shared/Changeling/Devour/ChangelingDevourSystem.cs +++ b/Content.Shared/Changeling/Systems/ChangelingDevourSystem.cs @@ -3,6 +3,7 @@ using Content.Shared.Administration.Logs; using Content.Shared.Armor; using Content.Shared.Atmos.Rotting; using Content.Shared.Body.Components; +using Content.Shared.Changeling.Components; using Content.Shared.Damage; using Content.Shared.Database; using Content.Shared.DoAfter; @@ -19,7 +20,7 @@ using Robust.Shared.Network; using Robust.Shared.Random; using Robust.Shared.Timing; -namespace Content.Shared.Changeling.Devour; +namespace Content.Shared.Changeling.Systems; public sealed class ChangelingDevourSystem : EntitySystem { diff --git a/Content.Shared/Changeling/ChangelingIdentitySystem.cs b/Content.Shared/Changeling/Systems/ChangelingIdentitySystem.cs similarity index 98% rename from Content.Shared/Changeling/ChangelingIdentitySystem.cs rename to Content.Shared/Changeling/Systems/ChangelingIdentitySystem.cs index f68f72f853..8467cc5702 100644 --- a/Content.Shared/Changeling/ChangelingIdentitySystem.cs +++ b/Content.Shared/Changeling/Systems/ChangelingIdentitySystem.cs @@ -1,4 +1,5 @@ using System.Numerics; +using Content.Shared.Changeling.Components; using Content.Shared.Cloning; using Content.Shared.Humanoid; using Content.Shared.Mind.Components; @@ -9,7 +10,7 @@ using Robust.Shared.Network; using Robust.Shared.Player; using Robust.Shared.Prototypes; -namespace Content.Shared.Changeling; +namespace Content.Shared.Changeling.Systems; public sealed class ChangelingIdentitySystem : EntitySystem { diff --git a/Content.Shared/Changeling/Transform/ChangelingTransformSystem.UI.cs b/Content.Shared/Changeling/Systems/ChangelingTransformSystem.UI.cs similarity index 95% rename from Content.Shared/Changeling/Transform/ChangelingTransformSystem.UI.cs rename to Content.Shared/Changeling/Systems/ChangelingTransformSystem.UI.cs index 0383867698..98926631dc 100644 --- a/Content.Shared/Changeling/Transform/ChangelingTransformSystem.UI.cs +++ b/Content.Shared/Changeling/Systems/ChangelingTransformSystem.UI.cs @@ -1,6 +1,6 @@ using Robust.Shared.Serialization; -namespace Content.Shared.Changeling.Transform; +namespace Content.Shared.Changeling.Systems; /// /// Send when a player selects an intentity to transform into in the radial menu. diff --git a/Content.Shared/Changeling/Transform/ChangelingTransformSystem.cs b/Content.Shared/Changeling/Systems/ChangelingTransformSystem.cs similarity index 95% rename from Content.Shared/Changeling/Transform/ChangelingTransformSystem.cs rename to Content.Shared/Changeling/Systems/ChangelingTransformSystem.cs index dbc5356448..31f22b9294 100644 --- a/Content.Shared/Changeling/Transform/ChangelingTransformSystem.cs +++ b/Content.Shared/Changeling/Systems/ChangelingTransformSystem.cs @@ -1,5 +1,6 @@ using Content.Shared.Actions; using Content.Shared.Administration.Logs; +using Content.Shared.Changeling.Components; using Content.Shared.Cloning; using Content.Shared.Database; using Content.Shared.DoAfter; @@ -10,7 +11,7 @@ using Robust.Shared.Audio.Systems; using Robust.Shared.Network; using Robust.Shared.Prototypes; -namespace Content.Shared.Changeling.Transform; +namespace Content.Shared.Changeling.Systems; public sealed partial class ChangelingTransformSystem : EntitySystem { @@ -102,7 +103,7 @@ public sealed partial class ChangelingTransformSystem : EntitySystem if (_net.IsServer) ent.Comp.CurrentTransformSound = _audio.PlayPvs(ent.Comp.TransformAttemptNoise, ent)?.Entity; - if(TryComp(targetIdentity, out var storedIdentity) && storedIdentity.OriginalSession != null) + if (TryComp(targetIdentity, out var storedIdentity) && storedIdentity.OriginalSession != null) _adminLogger.Add(LogType.Action, LogImpact.Medium, $"{ToPrettyString(ent.Owner):player} begun an attempt to transform into \"{Name(targetIdentity)}\" ({storedIdentity.OriginalSession:player}) "); else _adminLogger.Add(LogType.Action, LogImpact.Medium, $"{ToPrettyString(ent.Owner):player} begun an attempt to transform into \"{Name(targetIdentity)}\""); @@ -162,8 +163,8 @@ public sealed partial class ChangelingTransformSystem : EntitySystem _humanoidAppearanceSystem.CloneAppearance(targetIdentity, args.User); _cloningSystem.CloneComponents(targetIdentity, args.User, settings); - - if(TryComp(targetIdentity, out var storedIdentity) && storedIdentity.OriginalSession != null) + + if (TryComp(targetIdentity, out var storedIdentity) && storedIdentity.OriginalSession != null) _adminLogger.Add(LogType.Action, LogImpact.High, $"{ToPrettyString(ent.Owner):player} successfully transformed into \"{Name(targetIdentity)}\" ({storedIdentity.OriginalSession:player})"); else _adminLogger.Add(LogType.Action, LogImpact.High, $"{ToPrettyString(ent.Owner):player} successfully transformed into \"{Name(targetIdentity)}\""); diff --git a/Resources/Prototypes/Actions/changeling.yml b/Resources/Prototypes/Actions/changeling.yml index 273bb8ed6b..6e4ec6db6c 100644 --- a/Resources/Prototypes/Actions/changeling.yml +++ b/Resources/Prototypes/Actions/changeling.yml @@ -20,3 +20,25 @@ retractSounds: collection: gib # Placeholder +- type: entity + id: ActionChangelingDevour + name: "[color=red]Devour[/color]" + description: Consume the essence of your victims and subsume their identity and mind into your own. + components: + - type: Action + icon: { sprite : Interface/Actions/changeling.rsi, state: "devour" } + iconOn: { sprite : Interface/Actions/changeling.rsi, state: "devour_on" } + priority: 1 + - type: TargetAction + - type: EntityTargetAction + event: !type:ChangelingDevourActionEvent + +- type: entity + id: ActionChangelingTransform + name: "[color=red]Transform[/color]" + description: Transform and assume the identities of those you have devoured. + components: + - type: Action + icon: { sprite : Interface/Actions/changeling.rsi, state: "transform" } + - type: InstantAction + event: !type:ChangelingTransformActionEvent diff --git a/Resources/Prototypes/Antag/changeling.yml b/Resources/Prototypes/Antag/changeling.yml deleted file mode 100644 index b4c8b2e3dc..0000000000 --- a/Resources/Prototypes/Antag/changeling.yml +++ /dev/null @@ -1,35 +0,0 @@ -- type: entity - parent: MobHuman - id: MobLing - name: Urist McLing - suffix: Non-Antag - components: - - type: ChangelingDevour - - type: ChangelingIdentity - - type: ChangelingTransform - - type: ActionGrant - actions: - - ActionRetractableItemArmBlade # Temporary addition, will inevitably be a purchasable in the bio-store - -- type: entity - id: ActionChangelingDevour - name: "[color=red]Devour[/color]" - description: Consume the essence of your victims and subsume their identity and mind into your own. - components: - - type: Action - icon: { sprite : Interface/Actions/changeling.rsi, state: "devour" } - iconOn: { sprite : Interface/Actions/changeling.rsi, state: "devour_on" } - priority: 1 - - type: TargetAction - - type: EntityTargetAction - event: !type:ChangelingDevourActionEvent - -- type: entity - id: ActionChangelingTransform - name: "[color=red]Transform[/color]" - description: Transform and assume the identities of those you have devoured. - components: - - type: Action - icon: { sprite : Interface/Actions/changeling.rsi, state: "transform" } - - type: InstantAction - event: !type:ChangelingTransformActionEvent diff --git a/Resources/Prototypes/Entities/Mobs/Player/changeling.yml b/Resources/Prototypes/Entities/Mobs/Player/changeling.yml new file mode 100644 index 0000000000..d8d4aac742 --- /dev/null +++ b/Resources/Prototypes/Entities/Mobs/Player/changeling.yml @@ -0,0 +1,12 @@ +- type: entity + parent: MobHuman + id: MobLing + name: Urist McLing + suffix: Non-Antag + components: + - type: ChangelingDevour + - type: ChangelingIdentity + - type: ChangelingTransform + - type: ActionGrant + actions: + - ActionRetractableItemArmBlade # Temporary addition, will inevitably be a purchasable in the bio-store