diff --git a/Content.Server/Nyanotrasen/Item/ShockCollar/ShockCollarComponent.cs b/Content.Server/Nyanotrasen/Item/ShockCollar/ShockCollarComponent.cs new file mode 100644 index 00000000000..781f2d00030 --- /dev/null +++ b/Content.Server/Nyanotrasen/Item/ShockCollar/ShockCollarComponent.cs @@ -0,0 +1,6 @@ +namespace Content.Server.ShockCollar; + +[RegisterComponent] +public sealed partial class ShockCollarComponent : Component +{} + diff --git a/Content.Server/Nyanotrasen/Item/ShockCollar/ShockCollarSystem.cs b/Content.Server/Nyanotrasen/Item/ShockCollar/ShockCollarSystem.cs new file mode 100644 index 00000000000..d6bba3b0d76 --- /dev/null +++ b/Content.Server/Nyanotrasen/Item/ShockCollar/ShockCollarSystem.cs @@ -0,0 +1,31 @@ +using Content.Shared.Mobs.Components; +using Content.Server.Explosion.EntitySystems; // Why is trigger under explosions by the way? Even doors already use it. +using Content.Server.Electrocution; +using Robust.Shared.Containers; + +namespace Content.Server.ShockCollar; + +public sealed partial class ShockCollarSystem : EntitySystem +{ + [Dependency] private readonly SharedContainerSystem _container = default!; + [Dependency] private readonly ElectrocutionSystem _electrocutionSystem = default!; + public override void Initialize() + { + base.Initialize(); + SubscribeLocalEvent(OnTrigger); + } + + private void OnTrigger(EntityUid uid, ShockCollarComponent component, TriggerEvent args) + { + if (!_container.TryGetContainingContainer(uid, out var container)) // Try to get the entity directly containing this + return; + + var containerEnt = container.Owner; + + if (!HasComp(containerEnt)) // If it's not a mob we don't care + return; + + _electrocutionSystem.TryDoElectrocution(containerEnt, null, 5, TimeSpan.FromSeconds(2), true); + } +} + diff --git a/Resources/Prototypes/DeltaV/Research/arsenal.yml b/Resources/Prototypes/DeltaV/Research/arsenal.yml index 2309360f2d8..23006e3723b 100644 --- a/Resources/Prototypes/DeltaV/Research/arsenal.yml +++ b/Resources/Prototypes/DeltaV/Research/arsenal.yml @@ -12,4 +12,4 @@ recipeUnlocks: - CartridgeSpecialHoly # DeltaV - .38 Special revolver, Holy ammo - CartridgeSpecialMindbreaker # DeltaV - .38 Special revolver, Mindbreaker ammo - # - ShellSoulbreaker # Nyanotrasen - Soulbreaker shotgun ammo + - ShellSoulbreaker # Nyanotrasen - Soulbreaker shotgun ammo diff --git a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml index 43b9bba01ca..5788765e8e8 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml @@ -583,6 +583,7 @@ - MagazineBoxRifleIncendiary - CartridgeSpecialHoly # DeltaV - .38 Special revolver, Holy ammo - CartridgeSpecialMindbreaker # DeltaV - .38 Special revolver, Mindbreaker ammo + - ShellSoulbreaker # Nyanotrasen - Shotgun shell to get rid of psionics - Signaller - SignalTrigger - VoiceTrigger @@ -599,6 +600,7 @@ - WeaponTaser - ClothingHeadHelmetInsulated # Nyanotrasen - Insulative headgear - ClothingHeadCage # Nyanotrasen - Insulative headgear + - ShockCollar # Nyanotrasen - Shock Collar - type: MaterialStorage whitelist: tags: diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Objects/Devices/shock_collar.yml b/Resources/Prototypes/Nyanotrasen/Entities/Objects/Devices/shock_collar.yml new file mode 100644 index 00000000000..396db81819d --- /dev/null +++ b/Resources/Prototypes/Nyanotrasen/Entities/Objects/Devices/shock_collar.yml @@ -0,0 +1,20 @@ +- type: entity + parent: ClothingNeckBase + id: ShockCollar + name: shock collar + description: Shocking. Placeholder sprite. + components: + - type: Sprite + sprite: Nyanotrasen/Clothing/Neck/Misc/shock.rsi + - type: Clothing + sprite: Nyanotrasen/Clothing/Neck/Misc/shock.rsi + - type: ShockCollar + - type: TriggerOnSignal + - type: DeviceNetwork + deviceNetId: Wireless + receiveFrequencyId: BasicDevice + - type: WirelessNetworkConnection + range: 200 + - type: DeviceLinkSink + ports: + - Trigger diff --git a/Resources/Prototypes/Nyanotrasen/Recipes/Lathes/security.yml b/Resources/Prototypes/Nyanotrasen/Recipes/Lathes/security.yml index 11472007c30..d8fc226efcd 100644 --- a/Resources/Prototypes/Nyanotrasen/Recipes/Lathes/security.yml +++ b/Resources/Prototypes/Nyanotrasen/Recipes/Lathes/security.yml @@ -16,3 +16,28 @@ materials: Steel: 400 # Bluespace: 20 + +- type: latheRecipe + id: ShockCollar + icon: + sprite: Nyanotrasen/Clothing/Neck/Misc/shock.rsi + state: icon + result: ShockCollar + completetime: 2 + materials: + Steel: 300 + Glass: 100 + Plastic: 100 + +- type: latheRecipe + id: ShellSoulbreaker + icon: + sprite: Objects/Weapons/Guns/Ammunition/Casings/shotgun_shell.rsi + state: practice + result: ShellSoulbreaker + completetime: 4 + materials: + Plastic: 15 + Steel: 10 + Bluespace: 10 + Glass: 5 diff --git a/Resources/Prototypes/Nyanotrasen/Research/experimental.yml b/Resources/Prototypes/Nyanotrasen/Research/experimental.yml index 262b24067d5..b5b65b842ef 100644 --- a/Resources/Prototypes/Nyanotrasen/Research/experimental.yml +++ b/Resources/Prototypes/Nyanotrasen/Research/experimental.yml @@ -12,7 +12,7 @@ recipeUnlocks: - ClothingHeadHelmetInsulated - ClothingHeadCage - # - ShellSoulbreaker + # - ShellSoulbreaker # DeltaV - Placing it under Exotic Ammunition because that's what it is. # Tier 3