]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
cleanup changeling namespaces and prototypes (#39794)
authorslarticodefast <161409025+slarticodefast@users.noreply.github.com>
Thu, 21 Aug 2025 00:42:42 +0000 (02:42 +0200)
committerGitHub <noreply@github.com>
Thu, 21 Aug 2025 00:42:42 +0000 (02:42 +0200)
15 files changed:
Content.Client/Changeling/Transform/ChangelingTransformBoundUserInterface.cs
Content.Client/Changeling/Transform/ChangelingTransformMenu.xaml.cs
Content.Shared/Changeling/ChangelingDevourEvents.cs [moved from Content.Shared/Changeling/Devour/ChangelingDevourSystem.Events.cs with 94% similarity]
Content.Shared/Changeling/ChangelingTransformEvents.cs [moved from Content.Shared/Changeling/Transform/ChangelingTransformSystem.Events.cs with 91% similarity]
Content.Shared/Changeling/Components/ChangelingDevourComponent.cs [moved from Content.Shared/Changeling/Devour/ChangelingDevourComponent.cs with 98% similarity]
Content.Shared/Changeling/Components/ChangelingIdentityComponent.cs [moved from Content.Shared/Changeling/ChangelingIdentityComponent.cs with 95% similarity]
Content.Shared/Changeling/Components/ChangelingStoredIdentityComponent.cs [moved from Content.Shared/Changeling/ChangelingStoredIdentityComponent.cs with 95% similarity]
Content.Shared/Changeling/Components/ChangelingTransformComponent.cs [moved from Content.Shared/Changeling/Transform/ChangelingTransformComponent.cs with 95% similarity]
Content.Shared/Changeling/Systems/ChangelingDevourSystem.cs [moved from Content.Shared/Changeling/Devour/ChangelingDevourSystem.cs with 99% similarity]
Content.Shared/Changeling/Systems/ChangelingIdentitySystem.cs [moved from Content.Shared/Changeling/ChangelingIdentitySystem.cs with 98% similarity]
Content.Shared/Changeling/Systems/ChangelingTransformSystem.UI.cs [moved from Content.Shared/Changeling/Transform/ChangelingTransformSystem.UI.cs with 95% similarity]
Content.Shared/Changeling/Systems/ChangelingTransformSystem.cs [moved from Content.Shared/Changeling/Transform/ChangelingTransformSystem.cs with 95% similarity]
Resources/Prototypes/Actions/changeling.yml
Resources/Prototypes/Antag/changeling.yml [deleted file]
Resources/Prototypes/Entities/Mobs/Player/changeling.yml [new file with mode: 0644]

index 8e383bc96728b37c0fec6166c6d431023d91d078..94012313035b58058f9503e945d010a0c97815c9 100644 (file)
@@ -1,4 +1,4 @@
-using Content.Shared.Changeling.Transform;
+using Content.Shared.Changeling.Systems;
 using JetBrains.Annotations;
 using Robust.Client.UserInterface;
 
index beef9ae427d34003066cdc3b13104fe002622302..fa2deaf4313cdf08206d0a4d63f8a4b761d91f19 100644 (file)
@@ -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;
similarity index 94%
rename from Content.Shared/Changeling/Devour/ChangelingDevourSystem.Events.cs
rename to Content.Shared/Changeling/ChangelingDevourEvents.cs
index d063737e5cded8108ccc9c47940a54482f514057..ba8d25f30cba7295be56268527b1842f26540c97 100644 (file)
@@ -2,7 +2,7 @@
 using Content.Shared.DoAfter;
 using Robust.Shared.Serialization;
 
-namespace Content.Shared.Changeling.Devour;
+namespace Content.Shared.Changeling;
 
 /// <summary>
 /// Action event for Devour, someone has initiated a devour on someone, begin to windup.
similarity index 91%
rename from Content.Shared/Changeling/Transform/ChangelingTransformSystem.Events.cs
rename to Content.Shared/Changeling/ChangelingTransformEvents.cs
index cfe2a5693382e18d5e02d827564fe959f03256ce..9940a607052af8e85cd31b009474c3cba69c2eb6 100644 (file)
@@ -2,7 +2,7 @@
 using Content.Shared.DoAfter;
 using Robust.Shared.Serialization;
 
-namespace Content.Shared.Changeling.Transform;
+namespace Content.Shared.Changeling;
 
 /// <summary>
 /// Action event for opening the changeling transformation radial menu.
similarity index 98%
rename from Content.Shared/Changeling/Devour/ChangelingDevourComponent.cs
rename to Content.Shared/Changeling/Components/ChangelingDevourComponent.cs
index 7798c6fec9bb9d589ea1deeb3d67808c244d44fa..a874afe9ce6b608be2761ce4d16d0ac99b2e9d33 100644 (file)
@@ -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;
 
 /// <summary>
 /// Component responsible for Changelings Devour attack. Including the amount of damage
similarity index 95%
rename from Content.Shared/Changeling/ChangelingIdentityComponent.cs
rename to Content.Shared/Changeling/Components/ChangelingIdentityComponent.cs
index 461315f4ce5b86b203f0696ee4301d9ea5c26b1c..2779164e4e099c4a1eb5fbc1267aebc2474671a5 100644 (file)
@@ -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;
 
 /// <summary>
 /// 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.
     /// </summary>
+    [DataField]
     public ProtoId<CloningSettingsPrototype> IdentityCloningSettings = "ChangelingCloningSettings";
 
     public override bool SendOnlyToOwner => true;
similarity index 95%
rename from Content.Shared/Changeling/ChangelingStoredIdentityComponent.cs
rename to Content.Shared/Changeling/Components/ChangelingStoredIdentityComponent.cs
index 44583190e681e7bb227ee9052729bed615d6913c..010196bfd0e58df28dfc2fa2d22758dcfe2daa06 100644 (file)
@@ -1,7 +1,7 @@
 using Robust.Shared.GameStates;
 using Robust.Shared.Player;
 
-namespace Content.Shared.Changeling;
+namespace Content.Shared.Changeling.Components;
 
 /// <summary>
 /// Marker component for cloned identities devoured by a changeling.
similarity index 95%
rename from Content.Shared/Changeling/Transform/ChangelingTransformComponent.cs
rename to Content.Shared/Changeling/Components/ChangelingTransformComponent.cs
index 0a3b3f19859c8a58147ef3eec8103c8879b6bdca..7b465ea3b26fc2b3c62f77d9df55a7e7380e1d84 100644 (file)
@@ -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;
 
 /// <summary>
 /// The component containing information about Changelings Transformation action
similarity index 99%
rename from Content.Shared/Changeling/Devour/ChangelingDevourSystem.cs
rename to Content.Shared/Changeling/Systems/ChangelingDevourSystem.cs
index 83a589a8e30ed49b71283d179d21217d5a1ec30d..a064858d43f77dbdcbfcbe94e0b692d80ac53fad 100644 (file)
@@ -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
 {
similarity index 98%
rename from Content.Shared/Changeling/ChangelingIdentitySystem.cs
rename to Content.Shared/Changeling/Systems/ChangelingIdentitySystem.cs
index f68f72f853a3ce9662e047e229ab9ef67e92635c..8467cc570211247fbf00cb1b4f7c4237c91c9c8a 100644 (file)
@@ -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
 {
similarity index 95%
rename from Content.Shared/Changeling/Transform/ChangelingTransformSystem.UI.cs
rename to Content.Shared/Changeling/Systems/ChangelingTransformSystem.UI.cs
index 03838676986477333022e74d68f924a8c8082edb..98926631dc95b1ca09fb26864af1e63e7e4b97ea 100644 (file)
@@ -1,6 +1,6 @@
 using Robust.Shared.Serialization;
 
-namespace Content.Shared.Changeling.Transform;
+namespace Content.Shared.Changeling.Systems;
 
 /// <summary>
 /// Send when a player selects an intentity to transform into in the radial menu.
similarity index 95%
rename from Content.Shared/Changeling/Transform/ChangelingTransformSystem.cs
rename to Content.Shared/Changeling/Systems/ChangelingTransformSystem.cs
index dbc53564489895519e207d053fe50d2da60ad23e..31f22b9294dc6eb7ae5aa869d203bc930b7b92ee 100644 (file)
@@ -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<ChangelingStoredIdentityComponent>(targetIdentity, out var storedIdentity) && storedIdentity.OriginalSession != null)
+        if (TryComp<ChangelingStoredIdentityComponent>(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<ChangelingStoredIdentityComponent>(targetIdentity, out var storedIdentity) && storedIdentity.OriginalSession != null)
+
+        if (TryComp<ChangelingStoredIdentityComponent>(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)}\"");
index 273bb8ed6b91bbfc4761a7e9a6ef63f89f740988..6e4ec6db6c492998f20be767ac79e5c580b7ab3b 100644 (file)
     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 (file)
index b4c8b2e..0000000
+++ /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 (file)
index 0000000..d8d4aac
--- /dev/null
@@ -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