mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Merge pull request #1933 from CHOMPStationBot/upstream-merge-10280
[MIRROR] Allow more than one ore processor
This commit is contained in:
@@ -73,7 +73,7 @@
|
||||
for(var/ore in machine.ores_processing)
|
||||
if(!machine.ores_stored[ore] && !show_all_ores)
|
||||
continue
|
||||
var/ore/O = ore_data[ore]
|
||||
var/ore/O = GLOB.ore_data[ore]
|
||||
if(!O)
|
||||
continue
|
||||
data["ores"].Add(list(list(
|
||||
@@ -160,7 +160,6 @@
|
||||
var/sheets_per_tick = 10
|
||||
var/list/ores_processing[0]
|
||||
var/list/ores_stored[0]
|
||||
var/static/list/alloy_data
|
||||
var/active = FALSE
|
||||
|
||||
var/points = 0
|
||||
@@ -188,24 +187,13 @@
|
||||
"verdantium" = 60,
|
||||
"rutile" = 40) //VOREStation Add
|
||||
|
||||
/obj/machinery/mineral/processing_unit/New()
|
||||
..()
|
||||
// initialize static alloy_data list
|
||||
if(!alloy_data)
|
||||
alloy_data = list()
|
||||
for(var/alloytype in typesof(/datum/alloy)-/datum/alloy)
|
||||
alloy_data += new alloytype()
|
||||
|
||||
// TODO - Initializing this here is insane. Put it in global lists init or something. ~Leshana
|
||||
if(!ore_data || !ore_data.len)
|
||||
for(var/oretype in typesof(/ore)-/ore)
|
||||
var/ore/OD = new oretype()
|
||||
ore_data[OD.name] = OD
|
||||
ores_processing[OD.name] = 0
|
||||
ores_stored[OD.name] = 0
|
||||
|
||||
/obj/machinery/mineral/processing_unit/Initialize()
|
||||
. = ..()
|
||||
for(var/ore in GLOB.ore_data)
|
||||
var/ore/OD = GLOB.ore_data[ore]
|
||||
ores_processing[OD.name] = 0
|
||||
ores_stored[OD.name] = 0
|
||||
|
||||
// TODO - Eschew input/output machinery and just use dirs ~Leshana
|
||||
//Locate our output and input machinery.
|
||||
for (var/dir in cardinal)
|
||||
@@ -264,13 +252,13 @@
|
||||
|
||||
if(ores_stored[metal] > 0 && ores_processing[metal] != 0)
|
||||
|
||||
var/ore/O = ore_data[metal]
|
||||
var/ore/O = GLOB.ore_data[metal]
|
||||
|
||||
if(!O) continue
|
||||
|
||||
if(ores_processing[metal] == PROCESS_ALLOY && O.alloy) //Alloying.
|
||||
|
||||
for(var/datum/alloy/A in alloy_data)
|
||||
for(var/datum/alloy/A in GLOB.alloy_data)
|
||||
|
||||
if(A.metaltag in tick_alloys)
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user