Converts gas, mat and reagent strings to defines

This commit is contained in:
Kashargul
2024-12-06 17:26:00 +01:00
parent 780c07439b
commit 80edcd2c3d
155 changed files with 1183 additions and 1054 deletions
+13 -13
View File
@@ -347,7 +347,7 @@
else
var/list/nicename = null
var/list/tankcheck = null
var/breathes = "oxygen" //default, we'll check later
var/breathes = GAS_O2 //default, we'll check later
var/list/contents = list()
var/from = "on"
@@ -376,30 +376,30 @@
continue //in it, so we're going to believe the tank is what it says it is
switch(breathes)
//These tanks we're sure of their contents
if("nitrogen") //So we're a bit more picky about them.
if(GAS_N2) //So we're a bit more picky about them.
if(t.air_contents.gas["nitrogen"] && !t.air_contents.gas["oxygen"])
contents.Add(t.air_contents.gas["nitrogen"])
if(t.air_contents.gas[GAS_N2] && !t.air_contents.gas[GAS_O2])
contents.Add(t.air_contents.gas[GAS_N2])
else
contents.Add(0)
if ("oxygen")
if(t.air_contents.gas["oxygen"] && !t.air_contents.gas["phoron"])
contents.Add(t.air_contents.gas["oxygen"])
if (GAS_O2)
if(t.air_contents.gas[GAS_O2] && !t.air_contents.gas[GAS_PHORON])
contents.Add(t.air_contents.gas[GAS_O2])
else
contents.Add(0)
// No races breath this, but never know about downstream servers.
if ("carbon dioxide")
if(t.air_contents.gas["carbon_dioxide"] && !t.air_contents.gas["phoron"])
contents.Add(t.air_contents.gas["carbon_dioxide"])
if(t.air_contents.gas[GAS_CO2] && !t.air_contents.gas[GAS_PHORON])
contents.Add(t.air_contents.gas[GAS_CO2])
else
contents.Add(0)
// And here's for the Vox
if ("phoron")
if(t.air_contents.gas["phoron"] && !t.air_contents.gas["oxygen"])
contents.Add(t.air_contents.gas["phoron"])
if (GAS_PHORON)
if(t.air_contents.gas[GAS_PHORON] && !t.air_contents.gas[GAS_O2])
contents.Add(t.air_contents.gas[GAS_PHORON])
else
contents.Add(0)
@@ -431,7 +431,7 @@
if(C.internals)
C.internals.icon_state = "internal1"
else
to_chat(C, span_notice("You don't have a[breathes=="oxygen" ? "n oxygen" : addtext(" ",breathes)] tank."))
to_chat(C, span_notice("You don't have a[breathes==GAS_O2 ? "n " + GAS_O2 + " : addtext(" ",breathes)] tank."))
if("act_intent")
usr.a_intent_change("right")
if(I_HELP)