Skip to content

Commit

Permalink
Dead Man's Signaller (#2775)
Browse files Browse the repository at this point in the history
* Sorta working

* Made it able to be activated and deactivated

* Moved everything to Delta V folders

* Adds to research and protolathe

* Added signaller to uplink

* Sprites

* Range

* Fixes and moving things.

* yaml fix

* Fixes and clarified descriptions

* More code fixes

* please i beg

* i hate
  • Loading branch information
Emily9031 authored Jan 22, 2025
1 parent 190521d commit c1a23e1
Show file tree
Hide file tree
Showing 13 changed files with 119 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Content.Shared.DeviceLinking;
using Robust.Shared.Prototypes;

namespace Content.Server._DV.DeviceLinking.Components;

[RegisterComponent]
public sealed partial class DeadMansSignallerComponent : Component
{
/// <summary>
/// The port that gets signaled when the switch turns on.
/// </summary>
[DataField]
public ProtoId<SourcePortPrototype> Port = "Pressed";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using Content.Server._DV.DeviceLinking.Components;
using Content.Server.DeviceLinking.Systems;
using Content.Shared.Hands;
using Content.Shared.Item.ItemToggle;

namespace Content.Server._DV.DeviceLinking.Systems;

public sealed class DeadMansSignallerSystem : EntitySystem
{
[Dependency] private readonly DeviceLinkSystem _link = default!;
[Dependency] private readonly ItemToggleSystem _toggle = default!;

public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<DeadMansSignallerComponent, GotUnequippedHandEvent>(DeadMans);
}

private void DeadMans(Entity<DeadMansSignallerComponent> ent, ref GotUnequippedHandEvent args)
{
if (_toggle.IsActivated(ent.Owner))
{
_link.InvokePort(ent.Owner, ent.Comp.Port);
}
}
}
5 changes: 4 additions & 1 deletion Resources/Locale/en-US/_DV/store/uplink-catalog.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,7 @@ uplink-storage-implanter-delta-desc = Hide goodies inside of yourself with new b
uplink-hardsuit-syndieelite-delta-name = Syndicate Thermal Hardsuit
uplink-objective-syndicate-board-name = Syndicate law board
uplink-objective-syndicate-board-desc = Its expensive, don't lose it!
uplink-objective-syndicate-board-desc = Its expensive, don't lose it!
uplink-dead-mans-signaller-name = Dead Man's Signaller
uplink-dead-mans-signaller-desc = A device that if armed, will send a signal to any linked devices (such as bombs) when it is dropped or put away.
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@
- FultonBeacon
- PowerCellHyper
- FireExtinguisherBluespace
- SignallerDeadMans
# End DeltaV additions
- EnergyScalpel # Shitmed Change
- EnergyCautery # Shitmed Change
Expand Down
1 change: 1 addition & 0 deletions Resources/Prototypes/Research/arsenal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
- FlashPayload
- ExplosivePayload
- ChemicalPayload
- SignallerDeadMans # DeltaV - Dead Man's Signaller

- type: technology
id: SpecialMeans
Expand Down
13 changes: 13 additions & 0 deletions Resources/Prototypes/_DV/Catalog/uplink_catalog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,16 @@
blacklist:
components:
- SurplusBundle

- type: listing
id: UplinkDeadMansSignaller
name: uplink-dead-mans-signaller-name
description: uplink-dead-mans-signaller-desc
productEntity: DeadMansSignaler
discountCategory: rareDiscounts
discountDownTo:
Telecrystal: 1
cost:
Telecrystal: 2
categories:
- UplinkDisruption
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#This signaller device will send a signal if it is dropped while activated

- type: entity
parent: RemoteSignaller
id: DeadMansSignaler
name: dead man's signaler
description: A device that if armed will send signals to objects within 50 meters when dropped or put away.
components:
- type: DeadMansSignaller
- type: ItemToggle
- type: Sprite
drawdepth: Items
sprite: _DV/Objects/Devices/deadmanssignaller.rsi
layers:
- state: inactive
map: [ "enum.ToggleVisuals.Layer" ]
- type: Appearance
- type: GenericVisualizer
visuals:
enum.ToggleVisuals.Toggled:
enum.ToggleVisuals.Layer:
True: {state: active}
False: {state: inactive}
- type: WirelessNetworkConnection
range: 50
9 changes: 9 additions & 0 deletions Resources/Prototypes/_DV/Recipes/Lathes/devices.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,12 @@
Silver: 750
Plasma: 500
Bluespace: 100

- type: latheRecipe
parent: BasePartRecipe
id: SignallerDeadMans
result: DeadMansSignaler
materials:
Steel: 100
Plastic: 200
Plasma: 100
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "signaller state taken from /vg/station at commit https://github.com/vgstation-coders/vgstation13/commit/2c980a1f423f26e990a578bae057d1eca19675ec. inhands & advanced made by Flaregy for Space Station 14. Dead Man's Signaller is modified from signaller",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "active"
},
{
"name": "inactive"
},
{
"name": "inhand-left",
"directions": 4
},
{
"name": "inhand-right",
"directions": 4
}
]
}

0 comments on commit c1a23e1

Please sign in to comment.