cleanup changeling namespaces and prototypes (#39794)
This commit is contained in:
@@ -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.
|
||||
@@ -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.
|
||||
@@ -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
|
||||
@@ -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;
|
||||
@@ -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.
|
||||
@@ -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
|
||||
@@ -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
|
||||
{
|
||||
@@ -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
|
||||
{
|
||||
@@ -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.
|
||||
@@ -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)}\"");
|
||||
Reference in New Issue
Block a user