mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-15 00:53:23 +01:00
Fixes a runtime with loader modsuits dropping crates (#25727)
* stacking do_afters is the source of all evil * Update code/modules/mod/modules/modules_supply.dm Signed-off-by: Luc <89928798+lewcc@users.noreply.github.com> --------- Signed-off-by: Luc <89928798+lewcc@users.noreply.github.com> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
This commit is contained in:
@@ -58,7 +58,7 @@
|
||||
if(target_turf.density)
|
||||
return
|
||||
playsound(src, 'sound/mecha/hydraulic.ogg', 25, TRUE)
|
||||
if(!do_after(mod.wearer, load_time, target = target))
|
||||
if(!do_after(mod.wearer, load_time, target = target, extra_checks = list(CALLBACK(src, TYPE_PROC_REF(/obj/item/mod/module/clamp, should_cancel_drop)))))
|
||||
return
|
||||
if(target_turf.density)
|
||||
return
|
||||
@@ -86,6 +86,10 @@
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/// Checks if the target crate has already been dropped by another on_select_use call
|
||||
/obj/item/mod/module/clamp/proc/should_cancel_drop()
|
||||
return !length(stored_crates)
|
||||
|
||||
/obj/item/mod/module/clamp/loader
|
||||
name = "MOD loader hydraulic clamp module"
|
||||
icon_state = "clamp_loader"
|
||||
|
||||
Reference in New Issue
Block a user