mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
[NO GBP]RCD can build directional windows on top of existing grills (#79864)
## About The Pull Request - Fixes https://github.com/Skyrat-SS13/Skyrat-tg/issues/23788 So after #77858 was merged an unintentional side effect was rcd could no longer build directional windows on grills if they already existed on the turf. Sure rcd won't build a grill and then build a directional window on top of that but if a grill already exists on the turf the rcd should still be able to build directional windows on that grill as it helps in repairing mapped in directional windows and such. If you want to build a grill first set the mode to full tile window, build the grill and then switch to directional window to build a window on top of that grill. Or just select directional window mode and build the windows directly without a grill, choice is yours ## Changelog 🆑 fix: RCD can build directional windows on top of existing grills & without them. /🆑
This commit is contained in:
@@ -68,7 +68,13 @@
|
||||
var/cost = 0
|
||||
var/delay = 0
|
||||
|
||||
if(the_rcd.rcd_design_path == /obj/structure/window/fulltile)
|
||||
if(the_rcd.rcd_design_path == /obj/structure/window)
|
||||
cost = 4
|
||||
delay = 2 SECONDS
|
||||
else if(the_rcd.rcd_design_path == /obj/structure/window/reinforced)
|
||||
cost = 6
|
||||
delay = 2.5 SECONDS
|
||||
else if(the_rcd.rcd_design_path == /obj/structure/window/fulltile)
|
||||
cost = 8
|
||||
delay = 3 SECONDS
|
||||
else if(the_rcd.rcd_design_path == /obj/structure/window/reinforced/fulltile)
|
||||
@@ -101,8 +107,13 @@
|
||||
var/obj/structure/window/window_path = rcd_data["[RCD_DESIGN_PATH]"]
|
||||
if(!ispath(window_path))
|
||||
CRASH("Invalid window path type in RCD: [window_path]")
|
||||
if(!initial(window_path.fulltile)) //only fulltile windows can be built here
|
||||
return FALSE
|
||||
|
||||
//checks if its a valid build direction
|
||||
if(!initial(window_path.fulltile))
|
||||
if(!valid_build_direction(loc, user.dir, is_fulltile = FALSE))
|
||||
balloon_alert(user, "window already here!")
|
||||
return FALSE
|
||||
|
||||
var/obj/structure/window/WD = new window_path(T, user.dir)
|
||||
WD.set_anchored(TRUE)
|
||||
return TRUE
|
||||
|
||||
Reference in New Issue
Block a user