Constructing Railings

Allow players to construct railings of their very own, unfasten them from the flooring, deconstruct them including with RCDs, and all the good stuff from grilles, like electrification. Also solves the bug whereby you could climb over railings into solid tiles.
This commit is contained in:
Haha26315
2022-09-07 23:36:07 -04:00
parent e5a6425321
commit 52cce9fbce
5 changed files with 180 additions and 16 deletions
+1 -1
View File
@@ -489,7 +489,7 @@ RLD
to_chat(user, "<span class='notice'>You change RCD's mode to '[choice]'.</span>")
/obj/item/construction/rcd/proc/target_check(atom/A, mob/user) // only returns true for stuff the device can actually work with
if((isturf(A) && A.density && mode==RCD_DECONSTRUCT) || (isturf(A) && !A.density) || (istype(A, /obj/machinery/door/airlock) && mode==RCD_DECONSTRUCT) || istype(A, /obj/structure/grille) || (istype(A, /obj/structure/window) && mode==RCD_DECONSTRUCT) || istype(A, /obj/structure/girder))
if((isturf(A) && A.density && mode==RCD_DECONSTRUCT) || (isturf(A) && !A.density) || (istype(A, /obj/machinery/door/airlock) && mode==RCD_DECONSTRUCT) || istype(A, /obj/structure/grille) || (istype(A, /obj/structure/window) && mode==RCD_DECONSTRUCT) || istype(A, /obj/structure/girder) || (istype(A, /obj/structure/railing) && mode==RCD_DECONSTRUCT))
return TRUE
else
return FALSE
+6 -1
View File
@@ -1,5 +1,10 @@
GLOBAL_LIST_INIT(rod_recipes, list ( \
new/datum/stack_recipe("grille", /obj/structure/grille, 2, time = 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe_list("railings", \
list( \
new/datum/stack_recipe("railing", /obj/structure/railing/unachored, 1, time = 10, one_per_turf = 0, on_floor = 1, window_checks = 1), \
new/datum/stack_recipe("handrail", /obj/structure/railing/handrail/unachored, 1, time = 10, one_per_turf = 0, on_floor = 1, window_checks = 1), \
)), \
new/datum/stack_recipe("table frame", /obj/structure/table_frame, 2, time = 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("scooter frame", /obj/item/scooter_frame, 10, time = 25, one_per_turf = 0), \
))
@@ -25,7 +30,7 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \
/obj/item/stack/rods/suicide_act(mob/living/carbon/user)
user.visible_message("<span class='suicide'>[user] begins to stuff \the [src] down [user.p_their()] throat! It looks like [user.p_theyre()] trying to commit suicide!</span>")//it looks like theyre ur mum
return BRUTELOSS
/obj/item/stack/rods/Initialize(mapload, new_amount, merge = TRUE)
. = ..()