From b39f93a9ccc74cbff6e785e0efb2ca8894aa3aab Mon Sep 17 00:00:00 2001 From: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> Date: Thu, 11 May 2023 07:58:30 +0530 Subject: [PATCH] RCD no longer deletes a spawned wall mount frame if it cannot place it on the wall (#75151) ## About The Pull Request So if you try to put a wall mount frame (APC, Air Alarm, Fire Alarm) on a wall and for whatever reason (say if the area is unpowered, or there already is a wall mount there) you fail then nothing happens, you get to keep that wall mount frame (APC frame, Air alarm frame, Fire alarm frame) and try again with it elsewhere. But if you try to install these wall mounts with an RCD(with machine frames upgrade) and if it fails for the same reasons then not only do you lose rcd matter but the temporary spawned wall mount frame is also deleted so it's a major lose on both sides. Now that's no longer the case, you get to keep that spawned wall mount frame and try again with it elsewhere if you wish. This also solves some runtimes with balloon alerts, since the wall mount was deleted the balloon alert added a timer on the deleted wall mount causing runtimes Also removed a useless to_chat message saying you scraped a wall even though we obviously can see that. ## Changelog :cl: qol: RCD spawned apc, air alarm, fire alarm frames are no longer deleted if the wall mount operation fails. fix: balloon alert run timing on deleted wall mount frame spawned by an RCD. /:cl: --- code/game/turfs/closed/walls.dm | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/code/game/turfs/closed/walls.dm b/code/game/turfs/closed/walls.dm index 789cae54939..9e4f6248659 100644 --- a/code/game/turfs/closed/walls.dm +++ b/code/game/turfs/closed/walls.dm @@ -284,12 +284,8 @@ switch(passed_mode) if(RCD_WALLFRAME) var/obj/item/wallframe/new_wallmount = new the_rcd.wallframe_type(user.drop_location()) - if(!try_wallmount(new_wallmount, user, src)) - qdel(new_wallmount) - return FALSE - return TRUE + return try_wallmount(new_wallmount, user, src) if(RCD_DECONSTRUCT) - to_chat(user, span_notice("You deconstruct the wall.")) ScrapeAway() return TRUE return FALSE