Added a gas mixture counter and fixed a segfault on exit.

This commit is contained in:
Putnam
2020-09-10 17:42:49 -07:00
parent 58f370b04f
commit 3ea7f0defa
4 changed files with 4 additions and 6 deletions

Binary file not shown.

View File

@@ -60,6 +60,8 @@ SUBSYSTEM_DEF(air)
msg += "PN:[networks.len]|" msg += "PN:[networks.len]|"
msg += "HP:[high_pressure_delta.len]|" msg += "HP:[high_pressure_delta.len]|"
msg += "AS:[active_super_conductivity.len]|" msg += "AS:[active_super_conductivity.len]|"
msg += "GA:[get_amt_gas_mixes()]|"
msg += "MG:[get_max_gas_mixes()]|"
msg += "AT/MS:[round((cost ? active_turfs_len/cost : 0),0.1)]" msg += "AT/MS:[round((cost ? active_turfs_len/cost : 0),0.1)]"
..(msg) ..(msg)
@@ -301,6 +303,8 @@ SUBSYSTEM_DEF(air)
/datum/controller/subsystem/air/proc/process_excited_groups_extools() /datum/controller/subsystem/air/proc/process_excited_groups_extools()
/datum/controller/subsystem/air/proc/get_amt_excited_groups() /datum/controller/subsystem/air/proc/get_amt_excited_groups()
/datum/controller/subsystem/air/proc/get_amt_active_turfs() /datum/controller/subsystem/air/proc/get_amt_active_turfs()
/datum/controller/subsystem/air/proc/get_amt_gas_mixes()
/datum/controller/subsystem/air/proc/get_max_gas_mixes()
/datum/controller/subsystem/air/proc/add_to_active_extools() /datum/controller/subsystem/air/proc/add_to_active_extools()
/datum/controller/subsystem/air/proc/remove_from_active_extools() /datum/controller/subsystem/air/proc/remove_from_active_extools()
/datum/controller/subsystem/air/proc/get_active_turfs() /datum/controller/subsystem/air/proc/get_active_turfs()

View File

@@ -273,12 +273,6 @@ GLOBAL_LIST(topic_status_cache)
..() ..()
/world/Del() /world/Del()
// memory leaks bad
var/num_deleted = 0
for(var/datum/gas_mixture/GM)
GM.__gasmixture_unregister()
num_deleted++
log_world("Deallocated [num_deleted] gas mixtures")
shutdown_logging() // makes sure the thread is closed before end, else we terminate shutdown_logging() // makes sure the thread is closed before end, else we terminate
..() ..()

Binary file not shown.