mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 03:55:11 +01:00
[MIRROR] Fixes balloon alert runtime when finishing a mod suit [MDB IGNORE] (#20724)
* Fixes balloon alert runtime when finishing a mod suit (#74891) ## About The Pull Request Fixes this  Caused by this  Which is caused when you finish a mod suit by adding plating to it. It does not show up in the stack trace because `/obj/item/mod/construction/shell ` is deleted when you add plating to create the final mod suit. https://github.com/tgstation/tgstation/blob/6a83ad76e7cdd0c63f24c402d3a25063cdec04b7/code/modules/mod/mod_construction.dm#L234-L238 because the src is deleted, by the time balloon alert executes via async it adds a timer on the deleted mod core causing the runtime. ## Changelog 🆑 fix: balloon alert adding timer on deleted mod core after construction causing runtime. /🆑 * Fixes balloon alert runtime when finishing a mod suit --------- Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
This commit is contained in:
@@ -231,11 +231,11 @@
|
||||
if(!user.transferItemToLoc(part, src))
|
||||
return
|
||||
playsound(src, 'sound/machines/click.ogg', 30, TRUE)
|
||||
balloon_alert(user, "suit finished")
|
||||
var/obj/item/mod = new /obj/item/mod/control(drop_location(), external_plating.theme, null, core)
|
||||
core = null
|
||||
qdel(src)
|
||||
user.put_in_hands(mod)
|
||||
mod.balloon_alert(user, "suit finished")
|
||||
else if(part.tool_behaviour == TOOL_SCREWDRIVER) //Construct
|
||||
if(part.use_tool(src, user, 0, volume=30))
|
||||
balloon_alert(user, "assembly unscrewed")
|
||||
|
||||
Reference in New Issue
Block a user