Skip to content

Commit

Permalink
shock collar and soulbreaker research
Browse files Browse the repository at this point in the history
  • Loading branch information
FluffiestFloof committed Oct 5, 2023
1 parent bbe2865 commit 99e8b53
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Content.Server.ShockCollar;

[RegisterComponent]
public sealed partial class ShockCollarComponent : Component
{}

31 changes: 31 additions & 0 deletions Content.Server/Nyanotrasen/Item/ShockCollar/ShockCollarSystem.cs
Original file line number Diff line number Diff line change
@@ -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<ShockCollarComponent, TriggerEvent>(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<MobStateComponent>(containerEnt)) // If it's not a mob we don't care
return;

_electrocutionSystem.TryDoElectrocution(containerEnt, null, 5, TimeSpan.FromSeconds(2), true);
}
}

2 changes: 1 addition & 1 deletion Resources/Prototypes/DeltaV/Research/arsenal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions Resources/Prototypes/Entities/Structures/Machines/lathe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -599,6 +600,7 @@
- WeaponTaser
- ClothingHeadHelmetInsulated # Nyanotrasen - Insulative headgear
- ClothingHeadCage # Nyanotrasen - Insulative headgear
- ShockCollar # Nyanotrasen - Shock Collar
- type: MaterialStorage
whitelist:
tags:
Expand Down
Original file line number Diff line number Diff line change
@@ -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
25 changes: 25 additions & 0 deletions Resources/Prototypes/Nyanotrasen/Recipes/Lathes/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion Resources/Prototypes/Nyanotrasen/Research/experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
recipeUnlocks:
- ClothingHeadHelmetInsulated
- ClothingHeadCage
# - ShellSoulbreaker
# - ShellSoulbreaker # DeltaV - Placing it under Exotic Ammunition because that's what it is.

# Tier 3

Expand Down

0 comments on commit 99e8b53

Please sign in to comment.