Split and clarify global lists of processing vs non-processing machinery. (#5307)

* Renaming local var 'machines' to avoid confusion with the global var of same name.

* Delete the unused process scheduler machinery.dm file.  Long since replaced with SSmachines

* Split and clarify global lists of processing vs non-processing machinery.

- Renamed the list of processing machinery from "machines" to "processing_machines"
- Added new global list "machines" to be a list of all machines.
- Since nearly every reference to machines actually wanted to iterate over all machines anyway, this works out great.
This commit is contained in:
Leshana
2018-05-28 15:57:02 -04:00
committed by VirgoBot
parent 27a5fc3965
commit d430448ebf
6 changed files with 14 additions and 78 deletions
+4 -4
View File
@@ -90,10 +90,10 @@ SUBSYSTEM_DEF(machines)
msg += "PO:[round(cost_power_objects,1)]"
msg += "} "
msg += "PI:[global.pipe_networks.len]|"
msg += "MC:[global.machines.len]|"
msg += "MC:[global.processing_machines.len]|"
msg += "PN:[global.powernets.len]|"
msg += "PO:[global.processing_power_items.len]|"
msg += "MC/MS:[round((cost ? global.machines.len/cost_machinery : 0),0.1)]"
msg += "MC/MS:[round((cost ? global.processing_machines.len/cost_machinery : 0),0.1)]"
..(jointext(msg, null))
/datum/controller/subsystem/machines/proc/process_pipenets(resumed = 0)
@@ -115,7 +115,7 @@ SUBSYSTEM_DEF(machines)
/datum/controller/subsystem/machines/proc/process_machinery(resumed = 0)
if (!resumed)
src.current_run = global.machines.Copy()
src.current_run = global.processing_machines.Copy()
var/list/current_run = src.current_run
while(current_run.len)
@@ -125,7 +125,7 @@ SUBSYSTEM_DEF(machines)
if(M.use_power)
M.auto_use_power()
else
global.machines.Remove(M)
global.processing_machines.Remove(M)
if(!QDELETED(M))
M.is_processing = null
if(MC_TICK_CHECK)