Dead Man's Signaller (#2775)
* 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
This commit is contained in:
parent
190521d96d
commit
c1a23e1a97
|
|
@ -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";
|
||||
}
|
||||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -376,6 +376,7 @@
|
|||
- FultonBeacon
|
||||
- PowerCellHyper
|
||||
- FireExtinguisherBluespace
|
||||
- SignallerDeadMans
|
||||
# End DeltaV additions
|
||||
- EnergyScalpel # Shitmed Change
|
||||
- EnergyCautery # Shitmed Change
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@
|
|||
- FlashPayload
|
||||
- ExplosivePayload
|
||||
- ChemicalPayload
|
||||
- SignallerDeadMans # DeltaV - Dead Man's Signaller
|
||||
|
||||
- type: technology
|
||||
id: SpecialMeans
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 408 B |
Binary file not shown.
|
After Width: | Height: | Size: 364 B |
Binary file not shown.
|
After Width: | Height: | Size: 331 B |
Binary file not shown.
|
After Width: | Height: | Size: 328 B |
|
|
@ -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
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Reference in New Issue