mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 00:29:02 +01:00
[s] Fixes IED timer exploit (#47774)
This commit is contained in:
@@ -55,6 +55,9 @@
|
||||
explosion(src.loc,-1,-1,2, flame_range = 4) // small explosion, plus a very large fireball.
|
||||
qdel(src)
|
||||
|
||||
/obj/item/grenade/iedcasing/change_det_time()
|
||||
return //always be random.
|
||||
|
||||
/obj/item/grenade/iedcasing/examine(mob/user)
|
||||
. = ..()
|
||||
. += "You can't tell when it will explode!"
|
||||
|
||||
@@ -87,18 +87,19 @@
|
||||
if(W.tool_behaviour == TOOL_MULTITOOL)
|
||||
var/newtime = text2num(stripped_input(user, "Please enter a new detonation time", name))
|
||||
if (newtime != null && user.canUseTopic(src, BE_CLOSE))
|
||||
change_det_time(newtime)
|
||||
to_chat(user, "<span class='notice'>You modify the time delay. It's set for [DisplayTimeText(det_time)].</span>")
|
||||
if (round(newtime * 10) != det_time)
|
||||
to_chat(user, "<span class='warning'>The new value is out of bounds. The lowest possible time is 3 seconds and highest is 5 seconds. Instant detonations are also possible.</span>")
|
||||
if(change_det_time(newtime))
|
||||
to_chat(user, "<span class='notice'>You modify the time delay. It's set for [DisplayTimeText(det_time)].</span>")
|
||||
if (round(newtime * 10) != det_time)
|
||||
to_chat(user, "<span class='warning'>The new value is out of bounds. The lowest possible time is 3 seconds and highest is 5 seconds. Instant detonations are also possible.</span>")
|
||||
return
|
||||
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
change_det_time()
|
||||
to_chat(user, "<span class='notice'>You modify the time delay. It's set for [DisplayTimeText(det_time)].</span>")
|
||||
if(change_det_time())
|
||||
to_chat(user, "<span class='notice'>You modify the time delay. It's set for [DisplayTimeText(det_time)].</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/grenade/proc/change_det_time(time) //Time uses real time.
|
||||
. = TRUE
|
||||
if(time != null)
|
||||
if(time < 3)
|
||||
time = 3
|
||||
|
||||
Reference in New Issue
Block a user