Skip to content

Commit

Permalink
RCD deconstruction is not cancelled by UI changes (tgstation#88117)
Browse files Browse the repository at this point in the history
## About The Pull Request
- Fixes tgstation#88108

## Changelog
:cl:
fix: rcd deconstruction is not cancelled by UI changes
/:cl:
  • Loading branch information
SyncIt21 authored Nov 25, 2024
1 parent c4a18fd commit 163d6c7
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions code/game/objects/items/rcd/RCD.dm
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,17 @@

return TRUE

/obj/item/construction/rcd/build_delay(mob/user, delay, atom/target)
//unaffected by ui changes
if(mode == RCD_DECONSTRUCT)
if(delay <= 0)
return TRUE

return do_after(user, delay, target)

//checks for ui changes
return ..()

/**
* actual proc to create the structure
*
Expand Down Expand Up @@ -249,6 +260,8 @@
* * rcd_results- list of params which contains the cost & build mode to create the structure
*/
/obj/item/construction/rcd/proc/_rcd_create_effect(atom/target, mob/user, delay, list/rcd_results)
PRIVATE_PROC(TRUE)

var/obj/effect/constructing_effect/rcd_effect = new(get_turf(target), delay, rcd_results["[RCD_DESIGN_MODE]"], upgrade)

//resource & structure placement sanity checks before & after delay along with beam effects
Expand Down

0 comments on commit 163d6c7

Please sign in to comment.