ZAS overhaul

This commit is contained in:
ZomgPonies
2014-02-22 23:10:37 -05:00
parent 1023832ecb
commit 1358b11e46
36 changed files with 4834 additions and 938 deletions
+3 -12
View File
@@ -1058,19 +1058,10 @@ steam.start() -- spawns the effect
proc/update_nearby_tiles(need_rebuild)
if(!air_master) return 0
if(!air_master)
return 0
var/turf/simulated/source = get_turf(src)
var/turf/simulated/north = get_step(source,NORTH)
var/turf/simulated/south = get_step(source,SOUTH)
var/turf/simulated/east = get_step(source,EAST)
var/turf/simulated/west = get_step(source,WEST)
if(istype(source)) air_master.tiles_to_update |= source
if(istype(north)) air_master.tiles_to_update |= north
if(istype(south)) air_master.tiles_to_update |= south
if(istype(east)) air_master.tiles_to_update |= east
if(istype(west)) air_master.tiles_to_update |= west
air_master.mark_for_update(get_turf(src))
return 1
+2 -2
View File
@@ -14,9 +14,9 @@
var/minp=16777216;
var/maxp=0;
for(var/dir in cardinal)
var/turf/T=get_turf(get_step(loc,dir))
var/turf/simulated/T=get_turf(get_step(loc,dir))
var/cp=0
if(T && istype(T,/turf/simulated) && T.zone)
if(T && istype(T) && T.zone)
var/datum/gas_mixture/environment = T.return_air()
cp = environment.return_pressure()
else
+1 -11
View File
@@ -158,17 +158,7 @@
proc/update_nearby_tiles(need_rebuild) //Copypasta from airlock code
if(!air_master) return 0
var/turf/simulated/source = loc
var/turf/simulated/north = get_step(source,NORTH)
var/turf/simulated/south = get_step(source,SOUTH)
var/turf/simulated/east = get_step(source,EAST)
var/turf/simulated/west = get_step(source,WEST)
if(istype(source)) air_master.tiles_to_update += source
if(istype(north)) air_master.tiles_to_update += north
if(istype(south)) air_master.tiles_to_update += south
if(istype(east)) air_master.tiles_to_update += east
if(istype(west)) air_master.tiles_to_update += west
air_master.mark_for_update(get_turf(src))
return 1
@@ -296,10 +296,6 @@ obj/structure/windoor_assembly/Destroy()
/obj/structure/windoor_assembly/proc/update_nearby_tiles(need_rebuild)
if(!air_master) return 0
var/turf/simulated/source = loc
var/turf/simulated/target = get_step(source,dir)
if(istype(source)) air_master.tiles_to_update += source
if(istype(target)) air_master.tiles_to_update += target
air_master.mark_for_update(loc)
return 1
+1 -14
View File
@@ -366,20 +366,7 @@
//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
if(!dir in cardinal)
var/turf/simulated/source = get_turf(src)
if(istype(source))
air_master.tiles_to_update |= source
for(var/dir in cardinal)
var/turf/simulated/target = get_step(source,dir)
if(istype(target)) air_master.tiles_to_update |= target
return 1
var/turf/simulated/source = get_turf(src)
var/turf/simulated/target = get_step(source,dir)
if(istype(source)) air_master.tiles_to_update |= source
if(istype(target)) air_master.tiles_to_update |= target
air_master.mark_for_update(get_turf(src))
return 1