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
@@ -29,6 +29,12 @@ namespace Content.Server.Explosion.Components
|
||||
[DataField("beepInterval")]
|
||||
public float BeepInterval = 1;
|
||||
|
||||
/// <summary>
|
||||
/// Whether the timer should instead be activated through a verb in the right-click menu
|
||||
/// </summary>
|
||||
[DataField("useVerbInstead")]
|
||||
public bool UseVerbInstead = false;
|
||||
|
||||
/// <summary>
|
||||
/// Should timer be started when it was stuck to another entity.
|
||||
/// Used for C4 charges and similar behaviour.
|
||||
|
||||
@@ -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<AutomatedTimerComponent>(uid))
|
||||
if (args.Handled || HasComp<AutomatedTimerComponent>(uid) || component.UseVerbInstead)
|
||||
return;
|
||||
|
||||
HandleTimerTrigger(
|
||||
|
||||
BIN
Resources/Audio/Items/Janitor/floor_sign_beep.ogg
Normal file
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
Before Width: | Height: | Size: 234 B |
|
After Width: | Height: | Size: 415 B |
|
After Width: | Height: | Size: 251 B |
|
Before Width: | Height: | Size: 347 B After Width: | Height: | Size: 329 B |
|
Before Width: | Height: | Size: 366 B After Width: | Height: | Size: 329 B |
@@ -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",
|
||||
|
||||