[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.
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;
},
});
}
-
- 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 OnTimerUse(EntityUid uid, OnUseTimerTriggerComponent component, UseInHandEvent args)
{
- if (args.Handled || HasComp<AutomatedTimerComponent>(uid))
+ if (args.Handled || HasComp<AutomatedTimerComponent>(uid) || component.UseVerbInstead)
return;
HandleTimerTrigger(
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
- 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
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
{
"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",