-
Notifications
You must be signed in to change notification settings - Fork 380
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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
Showing
13 changed files
with
119 additions
and
1 deletion.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
Content.Server/_DV/DeviceLinking/Components/DeadMansSignallerComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; | ||
} |
27 changes: 27 additions & 0 deletions
27
Content.Server/_DV/DeviceLinking/Systems/DeadMansSignallerSystem.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
Resources/Prototypes/_DV/Entities/Objects/Devices/Electronics/dead-mans-signaller.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+408 Bytes
Resources/Textures/_DV/Objects/Devices/deadmanssignaller.rsi/active.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+364 Bytes
Resources/Textures/_DV/Objects/Devices/deadmanssignaller.rsi/inactive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+331 Bytes
Resources/Textures/_DV/Objects/Devices/deadmanssignaller.rsi/inhand-left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+328 Bytes
Resources/Textures/_DV/Objects/Devices/deadmanssignaller.rsi/inhand-right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions
25
Resources/Textures/_DV/Objects/Devices/deadmanssignaller.rsi/meta.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
] | ||
} |