-using Content.Shared.Changeling.Transform;
+using Content.Shared.Changeling.Systems;
using JetBrains.Annotations;
using Robust.Client.UserInterface;
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;
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.
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.
+using Content.Shared.Changeling.Systems;
using Content.Shared.Damage;
using Content.Shared.Damage.Prototypes;
using Content.Shared.FixedPoint;
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
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
/// 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;
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.
+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
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;
using Robust.Shared.Random;
using Robust.Shared.Timing;
-namespace Content.Shared.Changeling.Devour;
+namespace Content.Shared.Changeling.Systems;
public sealed class ChangelingDevourSystem : EntitySystem
{
using System.Numerics;
+using Content.Shared.Changeling.Components;
using Content.Shared.Cloning;
using Content.Shared.Humanoid;
using Content.Shared.Mind.Components;
using Robust.Shared.Player;
using Robust.Shared.Prototypes;
-namespace Content.Shared.Changeling;
+namespace Content.Shared.Changeling.Systems;
public sealed class ChangelingIdentitySystem : EntitySystem
{
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.
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;
using Robust.Shared.Network;
using Robust.Shared.Prototypes;
-namespace Content.Shared.Changeling.Transform;
+namespace Content.Shared.Changeling.Systems;
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)}\"");
_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)}\"");
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
+++ /dev/null
-- 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
--- /dev/null
+- 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