Merge pull request #15390 from jakeramsay007/mixing-strings-and-integers-makes-coders-very-sad

Fixes grenade timer changes
This commit is contained in:
Lin
2021-11-22 17:47:12 +00:00
committed by GitHub
2 changed files with 7 additions and 10 deletions
@@ -59,9 +59,6 @@
I.play_tool_sound(src, 25)
else
to_chat(user, "<span class='warning'>You need to add at least one beaker before locking the [initial(name)] assembly!</span>")
else if(stage == READY && !nadeassembly)
det_time = det_time == 50 ? 30 : 50 //toggle between 30 and 50
to_chat(user, "<span class='notice'>You modify the time delay. It's set for [DisplayTimeText(det_time)].</span>")
else if(stage == EMPTY)
to_chat(user, "<span class='warning'>You need to add an activation mechanism!</span>")
+7 -7
View File
@@ -135,16 +135,16 @@
/obj/item/grenade/tool_act(mob/living/user, obj/item/I, tool_behaviour)
if(tool_behaviour == TOOL_SCREWDRIVER)
switch(det_time)
if ("1")
det_time = 10
if(1)
det_time = 1 SECONDS
to_chat(user, "<span class='notice'>You set the [name] for 1 second detonation time.</span>")
if ("10")
det_time = 30
if(1 SECONDS)
det_time = 3 SECONDS
to_chat(user, "<span class='notice'>You set the [name] for 3 second detonation time.</span>")
if ("30")
det_time = 50
if(3 SECONDS)
det_time = 5 SECONDS
to_chat(user, "<span class='notice'>You set the [name] for 5 second detonation time.</span>")
if ("50")
if(5 SECONDS)
det_time = 1
to_chat(user, "<span class='notice'>You set the [name] for instant detonation.</span>")
add_fingerprint(user)