mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 20:43:10 +01:00
Converts Reagents to Typepaths and Centralises Reagent Spawning (#9140)
Converts reagents to use typepaths instead of IDs.
Centralises reagent spawning in a lot of places to use reagents_to_add instead of a variety of custom methods or initialise overrides.
This commit is contained in:
@@ -130,7 +130,7 @@
|
||||
spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH
|
||||
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 2)
|
||||
var/volume = 60
|
||||
var/list/fuel = list("phoron" = 50000, "slimejelly" = 25000, "fuel" = 15000, "carbon" = 10000, "ethanol"= 10000, "nutriment" =8000, "blood" = 5000)
|
||||
var/list/fuel = list(/datum/reagent/toxin/phoron = 50000, /datum/reagent/slimejelly = 25000, /datum/reagent/fuel = 15000, /datum/reagent/carbon = 10000, /datum/reagent/alcohol/ethanol = 10000, /datum/reagent/nutriment = 8000, /datum/reagent/blood = 5000)
|
||||
|
||||
/obj/item/integrated_circuit/passive/power/chemical_cell/New()
|
||||
..()
|
||||
|
||||
@@ -297,7 +297,7 @@
|
||||
/obj/item/integrated_circuit/reagent/storage/scan/do_work()
|
||||
var/list/cont = list()
|
||||
for(var/datum/reagent/RE in reagents.reagent_list)
|
||||
cont += RE.id
|
||||
cont += RE.name
|
||||
set_pin_data(IC_OUTPUT, 3, cont)
|
||||
set_pin_data(IC_OUTPUT, 4, reagents.generate_taste_message(src))
|
||||
push_data()
|
||||
@@ -352,10 +352,10 @@
|
||||
return
|
||||
for(var/datum/reagent/G in source.reagents.reagent_list)
|
||||
if (!direc)
|
||||
if(G.id in demand)
|
||||
source.reagents.trans_id_to(target, G.id, transfer_amount)
|
||||
if(lowertext(G.name) in demand)
|
||||
source.reagents.trans_type_to(target, G.type, transfer_amount)
|
||||
else
|
||||
if(!(G.id in demand))
|
||||
source.reagents.trans_id_to(target, G.id, transfer_amount)
|
||||
if(!(lowertext(G.name) in demand))
|
||||
source.reagents.trans_type_to(target, G.type, transfer_amount)
|
||||
activate_pin(2)
|
||||
push_data()
|
||||
|
||||
Reference in New Issue
Block a user