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")]
|
[DataField("beepInterval")]
|
||||||
public float BeepInterval = 1;
|
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>
|
/// <summary>
|
||||||
/// Should timer be started when it was stuck to another entity.
|
/// Should timer be started when it was stuck to another entity.
|
||||||
/// Used for C4 charges and similar behaviour.
|
/// Used for C4 charges and similar behaviour.
|
||||||
|
|||||||
@@ -48,6 +48,32 @@ public sealed partial class TriggerSystem
|
|||||||
if (!args.CanInteract || !args.CanAccess)
|
if (!args.CanInteract || !args.CanAccess)
|
||||||
return;
|
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)
|
if (component.DelayOptions == null || component.DelayOptions.Count == 1)
|
||||||
return;
|
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)
|
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)
|
private void OnTimerUse(EntityUid uid, OnUseTimerTriggerComponent component, UseInHandEvent args)
|
||||||
{
|
{
|
||||||
if (args.Handled || HasComp<AutomatedTimerComponent>(uid))
|
if (args.Handled || HasComp<AutomatedTimerComponent>(uid) || component.UseVerbInstead)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
HandleTimerTrigger(
|
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.
|
popup-trigger-timer-set = Timer set to {$time} seconds.
|
||||||
|
|
||||||
|
verb-start-detonation = Start detonation
|
||||||
|
|
||||||
verb-toggle-start-on-stick = Toggle auto-activation
|
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-off = The device will no longer activate automatically when planted
|
||||||
popup-start-on-stick-on = The device will now activate automatically when planted
|
popup-start-on-stick-on = The device will now activate automatically when planted
|
||||||
|
|||||||
@@ -196,33 +196,30 @@
|
|||||||
- type: entity
|
- type: entity
|
||||||
name: wet floor sign
|
name: wet floor sign
|
||||||
id: WetFloorSign
|
id: WetFloorSign
|
||||||
parent: BaseItem
|
parent: ClothingOuterBase
|
||||||
description: Caution! Wet Floor!
|
description: Caution! Wet Floor!
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Objects/Specific/Janitorial/wet_floor_sign.rsi
|
sprite: Objects/Specific/Janitorial/wet_floor_sign.rsi
|
||||||
state: caution
|
|
||||||
- type: Item
|
- type: Item
|
||||||
sprite: Objects/Specific/Janitorial/wet_floor_sign.rsi
|
sprite: Objects/Specific/Janitorial/wet_floor_sign.rsi
|
||||||
size: 15
|
size: 15
|
||||||
|
- type: Armor
|
||||||
|
modifiers:
|
||||||
|
coefficients:
|
||||||
|
Blunt: 0.95
|
||||||
|
Slash: 0.95
|
||||||
- type: Tag
|
- type: Tag
|
||||||
tags:
|
tags:
|
||||||
- WetFloorSign
|
- WetFloorSign
|
||||||
|
- WhitelistChameleon
|
||||||
|
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
name: wet floor sign
|
|
||||||
suffix: Explosive
|
suffix: Explosive
|
||||||
description: Caution! Wet Floor!
|
parent: WetFloorSign
|
||||||
parent: BaseItem
|
|
||||||
id: WetFloorSignMineExplosive
|
id: WetFloorSignMineExplosive
|
||||||
components:
|
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
|
- type: StepTrigger
|
||||||
intersectRatio: 0.2
|
intersectRatio: 0.2
|
||||||
requiredTriggeredSpeed: 0
|
requiredTriggeredSpeed: 0
|
||||||
@@ -254,6 +251,16 @@
|
|||||||
totalIntensity: 60 # about a ~3 tile radius
|
totalIntensity: 60 # about a ~3 tile radius
|
||||||
canCreateVacuum: false
|
canCreateVacuum: false
|
||||||
- type: DeleteOnTrigger
|
- 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
|
- type: entity
|
||||||
name: janitorial trolley
|
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,
|
"version": 1,
|
||||||
"license": "CC-BY-SA-3.0",
|
"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": {
|
"size": {
|
||||||
"x": 32,
|
"x": 32,
|
||||||
"y": 32
|
"y": 32
|
||||||
},
|
},
|
||||||
"states": [
|
"states": [
|
||||||
{
|
{
|
||||||
"name": "caution"
|
"name": "icon"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "equipped-OUTERCLOTHING",
|
||||||
|
"directions": 4
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "inhand-left",
|
"name": "inhand-left",
|
||||||
|
|||||||