This commit is contained in:
caelaislinn
2012-06-14 22:52:33 +10:00
10 changed files with 44 additions and 25 deletions

View File

@@ -63,6 +63,8 @@ connection
B.zone.connected_zones[A.zone] = 1
else
B.zone.connected_zones[A.zone]++
if(A.HasDoor(B) || B.HasDoor(A))
indirect = 1
else
world.log << "Attempted to create connection object for non-zone tiles: [T] -> [O]"
del(src)
@@ -193,6 +195,8 @@ connection
Cleanup()
if(!A.CanPass(null, B, 0, 0) || !B.CanPass(null, A, 0, 0))
del src
if(A.HasDoor(B) || B.HasDoor(A))
indirect = 1
proc/Sanitize()
//If the zones change on connected turfs, update it.

View File

@@ -107,6 +107,7 @@ datum
var/current_cycle = 0
var/update_delay = 5 //How long between check should it try to process atmos again.
var/failed_ticks = 0 //How many ticks have runtimed?
var/next_stat_check = 10
/* process()
@@ -167,6 +168,12 @@ datum
proc/tick()
if(current_cycle >= next_stat_check)
var/zone/z = pick(zones)
var/log_file = file("[time2text(world.timeofday, "statistics/DD-MM-YYYY.txt")]")
log_file << "Zone | \The [get_area(pick(z.contents))] | [z.air.oxygen], [z.air.nitrogen], [z.air.carbon_dioxide], [z.air.toxins] | [z.air.temperature] | [z.air.group_multiplier * z.air.volume]"
next_stat_check = current_cycle + (rand(5,7)*60)
if(tiles_to_update.len > 0) //If there are tiles to update, do so.
for(var/turf/simulated/T in tiles_to_update)
T.update_air_properties()

View File

@@ -123,13 +123,10 @@ proc/ZConnect(turf/A,turf/B)
var/list/connections = air_master.tiles_with_connections["\ref[A]"]
for(var/connection/C in connections)
C.Cleanup()
if(C.B == B || C.A == B)
if(C && (C.B == B || C.A == B))
return
var/connection/C = new(A,B)
//Ensure zones separated by doors do not merge.
if(A.HasDoor(B) || B.HasDoor(A)) C.indirect = 1
new /connection(A,B)
/*
proc/ZDisconnect(turf/A,turf/B)