diff --git a/code/ZAS/Atom.dm b/code/ZAS/Atom.dm index 1a2ad9cb02..6f75f4ea29 100644 --- a/code/ZAS/Atom.dm +++ b/code/ZAS/Atom.dm @@ -2,7 +2,7 @@ /atom/var/pressure_resistance = ONE_ATMOSPHERE -atom/proc/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0) +/atom/proc/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0) //Purpose: Determines if the object (or airflow) can pass this atom. //Called by: Movement, airflow. //Inputs: The moving atom (optional), target turf, "height" and air group @@ -30,6 +30,16 @@ atom/proc/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0) return 1 +//Convenience function for atoms to update turfs they occupy +/atom/movable/proc/update_nearby_tiles(need_rebuild) + if(!air_master) + return 0 + + for(var/turf/simulated/turf in locs) + air_master.mark_for_update(turf) + + return 1 + //Basically another way of calling CanPass(null, other, 0, 0) and CanPass(null, other, 1.5, 1). //Returns: // 0 - Not blocked @@ -63,4 +73,4 @@ turf/c_airblock(turf/other) for(var/atom/movable/M in contents) result |= M.c_airblock(other) if(result == BLOCKED) return BLOCKED - return result \ No newline at end of file + return result diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 8ca1ff54e4..37966deea6 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -350,7 +350,7 @@ /obj/machinery/door/proc/requiresID() return 1 -/obj/machinery/door/proc/update_nearby_tiles(need_rebuild) +/obj/machinery/door/update_nearby_tiles(need_rebuild) if(!air_master) return 0 @@ -374,7 +374,7 @@ return /obj/machinery/door/Move(new_loc, new_dir) - update_nearby_tiles() + //update_nearby_tiles() . = ..() if(width > 1) if(dir in list(EAST, WEST)) @@ -387,4 +387,4 @@ update_nearby_tiles() /obj/machinery/door/morgue - icon = 'icons/obj/doors/doormorgue.dmi' \ No newline at end of file + icon = 'icons/obj/doors/doormorgue.dmi' diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 33a2878e51..f2e8168485 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -16,18 +16,9 @@ explosion_resistance = 5 air_properties_vary_with_direction = 1 - -/obj/machinery/door/window/update_nearby_tiles(need_rebuild) - if(!air_master) - return 0 - - air_master.mark_for_update(get_turf(src)) - - return 1 - /obj/machinery/door/window/New() ..() - + update_nearby_tiles() if (src.req_access && src.req_access.len) src.icon_state = "[src.icon_state]" src.base_state = src.icon_state @@ -36,6 +27,7 @@ /obj/machinery/door/window/Del() density = 0 playsound(src, "shatter", 70, 1) + update_nearby_tiles() ..() /obj/machinery/door/window/Bumped(atom/movable/AM as mob|obj) diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm index ed74940324..5b209e0423 100644 --- a/code/game/objects/effects/effect_system.dm +++ b/code/game/objects/effects/effect_system.dm @@ -697,15 +697,6 @@ steam.start() -- spawns the effect if(air_group) return 0 return !density - - proc/update_nearby_tiles(need_rebuild) - if(!air_master) - return 0 - - air_master.mark_for_update(get_turf(src)) - - return 1 - /datum/effect/effect/system/reagents_explosion var/amount // TNT equivalent var/flashing = 0 // does explosion creates flash effect? diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index a4c9a2bc85..f24c3c7839 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -52,6 +52,9 @@ if(climbable) verbs += /obj/structure/proc/climb_on +/obj/structure/Del() + ..() + /obj/structure/proc/climb_on() set name = "Climb structure" @@ -173,4 +176,4 @@ return 0 visible_message("[user] [attack_verb] the [src] apart!") spawn(1) destroy() - return 1 \ No newline at end of file + return 1 diff --git a/code/game/objects/structures/inflatable.dm b/code/game/objects/structures/inflatable.dm index 7d4700abb9..9c5182382b 100644 --- a/code/game/objects/structures/inflatable.dm +++ b/code/game/objects/structures/inflatable.dm @@ -34,12 +34,6 @@ update_nearby_tiles() ..() -/obj/structure/inflatable/proc/update_nearby_tiles(need_rebuild) //Copypasta from airlock code - if(!air_master) - return 0 - air_master.mark_for_update(get_turf(src)) - return 1 - /obj/structure/inflatable/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) return 0 @@ -265,4 +259,4 @@ new /obj/item/inflatable(src) new /obj/item/inflatable(src) new /obj/item/inflatable(src) - new /obj/item/inflatable(src) \ No newline at end of file + new /obj/item/inflatable(src) diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm index 5db0947e9b..ff37b0bfb2 100644 --- a/code/game/objects/structures/mineral_doors.dm +++ b/code/game/objects/structures/mineral_doors.dm @@ -154,12 +154,6 @@ CheckHardness() return - proc/update_nearby_tiles(need_rebuild) //Copypasta from airlock code - if(!air_master) - return 0 - air_master.mark_for_update(get_turf(src)) - return 1 - /obj/structure/mineral_door/iron mineralType = "metal" hardness = 3 diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm index 915bbbf684..9e1b47a0b1 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -295,11 +295,3 @@ obj/structure/windoor_assembly/Del() update_icon() return - -/obj/structure/windoor_assembly/proc/update_nearby_tiles(need_rebuild) - if(!air_master) - return 0 - - air_master.mark_for_update(loc) - - return 1 diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 7c7429d76e..a8492748a3 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -316,15 +316,6 @@ dir = ini_dir update_nearby_tiles(need_rebuild=1) - -//This proc has to do with airgroups and atmos, it has nothing to do with smoothwindows, that's update_nearby_tiles(). -/obj/structure/window/proc/update_nearby_tiles(need_rebuild) - if(!air_master) - return 0 - air_master.mark_for_update(get_turf(src)) - - return 1 - //checks if this window is full-tile one /obj/structure/window/proc/is_fulltile() if(dir & (dir - 1)) diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index c63a4c921a..8a79226dab 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -231,7 +231,7 @@ t = replacetext(t, "\[/grid\]", "") t = replacetext(t, "\[row\]", "
")
+ t = replacetext(t, "\[logo\]", "
")
t = "[t]"
else // If it is a crayon, and he still tries to use these, make them empty!
diff --git a/code/modules/shieldgen/emergency_shield.dm b/code/modules/shieldgen/emergency_shield.dm
index 6eb33e7124..8ecb5fb3b1 100644
--- a/code/modules/shieldgen/emergency_shield.dm
+++ b/code/modules/shieldgen/emergency_shield.dm
@@ -27,16 +27,6 @@
if(!height || air_group) return 0
else return ..()
-//Looks like copy/pasted code... I doubt 'need_rebuild' is even used here - Nodrak
-/obj/machinery/shield/proc/update_nearby_tiles(need_rebuild)
- if(!air_master)
- return 0
-
- air_master.mark_for_update(get_turf(src))
-
- return 1
-
-
/obj/machinery/shield/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(!istype(W)) return
@@ -357,4 +347,4 @@
src.icon_state = malfunction ? "shieldonbr":"shieldon"
else
src.icon_state = malfunction ? "shieldoffbr":"shieldoff"
- return
\ No newline at end of file
+ return
diff --git a/code/modules/shieldgen/energy_field.dm b/code/modules/shieldgen/energy_field.dm
index 06dd2bdade..7558c19ad6 100644
--- a/code/modules/shieldgen/energy_field.dm
+++ b/code/modules/shieldgen/energy_field.dm
@@ -13,6 +13,14 @@
var/strength = 0
var/ticks_recovering = 10
+/obj/effect/energy_field/New()
+ ..()
+ update_nearby_tiles()
+
+/obj/effect/energy_field/Del()
+ update_nearby_tiles()
+ ..()
+
/obj/effect/energy_field/ex_act(var/severity)
Stress(0.5 + severity)
@@ -44,12 +52,16 @@
strength = 0
//if we take too much damage, drop out - the generator will bring us back up if we have enough power
+ var/old_density = density
if(strength >= 1)
invisibility = 0
density = 1
else if(strength < 1)
invisibility = 101
density = 0
+
+ if (density != old_density)
+ update_nearby_tiles()
/obj/effect/energy_field/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
//Purpose: Determines if the object (or airflow) can pass this atom.
diff --git a/code/modules/shieldgen/sheldwallgen.dm b/code/modules/shieldgen/sheldwallgen.dm
index bf30e649e7..9bce6c3597 100644
--- a/code/modules/shieldgen/sheldwallgen.dm
+++ b/code/modules/shieldgen/sheldwallgen.dm
@@ -242,6 +242,7 @@
/obj/machinery/shieldwall/New(var/obj/machinery/shieldwallgen/A, var/obj/machinery/shieldwallgen/B)
..()
+ update_nearby_tiles()
src.gen_primary = A
src.gen_secondary = B
if(A && B && A.active && B.active)
@@ -253,6 +254,10 @@
else
del(src) //need at least two generator posts
+/obj/machinery/shieldwall/Del()
+ update_nearby_tiles()
+ ..()
+
/obj/machinery/shieldwall/attack_hand(mob/user as mob)
return
@@ -321,4 +326,4 @@
if (istype(mover, /obj/item/projectile))
return prob(10)
else
- return !src.density
\ No newline at end of file
+ return !src.density