mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-20 03:26:37 +01:00
Fixes infinite glass from low walls
This commit is contained in:
@@ -21,9 +21,9 @@
|
||||
var/stripe_color
|
||||
//rad_resistance_modifier = 0.5
|
||||
|
||||
// blend_objects defined on subtypes
|
||||
// blend_objects defined on subtypes
|
||||
noblend_objects = list(/obj/machinery/door/window, /obj/machinery/door/firedoor)
|
||||
|
||||
|
||||
var/default_material = DEFAULT_WALL_MATERIAL
|
||||
var/datum/material/material
|
||||
var/grille_type
|
||||
@@ -38,9 +38,9 @@
|
||||
|
||||
if(!materialtype)
|
||||
materialtype = default_material
|
||||
|
||||
|
||||
material = get_material_by_name(materialtype)
|
||||
|
||||
|
||||
health = material.integrity
|
||||
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
@@ -79,12 +79,12 @@
|
||||
if(istype(W, /obj/item/stack/rods))
|
||||
handle_rod_use(user, W)
|
||||
return
|
||||
|
||||
|
||||
// Making windows, different per subtype
|
||||
else if(istype(W, /obj/item/stack/material/glass))
|
||||
handle_glass_use(user, W)
|
||||
return
|
||||
|
||||
|
||||
// Dismantling the half wall
|
||||
if(W.is_wrench())
|
||||
for(var/obj/structure/S in loc)
|
||||
@@ -110,7 +110,7 @@
|
||||
if(can_place_items() && user.unEquip(W, 0, src.loc) && user.is_preference_enabled(/datum/client_preference/precision_placement))
|
||||
auto_align(W, click_parameters)
|
||||
return 1
|
||||
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/structure/low_wall/proc/can_place_items()
|
||||
@@ -187,7 +187,7 @@
|
||||
to_chat(user, "<span class='notice'>Assembling window...</span>")
|
||||
if(!do_after(user, 4 SECONDS, G, exclusive = TASK_ALL_EXCLUSIVE))
|
||||
return
|
||||
if(!G.use(2))
|
||||
if(!G.use(4))
|
||||
return
|
||||
new window_type(loc, null, TRUE)
|
||||
return
|
||||
@@ -415,7 +415,7 @@
|
||||
other_connections = list("0","0","0","0")
|
||||
else
|
||||
update_connections()
|
||||
|
||||
|
||||
var/percent_damage = 0 // Used for icon state of damage layer
|
||||
var/damage_alpha = 0 // Used for alpha blending of damage layer
|
||||
if (maxhealth && health < maxhealth)
|
||||
@@ -506,7 +506,7 @@
|
||||
other_connections = list("0","0","0","0")
|
||||
else
|
||||
update_connections()
|
||||
|
||||
|
||||
var/img_dir
|
||||
var/image/I
|
||||
for(var/i = 1 to 4)
|
||||
@@ -573,14 +573,14 @@
|
||||
if(locate(/obj/effect/low_wall_spawner) in oview(0, src))
|
||||
warning("Duplicate low wall spawners in [x],[y],[z]!")
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
|
||||
if(low_wall_type)
|
||||
new low_wall_type(loc)
|
||||
if(grille_type)
|
||||
new grille_type(loc)
|
||||
if(window_type)
|
||||
new window_type(loc)
|
||||
|
||||
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
// Bay types
|
||||
|
||||
Reference in New Issue
Block a user