[Revert] Reverts Ninja (#15516)
* Revert "[Antag] add space ninja as midround antag (#14069)" This reverts commitc1cda0dbf8. * Revert "[Fix] move ninja objectives into NinjaRole (#15490)" This reverts commit251f429fb3.
This commit is contained in:
@@ -1,66 +0,0 @@
|
||||
using Content.Shared.Actions;
|
||||
using Content.Shared.Actions.ActionTypes;
|
||||
using Content.Shared.Ninja.Systems;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.Ninja.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Component for a Space Ninja's katana, controls its dash sound.
|
||||
/// Requires a ninja with a suit for abilities to work.
|
||||
/// </summary>
|
||||
// basically emag but without immune tag, TODO: make the charge thing its own component and have emag use it too
|
||||
[Access(typeof(EnergyKatanaSystem))]
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
||||
public sealed partial class EnergyKatanaComponent : Component
|
||||
{
|
||||
public EntityUid? Ninja = null;
|
||||
|
||||
/// <summary>
|
||||
/// Sound played when using dash action.
|
||||
/// </summary>
|
||||
[DataField("blinkSound")]
|
||||
public SoundSpecifier BlinkSound = new SoundPathSpecifier("/Audio/Magic/blink.ogg");
|
||||
|
||||
/// <summary>
|
||||
/// Volume control for katana dash action.
|
||||
/// </summary>
|
||||
[DataField("blinkVolume")]
|
||||
public float BlinkVolume = 5f;
|
||||
|
||||
/// <summary>
|
||||
/// The maximum number of dash charges the katana can have
|
||||
/// </summary>
|
||||
[DataField("maxCharges"), ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
||||
public int MaxCharges = 3;
|
||||
|
||||
/// <summary>
|
||||
/// The current number of dash charges on the katana
|
||||
/// </summary>
|
||||
[DataField("charges"), ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
||||
public int Charges = 3;
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not the katana automatically recharges over time.
|
||||
/// </summary>
|
||||
[DataField("autoRecharge"), ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
||||
public bool AutoRecharge = true;
|
||||
|
||||
/// <summary>
|
||||
/// The time it takes to regain a single dash charge
|
||||
/// </summary>
|
||||
[DataField("rechargeDuration"), ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
||||
public TimeSpan RechargeDuration = TimeSpan.FromSeconds(20);
|
||||
|
||||
/// <summary>
|
||||
/// The time when the next dash charge will be added
|
||||
/// </summary>
|
||||
[DataField("nextChargeTime", customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
|
||||
public TimeSpan NextChargeTime = TimeSpan.MaxValue;
|
||||
}
|
||||
|
||||
public sealed class KatanaDashEvent : WorldTargetActionEvent { }
|
||||
@@ -1,38 +0,0 @@
|
||||
using Content.Shared.Ninja.Systems;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.Ninja.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Component placed on a mob to make it a space ninja, able to use suit and glove powers.
|
||||
/// Contains ids of all ninja equipment.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
||||
[Access(typeof(SharedNinjaSystem))]
|
||||
public sealed partial class NinjaComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Grid entity of the station the ninja was spawned around. Set if spawned naturally by the event.
|
||||
/// </summary>
|
||||
[ViewVariables, AutoNetworkedField]
|
||||
public EntityUid? StationGrid;
|
||||
|
||||
/// <summary>
|
||||
/// Currently worn suit
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
public EntityUid? Suit = null;
|
||||
|
||||
/// <summary>
|
||||
/// Currently worn gloves
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
public EntityUid? Gloves = null;
|
||||
|
||||
/// <summary>
|
||||
/// Bound katana, set once picked up and never removed
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
public EntityUid? Katana = null;
|
||||
}
|
||||
@@ -1,151 +0,0 @@
|
||||
using Content.Shared.Actions;
|
||||
using Content.Shared.Actions.ActionTypes;
|
||||
using Content.Shared.DoAfter;
|
||||
using Content.Shared.Ninja.Systems;
|
||||
using Content.Shared.Tag;
|
||||
using Content.Shared.Toggleable;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
using Robust.Shared.Utility;
|
||||
using System.Threading;
|
||||
|
||||
namespace Content.Shared.Ninja.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Component for toggling glove powers.
|
||||
/// Powers being enabled is controlled by GlovesEnabledComponent
|
||||
/// </summary>
|
||||
[Access(typeof(SharedNinjaGlovesSystem))]
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class NinjaGlovesComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Entity of the ninja using these gloves, usually means enabled
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
public EntityUid? User;
|
||||
|
||||
/// <summary>
|
||||
/// The action for toggling ninja gloves abilities
|
||||
/// </summary>
|
||||
[DataField("toggleAction")]
|
||||
public InstantAction ToggleAction = new()
|
||||
{
|
||||
DisplayName = "action-name-toggle-ninja-gloves",
|
||||
Description = "action-desc-toggle-ninja-gloves",
|
||||
Priority = -13,
|
||||
Event = new ToggleActionEvent()
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Component for emagging doors on click, when gloves are enabled.
|
||||
/// Only works on entities with DoorComponent.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class NinjaDoorjackComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The tag that marks an entity as immune to doorjacking
|
||||
/// </summary>
|
||||
[DataField("emagImmuneTag", customTypeSerializer: typeof(PrototypeIdSerializer<TagPrototype>))]
|
||||
public string EmagImmuneTag = "EmagImmune";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Component for stunning mobs on click, when gloves are enabled.
|
||||
/// Knocks them down for a bit and deals shock damage.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class NinjaStunComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Joules required in the suit to stun someone. Defaults to 10 uses on a small battery.
|
||||
/// </summary>
|
||||
[DataField("stunCharge")]
|
||||
public float StunCharge = 36.0f;
|
||||
|
||||
/// <summary>
|
||||
/// Shock damage dealt when stunning someone
|
||||
/// </summary>
|
||||
[DataField("stunDamage")]
|
||||
public int StunDamage = 5;
|
||||
|
||||
/// <summary>
|
||||
/// Time that someone is stunned for, stacks if done multiple times.
|
||||
/// </summary>
|
||||
[DataField("stunTime")]
|
||||
public TimeSpan StunTime = TimeSpan.FromSeconds(3);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Component for draining power from APCs/substations/SMESes, when gloves are enabled.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class NinjaDrainComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Conversion rate between joules in a device and joules added to suit.
|
||||
/// Should be very low since powercells store nothing compared to even an APC.
|
||||
/// </summary>
|
||||
[DataField("drainEfficiency")]
|
||||
public float DrainEfficiency = 0.001f;
|
||||
|
||||
/// <summary>
|
||||
/// Time that the do after takes to drain charge from a battery, in seconds
|
||||
/// </summary>
|
||||
[DataField("drainTime")]
|
||||
public float DrainTime = 1f;
|
||||
|
||||
[DataField("sparkSound")]
|
||||
public SoundSpecifier SparkSound = new SoundCollectionSpecifier("sparks");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Component for downloading research nodes from a R&D server, when gloves are enabled.
|
||||
/// Requirement for greentext.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class NinjaDownloadComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Time taken to download research from a server
|
||||
/// </summary>
|
||||
[DataField("downloadTime")]
|
||||
public float DownloadTime = 20f;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Component for hacking a communications console to call in a threat.
|
||||
/// Called threat is rolled from the ninja gamerule config.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class NinjaTerrorComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Time taken to hack the console
|
||||
/// </summary>
|
||||
[DataField("terrorTime")]
|
||||
public float TerrorTime = 20f;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// DoAfter event for drain ability.
|
||||
/// </summary>
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class DrainDoAfterEvent : SimpleDoAfterEvent { }
|
||||
|
||||
/// <summary>
|
||||
/// DoAfter event for research download ability.
|
||||
/// </summary>
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class DownloadDoAfterEvent : SimpleDoAfterEvent { }
|
||||
|
||||
/// <summary>
|
||||
/// DoAfter event for comms console terror ability.
|
||||
/// </summary>
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class TerrorDoAfterEvent : SimpleDoAfterEvent { }
|
||||
@@ -1,148 +0,0 @@
|
||||
using Content.Shared.Actions;
|
||||
using Content.Shared.Actions.ActionTypes;
|
||||
using Content.Shared.Ninja.Systems;
|
||||
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;
|
||||
|
||||
// TODO: ResourcePath -> ResPath when thing gets merged
|
||||
|
||||
/// <summary>
|
||||
/// Component for ninja suit abilities and power consumption.
|
||||
/// As an implementation detail, dashing with katana is a suit action which isn't ideal.
|
||||
/// </summary>
|
||||
[Access(typeof(SharedNinjaSuitSystem))]
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
||||
public sealed partial class NinjaSuitComponent : Component
|
||||
{
|
||||
[ViewVariables, AutoNetworkedField]
|
||||
public bool Cloaked = false;
|
||||
|
||||
/// <summary>
|
||||
/// The action for toggling suit phase cloak ability
|
||||
/// </summary>
|
||||
[DataField("togglePhaseCloakAction")]
|
||||
public InstantAction TogglePhaseCloakAction = new()
|
||||
{
|
||||
UseDelay = TimeSpan.FromSeconds(5), // have to plan un/cloaking ahead of time
|
||||
DisplayName = "action-name-toggle-phase-cloak",
|
||||
Description = "action-desc-toggle-phase-cloak",
|
||||
Priority = -9,
|
||||
Event = new TogglePhaseCloakEvent()
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Battery charge used passively, in watts. Will last 1000 seconds on a small-capacity power cell.
|
||||
/// </summary>
|
||||
[DataField("passiveWattage")]
|
||||
public float PassiveWattage = 0.36f;
|
||||
|
||||
/// <summary>
|
||||
/// Battery charge used while cloaked, stacks with passive. Will last 200 seconds while cloaked on a small-capacity power cell.
|
||||
/// </summary>
|
||||
[DataField("cloakWattage")]
|
||||
public float CloakWattage = 1.44f;
|
||||
|
||||
/// <summary>
|
||||
/// The action for creating throwing soap, in place of ninja throwing stars since embedding doesn't exist.
|
||||
/// </summary>
|
||||
[DataField("createSoapAction")]
|
||||
public InstantAction CreateSoapAction = new()
|
||||
{
|
||||
UseDelay = TimeSpan.FromSeconds(10),
|
||||
Icon = new SpriteSpecifier.Rsi(new ResourcePath("Objects/Specific/Janitorial/soap.rsi"), "soap"),
|
||||
ItemIconStyle = ItemActionIconStyle.NoItem,
|
||||
DisplayName = "action-name-create-soap",
|
||||
Description = "action-desc-create-soap",
|
||||
Priority = -10,
|
||||
Event = new CreateSoapEvent()
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Battery charge used to create a throwing soap. Can do it 25 times on a small-capacity power cell.
|
||||
/// </summary>
|
||||
[DataField("soapCharge")]
|
||||
public float SoapCharge = 14.4f;
|
||||
|
||||
/// <summary>
|
||||
/// Soap item to create with the action
|
||||
/// </summary>
|
||||
[DataField("soapPrototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string SoapPrototype = "SoapNinja";
|
||||
|
||||
/// <summary>
|
||||
/// The action for recalling a bound energy katana
|
||||
/// </summary>
|
||||
[DataField("recallkatanaAction")]
|
||||
public InstantAction RecallKatanaAction = new()
|
||||
{
|
||||
UseDelay = TimeSpan.FromSeconds(1),
|
||||
Icon = new SpriteSpecifier.Rsi(new ResourcePath("Objects/Weapons/Melee/energykatana.rsi"), "icon"),
|
||||
ItemIconStyle = ItemActionIconStyle.NoItem,
|
||||
DisplayName = "action-name-recall-katana",
|
||||
Description = "action-desc-recall-katana",
|
||||
Priority = -11,
|
||||
Event = new RecallKatanaEvent()
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// The action for dashing somewhere using katana
|
||||
/// </summary>
|
||||
[DataField("katanaDashAction")]
|
||||
public WorldTargetAction KatanaDashAction = new()
|
||||
{
|
||||
Icon = new SpriteSpecifier.Rsi(new ResourcePath("Objects/Magic/magicactions.rsi"), "blink"),
|
||||
ItemIconStyle = ItemActionIconStyle.NoItem,
|
||||
DisplayName = "action-name-katana-dash",
|
||||
Description = "action-desc-katana-dash",
|
||||
Priority = -12,
|
||||
Event = new KatanaDashEvent(),
|
||||
// doing checks manually
|
||||
CheckCanAccess = false,
|
||||
Range = 0f
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// The action for creating an EMP burst
|
||||
/// </summary>
|
||||
[DataField("empAction")]
|
||||
public InstantAction EmpAction = new()
|
||||
{
|
||||
Icon = new SpriteSpecifier.Rsi(new ResourcePath("Objects/Weapons/Grenades/empgrenade.rsi"), "icon"),
|
||||
ItemIconStyle = ItemActionIconStyle.BigAction,
|
||||
DisplayName = "action-name-em-burst",
|
||||
Description = "action-desc-em-burst",
|
||||
Priority = -13,
|
||||
Event = new NinjaEmpEvent()
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Battery charge used to create an EMP burst. Can do it 2 times on a small-capacity power cell.
|
||||
/// </summary>
|
||||
[DataField("empCharge")]
|
||||
public float EmpCharge = 180f;
|
||||
|
||||
/// <summary>
|
||||
/// Range of the EMP in tiles.
|
||||
/// </summary>
|
||||
[DataField("empRange")]
|
||||
public float EmpRange = 6f;
|
||||
|
||||
/// <summary>
|
||||
/// Power consumed from batteries by the EMP
|
||||
/// </summary>
|
||||
[DataField("empConsumption")]
|
||||
public float EmpConsumption = 100000f;
|
||||
}
|
||||
|
||||
public sealed class TogglePhaseCloakEvent : InstantActionEvent { }
|
||||
|
||||
public sealed class CreateSoapEvent : InstantActionEvent { }
|
||||
|
||||
public sealed class RecallKatanaEvent : InstantActionEvent { }
|
||||
|
||||
public sealed class NinjaEmpEvent : InstantActionEvent { }
|
||||
@@ -1,17 +0,0 @@
|
||||
namespace Content.Shared.Ninja.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Component for the Space Ninja's unique Spider Charge.
|
||||
/// Only this component detonating can trigger the ninja's objective.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class SpiderChargeComponent : Component
|
||||
{
|
||||
/// Range for planting within the target area
|
||||
[DataField("range")]
|
||||
public float Range = 10f;
|
||||
|
||||
/// The ninja that planted this charge
|
||||
[ViewVariables]
|
||||
public EntityUid? Planter = null;
|
||||
}
|
||||
Reference in New Issue
Block a user