From 213f3fff310f2554868856835787d213289a4dbe Mon Sep 17 00:00:00 2001 From: Aranclanos Date: Thu, 19 Dec 2013 22:13:21 -0300 Subject: [PATCH] Some fixes for Linda, now the Move() proc of objects that block air is different. Example below. object/Move() var/turf/T = loc ..() move_update_air(T) --- code/LINDA/LINDA_system.dm | 19 +++++++++++++------ code/game/machinery/doors/door.dm | 4 ++-- code/game/machinery/shieldgen.dm | 4 ++-- code/game/objects/effects/aliens.dm | 5 ++--- code/game/objects/effects/effect_system.dm | 4 ++-- code/game/objects/structures/mineral_doors.dm | 4 ++-- .../objects/structures/windoor_assembly.dm | 4 ++-- code/game/objects/structures/window.dm | 4 ++-- code/modules/assembly/bomb.dm | 4 +++- 9 files changed, 30 insertions(+), 22 deletions(-) diff --git a/code/LINDA/LINDA_system.dm b/code/LINDA/LINDA_system.dm index 2e8fe1e4888..daf76585557 100644 --- a/code/LINDA/LINDA_system.dm +++ b/code/LINDA/LINDA_system.dm @@ -200,14 +200,21 @@ turf/CanPass(atom/movable/mover, turf/target, height=1.5,air_group=0) T.atmos_adjacent_turfs &= ~counterdir /atom/movable/proc/air_update_turf(var/command = 0) - if(istype(loc,/turf)) - for(var/turf/T in locs) // used by double wide doors and other nonexistant multitile structures - if(command) - T.CalculateAdjacentTurfs() - if(air_master) - air_master.add_to_active(T,command) + if(!istype(loc,/turf) && command) + return + for(var/turf/T in locs) // used by double wide doors and other nonexistant multitile structures + T.air_update_turf(command) +/turf/proc/air_update_turf(var/command = 0) + if(command) + CalculateAdjacentTurfs() + if(air_master) + air_master.add_to_active(src,command) +/atom/movable/proc/move_update_air(var/turf/T) + if(istype(T,/turf)) + T.air_update_turf(1) + air_update_turf(1) /atom/movable/proc/atmos_spawn_air(var/text, var/amount) //because a lot of people loves to copy paste awful code lets just make a easy proc to spawn your plasma fires var/turf/simulated/T = get_turf(src) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index a0ef58902f2..e4d26278b14 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -67,9 +67,9 @@ return /obj/machinery/door/Move() - air_update_turf(1) + var/turf/T = loc ..() - air_update_turf(1) + move_update_air(T) /obj/machinery/door/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) if(air_group) return 0 diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index 989e897721d..bacb62e3d7d 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -22,9 +22,9 @@ ..() /obj/machinery/shield/Move() - air_update_turf(1) + var/turf/T = loc ..() - air_update_turf(1) + move_update_air(T) /obj/machinery/shield/CanPass(atom/movable/mover, turf/target, height, air_group) if(!height || air_group) return 0 diff --git a/code/game/objects/effects/aliens.dm b/code/game/objects/effects/aliens.dm index 88d728ed76c..c4c30e7b3ff 100644 --- a/code/game/objects/effects/aliens.dm +++ b/code/game/objects/effects/aliens.dm @@ -35,10 +35,9 @@ return /obj/structure/alien/resin/Move() - air_update_turf(1) + var/turf/T = loc ..() - air_update_turf(1) - return + move_update_air(T) /obj/structure/alien/resin/CanAtmosPass() return !density diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm index 128fe3850a1..c6415f85040 100644 --- a/code/game/objects/effects/effect_system.dm +++ b/code/game/objects/effects/effect_system.dm @@ -930,9 +930,9 @@ steam.start() -- spawns the effect ..() Move() - air_update_turf(1) + var/turf/T = loc ..() - air_update_turf(1) + move_update_air(T) proc/updateicon() if(metal == 1) diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm index e5d9fae0fb1..db6a61e58ce 100644 --- a/code/game/objects/structures/mineral_doors.dm +++ b/code/game/objects/structures/mineral_doors.dm @@ -30,9 +30,9 @@ return Move() - air_update_turf(1) + var/turf/T = loc ..() - air_update_turf(1) + move_update_air(T) Bumped(atom/user) ..() diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm index 983e808ab85..b43eb6352a2 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -37,9 +37,9 @@ obj/structure/windoor_assembly/Del() ..() /obj/structure/windoor_assembly/Move() - air_update_turf(1) + var/turf/T = loc ..() - air_update_turf(1) + move_update_air(T) /obj/structure/windoor_assembly/update_icon() icon_state = "[facing]_[secure]windoor_assembly[state]" diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index b3dd2863767..7813bc255e5 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -301,10 +301,10 @@ /obj/structure/window/Move() - air_update_turf(1) + var/turf/T = loc ..() dir = ini_dir - air_update_turf(1) + move_update_air(T) /obj/structure/window/CanAtmosPass(turf/T) if(get_dir(loc, T) == dir) diff --git a/code/modules/assembly/bomb.dm b/code/modules/assembly/bomb.dm index 678ecce2aa0..0b21b2aa101 100644 --- a/code/modules/assembly/bomb.dm +++ b/code/modules/assembly/bomb.dm @@ -156,6 +156,7 @@ ground_zero.assume_air(air_contents) ground_zero.hotspot_expose(1000, 125) + air_update_turf() if(master) del(master) del(src) @@ -165,4 +166,5 @@ var/turf/simulated/T = get_turf(src) if(!T) return - T.assume_air(removed) \ No newline at end of file + T.assume_air(removed) + air_update_turf() \ No newline at end of file