Fixes bubble/hull shield generators not updating air zones, update_nearby_tiles() cleanup.

This commit is contained in:
mwerezak
2014-11-25 18:10:19 -05:00
committed by mwerezak
parent af579e0e25
commit b84bb4ff23
12 changed files with 41 additions and 67 deletions

View File

@@ -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
return result