using Content.Shared.Actions; using Content.Shared.Ninja.Systems; using Robust.Shared.Audio; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; using Robust.Shared.Utility; namespace Content.Shared.Ninja.Components; /// /// Component for ninja suit abilities and power consumption. /// As an implementation detail, dashing with katana is a suit action which isn't ideal. /// [RegisterComponent, NetworkedComponent, Access(typeof(SharedNinjaSuitSystem))] public sealed partial class NinjaSuitComponent : Component { /// /// Battery charge used passively, in watts. Will last 1000 seconds on a small-capacity power cell. /// [DataField("passiveWattage")] public float PassiveWattage = 0.36f; /// /// Battery charge used while cloaked, stacks with passive. Will last 200 seconds while cloaked on a small-capacity power cell. /// [DataField("cloakWattage")] public float CloakWattage = 1.44f; /// /// Sound played when a ninja is hit while cloaked. /// [DataField("revealSound")] public SoundSpecifier RevealSound = new SoundPathSpecifier("/Audio/Effects/chime.ogg"); /// /// How long to disable all abilities for when revealed. /// This adds a UseDelay to the ninja so it should not be set by anything else. /// [DataField("disableTime")] public TimeSpan DisableTime = TimeSpan.FromSeconds(5); /// /// The action id for creating throwing stars. /// [DataField("createThrowingStarAction", customTypeSerializer: typeof(PrototypeIdSerializer))] public string CreateThrowingStarAction = "ActionCreateThrowingStar"; [DataField, AutoNetworkedField] public EntityUid? CreateThrowingStarActionEntity; /// /// Battery charge used to create a throwing star. Can do it 25 times on a small-capacity power cell. /// [DataField("throwingStarCharge")] public float ThrowingStarCharge = 14.4f; /// /// Throwing star item to create with the action /// [DataField("throwingStarPrototype", customTypeSerializer: typeof(PrototypeIdSerializer))] public string ThrowingStarPrototype = "ThrowingStarNinja"; /// /// The action id for recalling a bound energy katana /// [DataField("recallKatanaAction", customTypeSerializer: typeof(PrototypeIdSerializer))] public string RecallKatanaAction = "ActionRecallKatana"; [DataField, AutoNetworkedField] public EntityUid? RecallKatanaActionEntity; /// /// Battery charge used per tile the katana teleported. /// Uses 1% of a default battery per tile. /// [DataField("recallCharge")] public float RecallCharge = 3.6f; /// /// The action id for creating an EMP burst /// [DataField("empAction", customTypeSerializer: typeof(PrototypeIdSerializer))] public string EmpAction = "ActionNinjaEmp"; [DataField, AutoNetworkedField] public EntityUid? EmpActionEntity; /// /// Battery charge used to create an EMP burst. Can do it 2 times on a small-capacity power cell. /// [DataField("empCharge")] public float EmpCharge = 180f; /// /// Range of the EMP in tiles. /// [DataField("empRange")] public float EmpRange = 6f; /// /// Power consumed from batteries by the EMP /// [DataField("empConsumption")] public float EmpConsumption = 100000f; /// /// How long the EMP effects last for, in seconds /// [DataField("empDuration")] public float EmpDuration = 60f; } public sealed partial class CreateThrowingStarEvent : InstantActionEvent { } public sealed partial class RecallKatanaEvent : InstantActionEvent { } public sealed partial class NinjaEmpEvent : InstantActionEvent { }