From: Psychpsyo <60073468+Psychpsyo@users.noreply.github.com>
Date: Thu, 28 Sep 2023 04:09:44 +0000 (+0200)
Subject: Wearable Wet Floor Sign and 'Janitorial Suicide Vest' (#20311)
X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=008f2d9d1c7900c452789e61344782541467b13e;p=space-station-14.git
Wearable Wet Floor Sign and 'Janitorial Suicide Vest' (#20311)
* Explosive wet floor sign & janitorial suicide vest
* fix attributions
* Remove name & desc from explosive wet floor sign
* Make wet floor sign chameleonable
---
diff --git a/Content.Server/Explosion/Components/OnUseTimerTriggerComponent.cs b/Content.Server/Explosion/Components/OnUseTimerTriggerComponent.cs
index 008bbbe284..f2e94239a0 100644
--- a/Content.Server/Explosion/Components/OnUseTimerTriggerComponent.cs
+++ b/Content.Server/Explosion/Components/OnUseTimerTriggerComponent.cs
@@ -29,6 +29,12 @@ namespace Content.Server.Explosion.Components
[DataField("beepInterval")]
public float BeepInterval = 1;
+ ///
+ /// Whether the timer should instead be activated through a verb in the right-click menu
+ ///
+ [DataField("useVerbInstead")]
+ public bool UseVerbInstead = false;
+
///
/// Should timer be started when it was stuck to another entity.
/// Used for C4 charges and similar behaviour.
diff --git a/Content.Server/Explosion/EntitySystems/TriggerSystem.OnUse.cs b/Content.Server/Explosion/EntitySystems/TriggerSystem.OnUse.cs
index 1a3323b1ce..fb1f72eb44 100644
--- a/Content.Server/Explosion/EntitySystems/TriggerSystem.OnUse.cs
+++ b/Content.Server/Explosion/EntitySystems/TriggerSystem.OnUse.cs
@@ -48,6 +48,32 @@ public sealed partial class TriggerSystem
if (!args.CanInteract || !args.CanAccess)
return;
+ if (component.UseVerbInstead)
+ {
+ args.Verbs.Add(new AlternativeVerb()
+ {
+ Text = Loc.GetString("verb-start-detonation"),
+ Act = () => HandleTimerTrigger(
+ uid,
+ args.User,
+ component.Delay,
+ component.BeepInterval,
+ component.InitialBeepDelay,
+ component.BeepSound
+ ),
+ Priority = 2
+ });
+ }
+
+ if (component.AllowToggleStartOnStick)
+ {
+ args.Verbs.Add(new AlternativeVerb()
+ {
+ Text = Loc.GetString("verb-toggle-start-on-stick"),
+ Act = () => ToggleStartOnStick(uid, args.User, component)
+ });
+ }
+
if (component.DelayOptions == null || component.DelayOptions.Count == 1)
return;
@@ -86,15 +112,6 @@ public sealed partial class TriggerSystem
},
});
}
-
- if (component.AllowToggleStartOnStick)
- {
- args.Verbs.Add(new AlternativeVerb()
- {
- Text = Loc.GetString("verb-toggle-start-on-stick"),
- Act = () => ToggleStartOnStick(uid, args.User, component)
- });
- }
}
private void CycleDelay(OnUseTimerTriggerComponent component, EntityUid user)
@@ -140,7 +157,7 @@ public sealed partial class TriggerSystem
private void OnTimerUse(EntityUid uid, OnUseTimerTriggerComponent component, UseInHandEvent args)
{
- if (args.Handled || HasComp(uid))
+ if (args.Handled || HasComp(uid) || component.UseVerbInstead)
return;
HandleTimerTrigger(
diff --git a/Resources/Audio/Items/Janitor/floor_sign_beep.ogg b/Resources/Audio/Items/Janitor/floor_sign_beep.ogg
new file mode 100644
index 0000000000..25f68be1c3
Binary files /dev/null and b/Resources/Audio/Items/Janitor/floor_sign_beep.ogg differ
diff --git a/Resources/Locale/en-US/weapons/grenades/timer-trigger.ftl b/Resources/Locale/en-US/weapons/grenades/timer-trigger.ftl
index 76861c8b4f..77e2dd938d 100644
--- a/Resources/Locale/en-US/weapons/grenades/timer-trigger.ftl
+++ b/Resources/Locale/en-US/weapons/grenades/timer-trigger.ftl
@@ -7,6 +7,8 @@ examine-trigger-timer = The timer is set to {$time} seconds.
popup-trigger-timer-set = Timer set to {$time} seconds.
+verb-start-detonation = Start detonation
+
verb-toggle-start-on-stick = Toggle auto-activation
popup-start-on-stick-off = The device will no longer activate automatically when planted
popup-start-on-stick-on = The device will now activate automatically when planted
diff --git a/Resources/Prototypes/Entities/Objects/Specific/Janitorial/janitor.yml b/Resources/Prototypes/Entities/Objects/Specific/Janitorial/janitor.yml
index 13bd6d1665..3ae89e0d1c 100644
--- a/Resources/Prototypes/Entities/Objects/Specific/Janitorial/janitor.yml
+++ b/Resources/Prototypes/Entities/Objects/Specific/Janitorial/janitor.yml
@@ -196,33 +196,30 @@
- type: entity
name: wet floor sign
id: WetFloorSign
- parent: BaseItem
+ parent: ClothingOuterBase
description: Caution! Wet Floor!
components:
- type: Sprite
sprite: Objects/Specific/Janitorial/wet_floor_sign.rsi
- state: caution
- type: Item
sprite: Objects/Specific/Janitorial/wet_floor_sign.rsi
size: 15
+ - type: Armor
+ modifiers:
+ coefficients:
+ Blunt: 0.95
+ Slash: 0.95
- type: Tag
tags:
- WetFloorSign
+ - WhitelistChameleon
- type: entity
- name: wet floor sign
suffix: Explosive
- description: Caution! Wet Floor!
- parent: BaseItem
+ parent: WetFloorSign
id: WetFloorSignMineExplosive
components:
- - type: Sprite
- sprite: Objects/Specific/Janitorial/wet_floor_sign.rsi
- state: caution
- - type: Item
- sprite: Objects/Specific/Janitorial/wet_floor_sign.rsi
- size: 15
- type: StepTrigger
intersectRatio: 0.2
requiredTriggeredSpeed: 0
@@ -254,6 +251,16 @@
totalIntensity: 60 # about a ~3 tile radius
canCreateVacuum: false
- type: DeleteOnTrigger
+ - type: OnUseTimerTrigger
+ useVerbInstead: true
+ beepInterval: .25
+ beepSound: /Audio/Items/Janitor/floor_sign_beep.ogg
+ params:
+ volume: 1
+ examinable: false
+ - type: Tag
+ tags: # ignore "WhitelistChameleon" tag
+ - WetFloorSign
- type: entity
name: janitorial trolley
diff --git a/Resources/Textures/Objects/Specific/Janitorial/wet_floor_sign.rsi/caution.png b/Resources/Textures/Objects/Specific/Janitorial/wet_floor_sign.rsi/caution.png
deleted file mode 100644
index fdd5c1d2cb..0000000000
Binary files a/Resources/Textures/Objects/Specific/Janitorial/wet_floor_sign.rsi/caution.png and /dev/null differ
diff --git a/Resources/Textures/Objects/Specific/Janitorial/wet_floor_sign.rsi/equipped-OUTERCLOTHING.png b/Resources/Textures/Objects/Specific/Janitorial/wet_floor_sign.rsi/equipped-OUTERCLOTHING.png
new file mode 100644
index 0000000000..96667a706b
Binary files /dev/null and b/Resources/Textures/Objects/Specific/Janitorial/wet_floor_sign.rsi/equipped-OUTERCLOTHING.png differ
diff --git a/Resources/Textures/Objects/Specific/Janitorial/wet_floor_sign.rsi/icon.png b/Resources/Textures/Objects/Specific/Janitorial/wet_floor_sign.rsi/icon.png
new file mode 100644
index 0000000000..204e8b8813
Binary files /dev/null and b/Resources/Textures/Objects/Specific/Janitorial/wet_floor_sign.rsi/icon.png differ
diff --git a/Resources/Textures/Objects/Specific/Janitorial/wet_floor_sign.rsi/inhand-left.png b/Resources/Textures/Objects/Specific/Janitorial/wet_floor_sign.rsi/inhand-left.png
index aa3d9fc9c1..ed1e8946e7 100644
Binary files a/Resources/Textures/Objects/Specific/Janitorial/wet_floor_sign.rsi/inhand-left.png and b/Resources/Textures/Objects/Specific/Janitorial/wet_floor_sign.rsi/inhand-left.png differ
diff --git a/Resources/Textures/Objects/Specific/Janitorial/wet_floor_sign.rsi/inhand-right.png b/Resources/Textures/Objects/Specific/Janitorial/wet_floor_sign.rsi/inhand-right.png
index 286dec22cd..355d215fcd 100644
Binary files a/Resources/Textures/Objects/Specific/Janitorial/wet_floor_sign.rsi/inhand-right.png and b/Resources/Textures/Objects/Specific/Janitorial/wet_floor_sign.rsi/inhand-right.png differ
diff --git a/Resources/Textures/Objects/Specific/Janitorial/wet_floor_sign.rsi/meta.json b/Resources/Textures/Objects/Specific/Janitorial/wet_floor_sign.rsi/meta.json
index bc202f443a..75c381313e 100644
--- a/Resources/Textures/Objects/Specific/Janitorial/wet_floor_sign.rsi/meta.json
+++ b/Resources/Textures/Objects/Specific/Janitorial/wet_floor_sign.rsi/meta.json
@@ -1,14 +1,18 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
- "copyright": "Taken from tgstation at https://github.com/tgstation/tgstation/commit/f8f4aeda930fcd0805ca4cc76d9bc9412a5b3428",
+ "copyright": "Taken from tgstation at https://github.com/tgstation/tgstation/commit/da42afcbaeaa04e5ba288ade027c011efb3ef0ab, modified by Skarlet and Psychpsyo",
"size": {
"x": 32,
"y": 32
},
"states": [
{
- "name": "caution"
+ "name": "icon"
+ },
+ {
+ "name": "equipped-OUTERCLOTHING",
+ "directions": 4
},
{
"name": "inhand-left",