mirror of
https://github.com/quotefox/Hyper-Station-13.git
synced 2026-08-29 07:36:16 +01:00
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:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
armor = list("melee" = 50, "bullet" = 70, "laser" = 70, "energy" = 100, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 0, "acid" = 0)
|
||||
max_integrity = 50
|
||||
integrity_failure = 20
|
||||
var/rods_type = /obj/item/stack/rods
|
||||
var/rods_amount = 2
|
||||
var/buildstacktype = /obj/item/stack/rods
|
||||
var/buildstackamount = 2
|
||||
var/rods_broken = TRUE
|
||||
var/grille_type = null
|
||||
var/broken_type = /obj/structure/grille/broken
|
||||
@@ -84,7 +84,7 @@
|
||||
|
||||
/obj/structure/grille/attack_animal(mob/user)
|
||||
. = ..()
|
||||
if(!shock(user, 70) && !QDELETED(src)) //Last hit still shocks but shouldn't deal damage to the grille)
|
||||
if(!shock(user, 70) && !QDELETED(src)) //Last hit still shocks but shouldn't deal damage to the grille.
|
||||
take_damage(rand(5,10), BRUTE, "melee", 1)
|
||||
|
||||
/obj/structure/grille/attack_paw(mob/user)
|
||||
@@ -217,7 +217,7 @@
|
||||
if(!loc) //if already qdel'd somehow, we do nothing
|
||||
return
|
||||
if(!(flags_1&NODECONSTRUCT_1))
|
||||
var/obj/R = new rods_type(drop_location(), rods_amount)
|
||||
var/obj/R = new buildstacktype(drop_location(), buildstackamount)
|
||||
transfer_fingerprints_to(R)
|
||||
qdel(src)
|
||||
..()
|
||||
@@ -225,7 +225,7 @@
|
||||
/obj/structure/grille/obj_break()
|
||||
if(!broken && !(flags_1 & NODECONSTRUCT_1))
|
||||
new broken_type(src.loc)
|
||||
var/obj/R = new rods_type(drop_location(), rods_broken)
|
||||
var/obj/R = new buildstacktype(drop_location(), rods_broken)
|
||||
transfer_fingerprints_to(R)
|
||||
qdel(src)
|
||||
|
||||
@@ -279,7 +279,7 @@
|
||||
density = FALSE
|
||||
obj_integrity = 20
|
||||
broken = TRUE
|
||||
rods_amount = 1
|
||||
buildstackamount = 1
|
||||
rods_broken = FALSE
|
||||
grille_type = /obj/structure/grille
|
||||
broken_type = null
|
||||
@@ -315,7 +315,7 @@
|
||||
density = FALSE
|
||||
obj_integrity = 20
|
||||
broken = TRUE
|
||||
rods_amount = 1
|
||||
buildstackamount = 1
|
||||
rods_broken = FALSE
|
||||
grille_type = /obj/structure/grille/ratvar
|
||||
broken_type = null
|
||||
|
||||
Reference in New Issue
Block a user