mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
ZAS fixes and statistics logging.
This commit is contained in:
@@ -63,6 +63,8 @@ connection
|
|||||||
B.zone.connected_zones[A.zone] = 1
|
B.zone.connected_zones[A.zone] = 1
|
||||||
else
|
else
|
||||||
B.zone.connected_zones[A.zone]++
|
B.zone.connected_zones[A.zone]++
|
||||||
|
if(A.HasDoor(B) || B.HasDoor(A))
|
||||||
|
indirect = 1
|
||||||
else
|
else
|
||||||
world.log << "Attempted to create connection object for non-zone tiles: [T] -> [O]"
|
world.log << "Attempted to create connection object for non-zone tiles: [T] -> [O]"
|
||||||
del(src)
|
del(src)
|
||||||
@@ -193,6 +195,8 @@ connection
|
|||||||
Cleanup()
|
Cleanup()
|
||||||
if(!A.CanPass(null, B, 0, 0) || !B.CanPass(null, A, 0, 0))
|
if(!A.CanPass(null, B, 0, 0) || !B.CanPass(null, A, 0, 0))
|
||||||
del src
|
del src
|
||||||
|
if(A.HasDoor(B) || B.HasDoor(A))
|
||||||
|
indirect = 1
|
||||||
|
|
||||||
proc/Sanitize()
|
proc/Sanitize()
|
||||||
//If the zones change on connected turfs, update it.
|
//If the zones change on connected turfs, update it.
|
||||||
|
|||||||
@@ -107,6 +107,7 @@ datum
|
|||||||
var/current_cycle = 0
|
var/current_cycle = 0
|
||||||
var/update_delay = 5 //How long between check should it try to process atmos again.
|
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/failed_ticks = 0 //How many ticks have runtimed?
|
||||||
|
var/next_stat_check = 10
|
||||||
|
|
||||||
|
|
||||||
/* process()
|
/* process()
|
||||||
@@ -167,6 +168,12 @@ datum
|
|||||||
|
|
||||||
proc/tick()
|
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.
|
if(tiles_to_update.len > 0) //If there are tiles to update, do so.
|
||||||
for(var/turf/simulated/T in tiles_to_update)
|
for(var/turf/simulated/T in tiles_to_update)
|
||||||
T.update_air_properties()
|
T.update_air_properties()
|
||||||
|
|||||||
@@ -126,10 +126,7 @@ proc/ZConnect(turf/A,turf/B)
|
|||||||
if(C.B == B || C.A == B)
|
if(C.B == B || C.A == B)
|
||||||
return
|
return
|
||||||
|
|
||||||
var/connection/C = new(A,B)
|
new /connection(A,B)
|
||||||
|
|
||||||
//Ensure zones separated by doors do not merge.
|
|
||||||
if(A.HasDoor(B) || B.HasDoor(A)) C.indirect = 1
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
proc/ZDisconnect(turf/A,turf/B)
|
proc/ZDisconnect(turf/A,turf/B)
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ var/roundExplosions = 1
|
|||||||
|
|
||||||
proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1)
|
proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1)
|
||||||
if(!epicenter) return
|
if(!epicenter) return
|
||||||
|
var/log_file = file("[time2text(world.timeofday, "statistics/DD-MM-YYYY.txt")]")
|
||||||
|
log_file << "Explosion | \The [get_area(epicenter)] | [devastation_range], [heavy_impact_range], [light_impact_range], [flash_range]"
|
||||||
spawn(0)
|
spawn(0)
|
||||||
if(defer_powernet_rebuild != 2)
|
if(defer_powernet_rebuild != 2)
|
||||||
defer_powernet_rebuild = 1
|
defer_powernet_rebuild = 1
|
||||||
|
|||||||
@@ -47,6 +47,8 @@
|
|||||||
|
|
||||||
/mob/proc/death(gibbed)
|
/mob/proc/death(gibbed)
|
||||||
timeofdeath = world.time
|
timeofdeath = world.time
|
||||||
|
var/log_file = file("[time2text(world.timeofday, "statistics/DD-MM-YYYY.txt")]")
|
||||||
|
log_file << "Death | \The [get_area(src)] | [bruteloss], [oxyloss], [toxloss], [fireloss][attack_log && attack_log.len? " | attack_log[attack_log.len]" : ""]"
|
||||||
if(client)
|
if(client)
|
||||||
client.onDeath()
|
client.onDeath()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user