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
@@ -30,8 +30,8 @@
var/ui_error = null // For error messages to show up in nano ui.
var/datum/gas_mixture/internal = new()
var/const/input_gas = "carbon_dioxide"
var/const/output_gas = "oxygen"
var/const/input_gas = GAS_CO2
var/const/output_gas = GAS_O2
/obj/machinery/atmospherics/binary/algae_farm/filled
stored_material = list(MAT_ALGAE = 10000, MAT_GRAPHITE = 0)
@@ -14,7 +14,7 @@
//--------------------------------------------
// Omni port datum
//
// Used by omni devices to manage connections
// Used by omni devices to manage connections
// to other atmospheric objects.
//--------------------------------------------
/datum/omni_port
@@ -70,10 +70,10 @@
string = "East"
if(WEST)
string = "West"
if(!capitalize && string)
string = lowertext(string)
return string
//returns a direction flag based on the string passed to it
@@ -94,16 +94,15 @@
/proc/mode_to_gasid(var/mode)
switch(mode)
if(ATM_O2)
return "oxygen"
if(ATM_N2)
return "nitrogen"
if(ATM_CO2)
return "carbon_dioxide"
if(ATM_P)
return "phoron"
if(ATM_N2O)
return "nitrous_oxide"
if(ATM_O2)
return GAS_O2
if(ATM_N2)
return GAS_N2
if(ATM_CO2)
return GAS_CO2
if(ATM_P)
return GAS_PHORON
if(ATM_N2O)
return GAS_N2O
else
return null
@@ -44,15 +44,15 @@
switch(filter_type)
if(0) //removing hydrocarbons
filtered_out = list("phoron")
filtered_out = list(GAS_PHORON)
if(1) //removing O2
filtered_out = list("oxygen")
filtered_out = list(GAS_O2)
if(2) //removing N2
filtered_out = list("nitrogen")
filtered_out = list(GAS_N2)
if(3) //removing CO2
filtered_out = list("carbon_dioxide")
filtered_out = list(GAS_CO2)
if(4)//removing N2O
filtered_out = list("nitrous_oxide")
filtered_out = list(GAS_N2O)
air1.volume = ATMOS_DEFAULT_VOLUME_FILTER
air2.volume = ATMOS_DEFAULT_VOLUME_FILTER
@@ -205,16 +205,16 @@
filtered_out.Cut() //no need to create new lists unnecessarily
switch(filter_type)
if(0) //removing hydrocarbons
filtered_out += "phoron"
filtered_out += GAS_PHORON
filtered_out += "oxygen_agent_b"
if(1) //removing O2
filtered_out += "oxygen"
filtered_out += GAS_O2
if(2) //removing N2
filtered_out += "nitrogen"
filtered_out += GAS_N2
if(3) //removing CO2
filtered_out += "carbon_dioxide"
filtered_out += GAS_CO2
if(4)//removing N2O
filtered_out += "nitrous_oxide"
filtered_out += GAS_N2O
add_fingerprint(ui.user)
update_icon()
@@ -20,7 +20,7 @@
var/hibernate = 0 //Do we even process?
var/scrubbing = 1 //0 = siphoning, 1 = scrubbing
var/list/scrubbing_gas = list("carbon_dioxide", "phoron")
var/list/scrubbing_gas = list(GAS_CO2, GAS_PHORON)
var/panic = 0 //is this scrubber panicked?
@@ -109,12 +109,12 @@
"power" = use_power,
"scrubbing" = scrubbing,
"panic" = panic,
"filter_o2" = ("oxygen" in scrubbing_gas),
"filter_n2" = ("nitrogen" in scrubbing_gas),
"filter_co2" = ("carbon_dioxide" in scrubbing_gas),
"filter_phoron" = ("phoron" in scrubbing_gas),
"filter_n2o" = ("nitrous_oxide" in scrubbing_gas),
"filter_fuel" = ("volatile_fuel" in scrubbing_gas),
"filter_o2" = (GAS_O2 in scrubbing_gas),
"filter_n2" = (GAS_N2 in scrubbing_gas),
"filter_co2" = (GAS_CO2 in scrubbing_gas),
"filter_phoron" = (GAS_PHORON in scrubbing_gas),
"filter_n2o" = (GAS_N2O in scrubbing_gas),
"filter_fuel" = (GAS_VOLATILE_FUEL in scrubbing_gas),
"sigtype" = "status"
)
if(!initial_loc.air_scrub_names[id_tag])
@@ -216,35 +216,35 @@
var/list/toggle = list()
if(!isnull(signal.data["o2_scrub"]) && text2num(signal.data["o2_scrub"]) != ("oxygen" in scrubbing_gas))
toggle += "oxygen"
if(!isnull(signal.data["o2_scrub"]) && text2num(signal.data["o2_scrub"]) != (GAS_O2 in scrubbing_gas))
toggle += GAS_O2
else if(signal.data["toggle_o2_scrub"])
toggle += "oxygen"
toggle += GAS_O2
if(!isnull(signal.data["n2_scrub"]) && text2num(signal.data["n2_scrub"]) != ("nitrogen" in scrubbing_gas))
toggle += "nitrogen"
if(!isnull(signal.data["n2_scrub"]) && text2num(signal.data["n2_scrub"]) != (GAS_N2 in scrubbing_gas))
toggle += GAS_N2
else if(signal.data["toggle_n2_scrub"])
toggle += "nitrogen"
toggle += GAS_N2
if(!isnull(signal.data["co2_scrub"]) && text2num(signal.data["co2_scrub"]) != ("carbon_dioxide" in scrubbing_gas))
toggle += "carbon_dioxide"
if(!isnull(signal.data["co2_scrub"]) && text2num(signal.data["co2_scrub"]) != (GAS_CO2 in scrubbing_gas))
toggle += GAS_CO2
else if(signal.data["toggle_co2_scrub"])
toggle += "carbon_dioxide"
toggle += GAS_CO2
if(!isnull(signal.data["tox_scrub"]) && text2num(signal.data["tox_scrub"]) != ("phoron" in scrubbing_gas))
toggle += "phoron"
if(!isnull(signal.data["tox_scrub"]) && text2num(signal.data["tox_scrub"]) != (GAS_PHORON in scrubbing_gas))
toggle += GAS_PHORON
else if(signal.data["toggle_tox_scrub"])
toggle += "phoron"
toggle += GAS_PHORON
if(!isnull(signal.data["n2o_scrub"]) && text2num(signal.data["n2o_scrub"]) != ("nitrous_oxide" in scrubbing_gas))
toggle += "nitrous_oxide"
if(!isnull(signal.data["n2o_scrub"]) && text2num(signal.data["n2o_scrub"]) != (GAS_N2O in scrubbing_gas))
toggle += GAS_N2O
else if(signal.data["toggle_n2o_scrub"])
toggle += "nitrous_oxide"
toggle += GAS_N2O
if(!isnull(signal.data["fuel_scrub"]) && text2num(signal.data["fuel_scrub"]) != ("volatile_fuel" in scrubbing_gas))
toggle += "volatile_fuel"
if(!isnull(signal.data["fuel_scrub"]) && text2num(signal.data["fuel_scrub"]) != (GAS_VOLATILE_FUEL in scrubbing_gas))
toggle += GAS_VOLATILE_FUEL
else if(signal.data["toggle_fuel_scrub"])
toggle += "volatile_fuel"
toggle += GAS_VOLATILE_FUEL
scrubbing_gas ^= toggle
@@ -1,2 +1,2 @@
/obj/machinery/atmospherics/unary/vent_scrubber
scrubbing_gas = list("carbon_dioxide", "phoron")
scrubbing_gas = list(GAS_CO2, GAS_PHORON)
+7 -7
View File
@@ -79,8 +79,8 @@
air_temporary.volume = volume
air_temporary.temperature = T20C
air_temporary.adjust_multi("oxygen", (start_pressure*O2STANDARD)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature), \
"nitrogen",(start_pressure*N2STANDARD)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature))
air_temporary.adjust_multi(GAS_O2, (start_pressure*O2STANDARD)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature), \
GAS_N2,(start_pressure*N2STANDARD)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature))
. = ..()
@@ -95,7 +95,7 @@
air_temporary.volume = volume
air_temporary.temperature = T20C
air_temporary.adjust_gas("oxygen", (start_pressure)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature))
air_temporary.adjust_gas(GAS_O2, (start_pressure)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature))
. = ..()
icon_state = "o2"
@@ -110,7 +110,7 @@
air_temporary.volume = volume
air_temporary.temperature = T20C
air_temporary.adjust_gas("nitrogen", (start_pressure)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature))
air_temporary.adjust_gas(GAS_N2, (start_pressure)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature))
. = ..()
icon_state = "n2"
@@ -124,7 +124,7 @@
air_temporary.volume = volume
air_temporary.temperature = T20C
air_temporary.adjust_gas("carbon_dioxide", (start_pressure)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature))
air_temporary.adjust_gas(GAS_CO2, (start_pressure)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature))
. = ..()
icon_state = "co2"
@@ -139,7 +139,7 @@
air_temporary.volume = volume
air_temporary.temperature = T20C
air_temporary.adjust_gas("phoron", (start_pressure)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature))
air_temporary.adjust_gas(GAS_PHORON, (start_pressure)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature))
. = ..()
icon_state = "phoron"
@@ -153,7 +153,7 @@
air_temporary.volume = volume
air_temporary.temperature = T0C
air_temporary.adjust_gas("nitrous_oxide", (start_pressure)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature))
air_temporary.adjust_gas(GAS_N2O, (start_pressure)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature))
. = ..()
icon_state = "n2o"
+1 -1
View File
@@ -301,7 +301,7 @@ If it gains pressure too slowly, it may leak or just rupture instead of explodin
//remove_by_flag() and adjust_gas() handle the group_multiplier for us.
remove_by_flag(XGM_GAS_OXIDIZER, used_oxidizers)
remove_by_flag(XGM_GAS_FUEL, used_gas_fuel)
adjust_gas("carbon_dioxide", used_oxidizers)
adjust_gas(GAS_CO2, used_oxidizers)
if(zone)
zone.remove_liquidfuel(used_liquid_fuel, !check_combustability())
+3 -3
View File
@@ -99,7 +99,7 @@ var/image/contamination_overlay = image('icons/effects/contamination.dmi')
return
//Burn skin if exposed.
if(vsc.plc.SKIN_BURNS && (species.breath_type != "phoron"))
if(vsc.plc.SKIN_BURNS && (species.breath_type != GAS_PHORON))
if(!pl_head_protected() || !pl_suit_protected())
burn_skin(0.75)
if(prob(20))
@@ -107,7 +107,7 @@ var/image/contamination_overlay = image('icons/effects/contamination.dmi')
updatehealth()
//Burn eyes if exposed.
if(vsc.plc.EYE_BURNS && species.breath_type && (species.breath_type != "phoron")) //VOREStation Edit: those who don't breathe
if(vsc.plc.EYE_BURNS && species.breath_type && (species.breath_type != GAS_PHORON)) //VOREStation Edit: those who don't breathe
var/burn_eyes = 1
//Check for protective glasses
@@ -131,7 +131,7 @@ var/image/contamination_overlay = image('icons/effects/contamination.dmi')
burn_eyes()
//Genetic Corruption
if(vsc.plc.GENETIC_CORRUPTION && (species.breath_type != "phoron"))
if(vsc.plc.GENETIC_CORRUPTION && (species.breath_type != GAS_PHORON))
if(rand(1,10000) < vsc.plc.GENETIC_CORRUPTION)
randmutb(src)
to_chat(src, span_danger("High levels of toxins cause you to spontaneously mutate!"))
+6 -6
View File
@@ -237,7 +237,7 @@
//Create gas mixture to hold data for passing
var/datum/gas_mixture/GM = new
GM.adjust_multi("oxygen", oxygen, "carbon_dioxide", carbon_dioxide, "nitrogen", nitrogen, "phoron", phoron)
GM.adjust_multi(GAS_O2, oxygen, GAS_CO2, carbon_dioxide, GAS_N2, nitrogen, GAS_PHORON, phoron)
GM.temperature = temperature
return GM
@@ -247,10 +247,10 @@
var/sum = oxygen + carbon_dioxide + nitrogen + phoron
if(sum>0)
GM.gas["oxygen"] = (oxygen/sum)*amount
GM.gas["carbon_dioxide"] = (carbon_dioxide/sum)*amount
GM.gas["nitrogen"] = (nitrogen/sum)*amount
GM.gas["phoron"] = (phoron/sum)*amount
GM.gas[GAS_O2] = (oxygen/sum)*amount
GM.gas[GAS_CO2] = (carbon_dioxide/sum)*amount
GM.gas[GAS_N2] = (nitrogen/sum)*amount
GM.gas[GAS_PHORON] = (phoron/sum)*amount
GM.temperature = temperature
GM.update_values()
@@ -293,7 +293,7 @@
/turf/proc/make_air()
air = new/datum/gas_mixture
air.temperature = temperature
air.adjust_multi("oxygen", oxygen, "carbon_dioxide", carbon_dioxide, "nitrogen", nitrogen, "phoron", phoron)
air.adjust_multi(GAS_O2, oxygen, GAS_CO2, carbon_dioxide, GAS_N2, nitrogen, GAS_PHORON, phoron)
air.group_multiplier = 1
air.volume = CELL_VOLUME
+2 -2
View File
@@ -171,8 +171,8 @@ Class Procs:
to_chat(M,name)
for(var/g in air.gas)
to_chat(M, "[gas_data.name[g]]: [air.gas[g]]")
to_chat(M, "P: [air.return_pressure()] kPa V: [air.volume]L T: [air.temperature]K ([air.temperature - T0C]C)")
to_chat(M, "O2 per N2: [(air.gas["nitrogen"] ? air.gas["oxygen"]/air.gas["nitrogen"] : "N/A")] Moles: [air.total_moles]")
to_chat(M, "P: [air.return_pressure()] kPa V: [air.volume]L T: [air.temperature]°K ([air.temperature - T0C]°C)")
to_chat(M, "O2 per N2: [(air.gas[GAS_N2] ? air.gas[GAS_O2]/air.gas[GAS_N2] : "N/A")] Moles: [air.total_moles]")
to_chat(M, "Simulated: [contents.len] ([air.group_multiplier])")
//to_chat(M, "Unsimulated: [unsimulated_contents.len]")
//to_chat(M, "Edges: [edges.len]")
+5 -1
View File
@@ -57,6 +57,10 @@
#define MAT_CONCRETE "concrete"
#define MAT_PLASTEELREBAR "plasteel rebar"
#define MAT_GRASS "grass"
#define MAT_RESIN "resin"
#define MAT_CULT "cult"
#define MAT_ALIENALLOY "alienalloy"
#define MAT_COMPOSITE "composite"
#define DEFAULT_TABLE_MATERIAL MAT_PLASTIC
@@ -84,4 +88,4 @@
///if the user won't receive a warning when attacking the container with an unallowed item.
#define MATCONTAINER_SILENT (1<<3)
#define GET_MATERIAL_REF(arguments...) _GetMaterialRef(list(##arguments))
#define GET_MATERIAL_REF(arguments...) _GetMaterialRef(list(##arguments))
+20
View File
@@ -0,0 +1,20 @@
#define ORE_MARBLE "marble"
#define ORE_QUARTZ "quartz"
#define ORE_COPPER "copper"
#define ORE_TIN "tin"
#define ORE_BAUXITE "bauxite"
#define ORE_URANIUM "uranium"
#define ORE_PLATINUM "platinum"
#define ORE_HEMATITE "hematite"
#define ORE_RUTILE "rutile"
#define ORE_CARBON "carbon"
#define ORE_DIAMOND "diamond"
#define ORE_GOLD "gold"
#define ORE_SILVER "silver"
#define ORE_PHORON "phoron"
#define ORE_LEAD "lead"
#define ORE_VOPAL "void opal"
#define ORE_VERDANTIUM "verdantium"
#define ORE_PAINITE "painite"
#define ORE_MHYDROGEN "mhydrogen"
#define ORE_SAND "sand"
+112
View File
@@ -0,0 +1,112 @@
// Gasses
#define GAS_CO2 "carbon_dioxide"
#define GAS_N2 "nitrogen"
#define GAS_N2O "nitrous_oxide"
#define GAS_O2 "oxygen"
#define GAS_PHORON "phoron"
#define GAS_VOLATILE_FUEL "volatile_fuel"
// Gas Reagents
#define REAGENT_CARBON_DIOXIDE "Nitrogen"
#define REAGENT_NITROGEN "Nitrogen"
#define REAGENT_ID_NITROGEN "nitrogen"
#define REAGENT_NITROUS_OXIDE "Nitrous Oxide"
#define REAGENT_OXYGEN "Oxygen"
#define REAGENT_ID_OXYGEN "oxygen"
#define REAGENT_VOLATILE_FUEL "Volatile Fuel"
#define REAGENT_ID_HYDROGEN "hydrogen"
// Fluid Reagents
#define REAGENT_WATER "Water"
#define REAGENT_ID_WATER "water"
#define REAGENT_PACID "pacid"
// Solid Reagents
#define REAGENT_IRON "Iron"
#define REAGENT_ID_IRON "iron"
#define REAGENT_COPPER "Copper"
#define REAGENT_ID_COPPER "copper"
#define REAGENT_SILVER "Silver"
#define REAGENT_ID_SILVER "silver"
#define REAGENT_GOLD "Gold"
#define REAGENT_ID_GOLD "gold"
#define REAGENT_SLIMEJELLY "Slimejelly"
#define REAGENT_ID_SLIMEJELLY "slimejelly"
// Toxins
#define REAGEMT_PHORON "Phoron"
#define REAGENT_ID_PHORON "phoron"
#define REAGENT_LEAD "Lead"
#define REAGENT_ID_LEAD "lead"
#define REAGENT_SPIDERTOXIN "Spidertoxin"
#define REAGENT_ID_SPIDERTOXIN "spidertoxin"
#define REAGENT_ID_SILICATE "silicate"
#define REAGENT_ID_POTASSIUM "potassium"
#define REAGENT_ID_URANIUM "uranium"
#define REAGENT_ID_CARBON "carbon"
#define REAGENT_ID_PLATINUM "platinum"
#define REAGENT_ID_ALUMINIUM "aluminum"
#define REAGENT_ID_CALCIUMCARBONATE "calciumcarbonate"
todos
defective_nanites
var/list/produceable_chemicals = list("inaprovaline","anti_toxin","alkysine","bicaridine","tramadol","kelotane","leporazine",REAGENT_ID_IRON,REAGENT_ID_PHORON,"condensedcapsaicin_v","frostoil")
var/randomized_reagent = REAGENT_ID_IRON // The reagent chosen at random to be produced, if there's no one piloting the worm.
var/passive_reagent = "paracetamol" // Reagent passively produced by the leech. Should usually be a painkiller.
supermatter
mydrogen
silicon
lithium
deuterium
tritium
helium-3
boron
chemreact = list( "nutriment" = list("nutr" = 0.5),
"radium" = list("toxic" = 0.3, "mut" = 1),
"mutagen" = list("nutr" = 0.4, "mut" = 2),
"water" = list("nutr" = -0.1),
"milk" = list("nutr" = 0.3),
"sacid" = list("toxic" = 1),
"pacid" = list("toxic" = 2),
"chlorine" = list("toxic" = 0.5),
"ammonia" = list("toxic" = 0.5),
"sodawater" = list("toxic" = 0.1, "nutr" = -0.1),
"beer" = list("nutr" = 0.6),
"diethylamine" = list("nutr" = 0.9),
"sugar" = list("toxic" = 0.4, "nutr" = 0.2),
"eznutrient" = list("nutr" = 0.8),
"cryoxadone" = list("toxic" = 0.4),
"flourine" = list("toxic" = 0.1),
"robustharvest" = list("nutr" = 1.5),
"glucose" = list("nutr" = 0.5),
"blood" = list("nutr" = 0.75, "toxic" = 0.05, "mut" = 0.45),
"fuel" = list("toxic" = 0.4),
"toxin" = list("toxic" = 0.5),
"carpotoxin" = list("toxic" = 1, "mut" = 1.5),
REAGENT_ID_PHORON = list("toxic" = 1.5, "mut" = 0.03),
"virusfood" = list("nutr" = 1.5, "mut" = 0.32),
"cyanide" = list("toxic" = 3.5),
"slimejelly" = list("nutr" = 0.5),
"amutationtoxin" = list("toxic" = 0.1, "heal" = 1.5, "mut" = 3),
"mutationtoxin" = list("toxic" = 0.1, "heal" = 1, "mut" = 1.5),
"gold" = list("heal" = 0.3, "nutr" = 0.7, "mut" = 0.3),
"uranium" = list("heal" = 0.3, "toxic" = 0.7, "mut" = 1.2),
"glycerol" = list("nutr" = 0.6),
"woodpulp" = list("heal" = 0.1, "nutr" = 0.7),
"docilitytoxin" = list("nutr" = 0.3) )
+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)
+1 -1
View File
@@ -27,7 +27,7 @@ SUBSYSTEM_DEF(chemistry)
//Chemical Reactions - Initialises all /decl/chemical_reaction into a list
// It is filtered into multiple lists within a list.
// For example:
// chemical_reactions_by_reagent["phoron"] is a list of all reactions relating to phoron
// chemical_reactions_by_reagent[REAGENT_ID_PHORON] is a list of all reactions relating to phoron
// Note that entries in the list are NOT duplicated. So if a reaction pertains to
// more than one chemical it will still only appear in only one of the sublists.
/datum/controller/subsystem/chemistry/proc/initialize_chemical_reactions()
+4 -4
View File
@@ -108,10 +108,10 @@ SUBSYSTEM_DEF(plants)
if(survive_on_station)
if(seed.consume_gasses)
seed.consume_gasses["phoron"] = null
seed.consume_gasses["carbon_dioxide"] = null
if(seed.chems && !isnull(seed.chems["pacid"]))
seed.chems["pacid"] = null // Eating through the hull will make these plants completely inviable, albeit very dangerous.
seed.consume_gasses[GAS_PHORON] = null
seed.consume_gasses[GAS_CO2] = null
if(seed.chems && !isnull(seed.chems[REAGENT_PACID]))
seed.chems[REAGENT_PACID] = null // Eating through the hull will make these plants completely inviable, albeit very dangerous.
seed.chems -= null // Setting to null does not actually remove the entry, which is weird.
seed.set_trait(TRAIT_IDEAL_HEAT,293)
seed.set_trait(TRAIT_HEAT_TOLERANCE,20)
+13 -13
View File
@@ -1,26 +1,26 @@
/decl/xgm_gas/oxygen
id = "oxygen"
name = "Oxygen"
id = GAS_O2
name = REAGENT_OXYGEN
specific_heat = 20 // J/(mol*K)
molar_mass = 0.032 // kg/mol
flags = XGM_GAS_OXIDIZER
/decl/xgm_gas/nitrogen
id = "nitrogen"
name = "Nitrogen"
id = GAS_N2
name = REAGENT_NITROGEN
specific_heat = 20 // J/(mol*K)
molar_mass = 0.028 // kg/mol
/decl/xgm_gas/carbon_dioxide
id = "carbon_dioxide"
name = "Carbon Dioxide"
id = GAS_CO2
name = REAGENT_CARBON_DIOXIDE
specific_heat = 30 // J/(mol*K)
molar_mass = 0.044 // kg/mol
/decl/xgm_gas/phoron
id = "phoron"
name = "Phoron"
id = GAS_PHORON
name = REAGENT_ID_PHORON
//Note that this has a significant impact on TTV yield.
//Because it is so high, any leftover phoron soaks up a lot of heat and drops the yield pressure.
@@ -36,19 +36,19 @@
flags = XGM_GAS_FUEL | XGM_GAS_CONTAMINANT | XGM_GAS_FUSION_FUEL //R-UST port, adding XGM_GAS_FUSION_FUEL flag.
/decl/xgm_gas/volatile_fuel
id = "volatile_fuel"
name = "Volatile Fuel"
id = GAS_VOLATILE_FUEL
name = REAGENT_VOLATILE_FUEL
specific_heat = 253 // J/(mol*K) C8H18 gasoline. Isobaric, but good enough.
molar_mass = 0.114 // kg/mol. same.
flags = XGM_GAS_FUEL
/decl/xgm_gas/nitrous_oxide
id = "nitrous_oxide"
name = "Nitrous Oxide"
id = GAS_N2O
name = REAGENT_NITROUS_OXIDE
specific_heat = 40 // J/(mol*K)
molar_mass = 0.044 // kg/mol. N2O
tile_overlay = "nitrous_oxide"
overlay_limit = 1
flags = XGM_GAS_OXIDIZER
flags = XGM_GAS_OXIDIZER
+1 -1
View File
@@ -501,7 +501,7 @@ var/global/list/all_objectives = list()
for(var/obj/item/I in all_items) //Check for phoron tanks
if(istype(I, steal_target))
found_amount += (target_name=="28 moles of phoron (full tank)" ? (I:air_contents:gas["phoron"]) : (I:amount))
found_amount += (target_name=="28 moles of phoron (full tank)" ? (I:air_contents:gas[GAS_PHORON]) : (I:amount))
return found_amount>=target_amount
if("50 coins (in bag)")
@@ -27,7 +27,7 @@
else if(isturf(hit_atom))
var/turf/T = hit_atom
if(pay_energy(1500))
T.assume_gas("oxygen", 200)
T.assume_gas("nitrogen", 800)
T.assume_gas(GAS_O2, 200)
T.assume_gas(GAS_N2, 800)
playsound(src, 'sound/effects/spray.ogg', 50, 1, -3)
adjust_instability(10)
adjust_instability(10)
+12 -12
View File
@@ -76,7 +76,7 @@
/// red warning minimum value, yellow warning minimum value, yellow warning maximum value, red warning maximum value
/// Use code\defines\gases.dm as reference for id/name. Please keep it consistent
var/list/TLV = list()
var/list/trace_gas = list("nitrous_oxide", "volatile_fuel") //list of other gases that this air alarm is able to detect
var/list/trace_gas = list(GAS_N2O, GAS_VOLATILE_FUEL) //list of other gases that this air alarm is able to detect
var/danger_level = 0
var/pressure_dangerlevel = 0
@@ -108,9 +108,9 @@
/obj/machinery/alarm/server/Initialize(mapload)
. = ..()
req_access = list(access_rd, access_atmospherics, access_engine_equip)
TLV["oxygen"] = list(-1.0, -1.0,-1.0,-1.0) // Partial pressure, kpa
TLV["carbon_dioxide"] = list(-1.0, -1.0, 5, 10) // Partial pressure, kpa
TLV["phoron"] = list(-1.0, -1.0, 0, 0.5) // Partial pressure, kpa
TLV[GAS_O2] = list(-1.0, -1.0,-1.0,-1.0) // Partial pressure, kpa
TLV[GAS_CO2] = list(-1.0, -1.0, 5, 10) // Partial pressure, kpa
TLV[GAS_PHORON] = list(-1.0, -1.0, 0, 0.5) // Partial pressure, kpa
TLV["other"] = list(-1.0, -1.0, 0.5, 1.0) // Partial pressure, kpa
TLV["pressure"] = list(0,ONE_ATMOSPHERE*0.10,ONE_ATMOSPHERE*1.40,ONE_ATMOSPHERE*1.60) /* kpa */
TLV["temperature"] = list(20, 40, 140, 160) // K
@@ -145,10 +145,10 @@
wires = new(src)
// breathable air according to human/Life()
TLV["oxygen"] = list(16, 19, 135, 140) // Partial pressure, kpa
TLV["nitrogen"] = list(0, 0, 135, 140) // Partial pressure, kpa
TLV["carbon_dioxide"] = list(-1.0, -1.0, 5, 10) // Partial pressure, kpa
TLV["phoron"] = list(-1.0, -1.0, 0, 0.5) // Partial pressure, kpa
TLV[GAS_O2] = list(16, 19, 135, 140) // Partial pressure, kpa
TLV[GAS_N2] = list(0, 0, 135, 140) // Partial pressure, kpa
TLV[GAS_CO2] = list(-1.0, -1.0, 5, 10) // Partial pressure, kpa
TLV[GAS_PHORON] = list(-1.0, -1.0, 0, 0.5) // Partial pressure, kpa
TLV["other"] = list(-1.0, -1.0, 0.5, 1.0) // Partial pressure, kpa
TLV["pressure"] = list(ONE_ATMOSPHERE * 0.80, ONE_ATMOSPHERE * 0.90, ONE_ATMOSPHERE * 1.10, ONE_ATMOSPHERE * 1.20) /* kpa */
TLV["temperature"] = list(T0C - 26, T0C, T0C + 40, T0C + 66) // K
@@ -272,11 +272,11 @@
DECLARE_TLV_VALUES
LOAD_TLV_VALUES(TLV["pressure"], environment_pressure)
pressure_dangerlevel = TEST_TLV_VALUES // not local because it's used in process()
LOAD_TLV_VALUES(TLV["oxygen"], environment.gas["oxygen"]*partial_pressure)
LOAD_TLV_VALUES(TLV[GAS_O2], environment.gas[GAS_O2]*partial_pressure)
var/oxygen_dangerlevel = TEST_TLV_VALUES
LOAD_TLV_VALUES(TLV["carbon_dioxide"], environment.gas["carbon_dioxide"]*partial_pressure)
LOAD_TLV_VALUES(TLV[GAS_CO2], environment.gas[GAS_CO2]*partial_pressure)
var/co2_dangerlevel = TEST_TLV_VALUES
LOAD_TLV_VALUES(TLV["phoron"], environment.gas["phoron"]*partial_pressure)
LOAD_TLV_VALUES(TLV[GAS_PHORON], environment.gas[GAS_PHORON]*partial_pressure)
var/phoron_dangerlevel = TEST_TLV_VALUES
LOAD_TLV_VALUES(TLV["temperature"], environment.temperature)
var/temperature_dangerlevel = TEST_TLV_VALUES
@@ -642,7 +642,7 @@
var/list/selected
var/list/thresholds = list()
var/list/gas_names = list("oxygen", "carbon_dioxide", "phoron", "other") //Gas ids made to match code\defines\gases.dm
var/list/gas_names = list(GAS_O2, GAS_CO2, GAS_PHORON, "other") //Gas ids made to match code\defines\gases.dm
for(var/g in gas_names)
thresholds[++thresholds.len] = list("name" = g, "settings" = list())
selected = TLV[g]
+1 -1
View File
@@ -148,7 +148,7 @@
env.merge(removed)
var/turf/T = get_turf(src)
new /obj/effect/decal/cleanable/liquid_fuel(T, 5)
T.assume_gas("volatile_fuel", 5, T20C)
T.assume_gas(GAS_VOLATILE_FUEL, 5, T20C)
T.hotspot_expose(700,400)
var/datum/effect/effect/system/spark_spread/s = new
s.set_up(5, 0, T)
+10 -10
View File
@@ -44,18 +44,18 @@
var/total_moles = air_sample.total_moles
if(total_moles > 0)
if(output&4)
signal.data["oxygen"] = round(100*air_sample.gas["oxygen"]/total_moles,0.1)
signal.data[GAS_O2] = round(100*air_sample.gas[GAS_O2]/total_moles,0.1)
if(output&8)
signal.data["phoron"] = round(100*air_sample.gas["phoron"]/total_moles,0.1)
signal.data[GAS_PHORON] = round(100*air_sample.gas[GAS_PHORON]/total_moles,0.1)
if(output&16)
signal.data["nitrogen"] = round(100*air_sample.gas["nitrogen"]/total_moles,0.1)
signal.data[GAS_N2] = round(100*air_sample.gas[GAS_N2]/total_moles,0.1)
if(output&32)
signal.data["carbon_dioxide"] = round(100*air_sample.gas["carbon_dioxide"]/total_moles,0.1)
signal.data[GAS_CO2] = round(100*air_sample.gas[GAS_CO2]/total_moles,0.1)
else
signal.data["oxygen"] = 0
signal.data["phoron"] = 0
signal.data["nitrogen"] = 0
signal.data["carbon_dioxide"] = 0
signal.data[GAS_O2] = 0
signal.data[GAS_PHORON] = 0
signal.data[GAS_N2] = 0
signal.data[GAS_CO2] = 0
signal.data["sigtype"]="status"
radio_connection.post_signal(src, signal, radio_filter = RADIO_ATMOSIA)
@@ -399,7 +399,7 @@
/obj/machinery/computer/general_air_control/fuel_injection/tgui_act(action, params)
if(..())
return TRUE
switch(action)
if("refresh_status")
device_info = null
@@ -452,4 +452,4 @@
)
radio_connection.post_signal(src, signal, radio_filter = RADIO_ATMOSIA)
. = TRUE
. = TRUE
+11 -11
View File
@@ -387,21 +387,21 @@ update_flag
/obj/machinery/portable_atmospherics/canister/phoron/New()
..()
src.air_contents.adjust_gas("phoron", MolesForPressure())
src.air_contents.adjust_gas(GAS_PHORON, MolesForPressure())
src.update_icon()
return 1
/obj/machinery/portable_atmospherics/canister/oxygen/New()
..()
src.air_contents.adjust_gas("oxygen", MolesForPressure())
src.air_contents.adjust_gas(GAS_O2, MolesForPressure())
src.update_icon()
return 1
/obj/machinery/portable_atmospherics/canister/oxygen/prechilled/New()
..()
src.air_contents.adjust_gas("oxygen", MolesForPressure())
src.air_contents.adjust_gas(GAS_O2, MolesForPressure())
src.air_contents.temperature = 80
src.update_icon()
return 1
@@ -409,14 +409,14 @@ update_flag
/obj/machinery/portable_atmospherics/canister/nitrous_oxide/New()
..()
air_contents.adjust_gas("nitrous_oxide", MolesForPressure())
air_contents.adjust_gas(GAS_N2O, MolesForPressure())
src.update_icon()
return 1
//Dirty way to fill room with gas. However it is a bit easier to do than creating some floor/engine/n2o -rastaf0
/obj/machinery/portable_atmospherics/canister/nitrous_oxide/roomfiller/Initialize()
. = ..()
air_contents.gas["nitrous_oxide"] = 9*4000
air_contents.gas[GAS_N2O] = 9*4000
var/turf/simulated/location = src.loc
if (istype(src.loc))
location.assume_air(air_contents)
@@ -427,13 +427,13 @@ update_flag
..()
src.air_contents.adjust_gas("nitrogen", MolesForPressure())
src.air_contents.adjust_gas(GAS_N2, MolesForPressure())
src.update_icon()
return 1
/obj/machinery/portable_atmospherics/canister/carbon_dioxide/New()
..()
src.air_contents.adjust_gas("carbon_dioxide", MolesForPressure())
src.air_contents.adjust_gas(GAS_CO2, MolesForPressure())
src.update_icon()
return 1
@@ -441,7 +441,7 @@ update_flag
/obj/machinery/portable_atmospherics/canister/air/New()
..()
var/list/air_mix = StandardAirMix()
src.air_contents.adjust_multi("oxygen", air_mix["oxygen"], "nitrogen", air_mix["nitrogen"])
src.air_contents.adjust_multi(GAS_O2, air_mix[GAS_O2], GAS_N2, air_mix[GAS_N2])
src.update_icon()
return 1
@@ -450,19 +450,19 @@ update_flag
// Special types used for engine setup admin verb, they contain double amount of that of normal canister.
/obj/machinery/portable_atmospherics/canister/nitrogen/engine_setup/New()
..()
src.air_contents.adjust_gas("nitrogen", MolesForPressure())
src.air_contents.adjust_gas(GAS_N2, MolesForPressure())
src.update_icon()
return 1
/obj/machinery/portable_atmospherics/canister/carbon_dioxide/engine_setup/New()
..()
src.air_contents.adjust_gas("carbon_dioxide", MolesForPressure())
src.air_contents.adjust_gas(GAS_CO2, MolesForPressure())
src.update_icon()
return 1
/obj/machinery/portable_atmospherics/canister/phoron/engine_setup/New()
..()
src.air_contents.adjust_gas("phoron", MolesForPressure())
src.air_contents.adjust_gas(GAS_PHORON, MolesForPressure())
src.update_icon()
return 1
@@ -50,8 +50,8 @@
/obj/machinery/portable_atmospherics/proc/StandardAirMix()
return list(
"oxygen" = O2STANDARD * MolesForPressure(),
"nitrogen" = N2STANDARD * MolesForPressure())
GAS_O2 = O2STANDARD * MolesForPressure(),
GAS_N2 = N2STANDARD * MolesForPressure())
/obj/machinery/portable_atmospherics/proc/MolesForPressure(var/target_pressure = start_pressure)
return (target_pressure * air_contents.volume) / (R_IDEAL_GAS_EQUATION * air_contents.temperature)
+3 -3
View File
@@ -26,7 +26,7 @@
cell = new/obj/item/cell/apc(src)
var/list/air_mix = StandardAirMix()
src.air_contents.adjust_multi("oxygen", air_mix["oxygen"], "nitrogen", air_mix["nitrogen"])
src.air_contents.adjust_multi(GAS_O2, air_mix[GAS_O2], GAS_N2, air_mix[GAS_N2])
/obj/machinery/portable_atmospherics/powered/pump/update_icon()
cut_overlays()
@@ -141,7 +141,7 @@
data["default_pressure"] = round(initial(target_pressure))
data["min_pressure"] = round(pressuremin)
data["max_pressure"] = round(pressuremax)
data["powerDraw"] = round(last_power_draw)
data["cellCharge"] = cell ? cell.charge : 0
data["cellMaxCharge"] = cell ? cell.maxcharge : 1
@@ -152,7 +152,7 @@
data["holding"]["pressure"] = round(holding.air_contents.return_pressure() > 0 ? holding.air_contents.return_pressure() : 0)
else
data["holding"] = null
return data
/obj/machinery/portable_atmospherics/powered/pump/tgui_act(action, params)
+1 -1
View File
@@ -18,7 +18,7 @@
var/minrate = 0
var/maxrate = 10 * ONE_ATMOSPHERE
var/list/scrubbing_gas = list("phoron", "carbon_dioxide", "nitrous_oxide", "volatile_fuel")
var/list/scrubbing_gas = list(GAS_PHORON, GAS_CO2, GAS_N2O, GAS_VOLATILE_FUEL)
/obj/machinery/portable_atmospherics/powered/scrubber/New()
..()
+1 -1
View File
@@ -218,7 +218,7 @@
if(occupant.bodytemperature < T0C)
occupant.Sleeping(max(5, (1/occupant.bodytemperature)*2000))
occupant.Paralyse(max(5, (1/occupant.bodytemperature)*3000))
if(air_contents.gas["oxygen"] > 2)
if(air_contents.gas[GAS_O2] > 2)
if(occupant.getOxyLoss()) occupant.adjustOxyLoss(-1)
else
occupant.adjustOxyLoss(-1)
+2 -2
View File
@@ -525,7 +525,7 @@
name = "Phoron Airlock"
desc = "No way this can end badly."
icon = 'icons/obj/doors/Doorphoron.dmi'
mineral = "phoron"
mineral = MAT_PHORON
/obj/machinery/door/airlock/phoron/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
@@ -537,7 +537,7 @@
/obj/machinery/door/airlock/phoron/proc/PhoronBurn(temperature)
for(var/turf/simulated/floor/target_tile in range(2,loc))
target_tile.assume_gas("phoron", 35, 400+T0C)
target_tile.assume_gas(GAS_PHORON, 35, 400+T0C)
spawn (0) target_tile.hotspot_expose(temperature, 400)
for(var/turf/simulated/wall/W in range(3,src))
W.burn((temperature/4))//Added so that you can't set off a massive chain reaction with a small flame
+2 -2
View File
@@ -114,11 +114,11 @@
return
var/datum/gas_mixture/GM = new
if(prob(10))
T.assume_gas("phoron", 100, 1500+T0C)
T.assume_gas(GAS_PHORON, 100, 1500+T0C)
T.visible_message("The [src] suddenly disgorges a cloud of heated phoron.")
destroy()
else
T.assume_gas("phoron", 5, istype(T) ? T.air.temperature : T20C)
T.assume_gas(GAS_PHORON, 5, istype(T) ? T.air.temperature : T20C)
T.visible_message("The [src] suddenly disgorges a cloud of phoron.")
T.assume_air(GM)
return
+1 -1
View File
@@ -446,7 +446,7 @@
cabin_air = new
cabin_air.temperature = T20C
cabin_air.volume = 200
cabin_air.adjust_multi("oxygen", O2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature), "nitrogen", N2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature))
cabin_air.adjust_multi(GAS_O2, O2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature), GAS_N2, N2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature))
return cabin_air
/obj/mecha/proc/add_radio()
+6 -6
View File
@@ -211,42 +211,42 @@
name="Phazon Torso"
icon_state = "phazon_harness"
//construction_time = 300
//construction_cost = list(MAT_STEEL=35000,"glass"=10000,"phoron"=20000)
//construction_cost = list(MAT_STEEL=35000,"glass"=10000,MAT_PHORON=20000)
origin_tech = list(TECH_DATA = 5, TECH_MATERIAL = 7, TECH_BLUESPACE = 6, TECH_POWER = 6)
/obj/item/mecha_parts/part/phazon_head
name="Phazon Head"
icon_state = "phazon_head"
//construction_time = 200
//construction_cost = list(MAT_STEEL=15000,"glass"=5000,"phoron"=10000)
//construction_cost = list(MAT_STEEL=15000,"glass"=5000,MAT_PHORON=10000)
origin_tech = list(TECH_DATA = 4, TECH_MATERIAL = 5, TECH_MAGNET = 6)
/obj/item/mecha_parts/part/phazon_left_arm
name="Phazon Left Arm"
icon_state = "phazon_l_arm"
//construction_time = 200
//construction_cost = list(MAT_STEEL=20000,"phoron"=10000)
//construction_cost = list(MAT_STEEL=20000,MAT_PHORON=10000)
origin_tech = list(TECH_MATERIAL = 5, TECH_BLUESPACE = 2, TECH_MAGNET = 2)
/obj/item/mecha_parts/part/phazon_right_arm
name="Phazon Right Arm"
icon_state = "phazon_r_arm"
//construction_time = 200
//construction_cost = list(MAT_STEEL=20000,"phoron"=10000)
//construction_cost = list(MAT_STEEL=20000,MAT_PHORON=10000)
origin_tech = list(TECH_MATERIAL = 5, TECH_BLUESPACE = 2, TECH_MAGNET = 2)
/obj/item/mecha_parts/part/phazon_left_leg
name="Phazon Left Leg"
icon_state = "phazon_l_leg"
//construction_time = 200
//construction_cost = list(MAT_STEEL=20000,"phoron"=10000)
//construction_cost = list(MAT_STEEL=20000,MAT_PHORON=10000)
origin_tech = list(TECH_MATERIAL = 5, TECH_BLUESPACE = 3, TECH_MAGNET = 3)
/obj/item/mecha_parts/part/phazon_right_leg
name="Phazon Right Leg"
icon_state = "phazon_r_leg"
//construction_time = 200
//construction_cost = list(MAT_STEEL=20000,"phoron"=10000)
//construction_cost = list(MAT_STEEL=20000,MAT_PHORON=10000)
origin_tech = list(TECH_MATERIAL = 5, TECH_BLUESPACE = 3, TECH_MAGNET = 3)
///////// Odysseus
+2 -2
View File
@@ -171,7 +171,7 @@
triggered = TRUE
for (var/turf/simulated/floor/target in range(1,src))
if(!target.blocks_air)
target.assume_gas("nitrous_oxide", 30)
target.assume_gas(GAS_N2O, 30)
visible_message("\The [src.name] detonates!")
spawn(0)
qdel(src)
@@ -185,7 +185,7 @@
triggered = TRUE
for (var/turf/simulated/floor/target in range(1,src))
if(!target.blocks_air)
target.assume_gas("phoron", 30)
target.assume_gas(GAS_PHORON, 30)
target.hotspot_expose(1000, CELL_VOLUME)
visible_message("\The [src.name] detonates!")
spawn(0)
@@ -63,14 +63,14 @@
OT.master = V
PT.valve_welded = 1
PT.air_contents.gas["phoron"] = phoron_amt
PT.air_contents.gas["carbon_dioxide"] = carbon_amt
PT.air_contents.gas[GAS_PHORON] = phoron_amt
PT.air_contents.gas[GAS_CO2] = carbon_amt
PT.air_contents.total_moles = phoron_amt + carbon_amt
PT.air_contents.temperature = PHORON_MINIMUM_BURN_TEMPERATURE+1
PT.air_contents.update_values()
OT.valve_welded = 1
OT.air_contents.gas["oxygen"] = oxygen_amt
OT.air_contents.gas[GAS_O2] = oxygen_amt
OT.air_contents.total_moles = oxygen_amt
OT.air_contents.temperature = PHORON_MINIMUM_BURN_TEMPERATURE+1
OT.air_contents.update_values()
@@ -6,10 +6,10 @@
var/pressure = environment.return_pressure()
var/total_moles = environment.total_moles
if (total_moles)
var/o2_level = environment.gas["oxygen"]/total_moles
var/n2_level = environment.gas["nitrogen"]/total_moles
var/co2_level = environment.gas["carbon_dioxide"]/total_moles
var/phoron_level = environment.gas["phoron"]/total_moles
var/o2_level = environment.gas[GAS_O2]/total_moles
var/n2_level = environment.gas[GAS_N2]/total_moles
var/co2_level = environment.gas[GAS_CO2]/total_moles
var/phoron_level = environment.gas[GAS_PHORON]/total_moles
var/unknown_level = 1-(o2_level+n2_level+co2_level+phoron_level)
// Label is what the entry is describing
@@ -169,9 +169,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM
src.lit = 1
playsound(src, 'sound/items/cigs_lighters/cig_light.ogg', 75, 1, -1)
damtype = "fire"
if(reagents.get_reagent_amount("phoron")) // the phoron explodes when exposed to fire
if(reagents.get_reagent_amount(REAGENT_ID_PHORON)) // the phoron explodes when exposed to fire
var/datum/effect/effect/system/reagents_explosion/e = new()
e.set_up(round(reagents.get_reagent_amount("phoron") / 2.5, 1), get_turf(src), 0, 0)
e.set_up(round(reagents.get_reagent_amount(REAGENT_ID_PHORON) / 2.5, 1), get_turf(src), 0, 0)
e.start()
qdel(src)
return
@@ -135,7 +135,7 @@
usr.set_machine(src)
if(href_list["light"])
if(!ptank) return
if(ptank.air_contents.gas["phoron"] < 1) return
if(ptank.air_contents.gas[GAS_PHORON] < 1) return
if(!status) return
lit = !lit
if(lit)
@@ -184,8 +184,8 @@
//Transfer 5% of current tank air contents to turf
var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(0.02*(throw_amount/100))
//air_transfer.toxins = air_transfer.toxins * 5 // This is me not comprehending the air system. I realize this is mischievious and I could probably make it work without fucking it up like this, but there you have it. -- TLE
new/obj/effect/decal/cleanable/liquid_fuel/flamethrower_fuel(target,air_transfer.gas["phoron"],get_dir(loc,target))
air_transfer.gas["phoron"] = 0
new/obj/effect/decal/cleanable/liquid_fuel/flamethrower_fuel(target,air_transfer.gas[GAS_PHORON],get_dir(loc,target))
air_transfer.gas[GAS_PHORON] = 0
target.assume_air(air_transfer)
//Burn it based on transfered gas
//target.hotspot_expose(part4.air_contents.temperature*2,300)
@@ -237,7 +237,7 @@
B1.reagents.add_reagent("aluminum", 15)
B1.reagents.add_reagent("fuel",20)
B2.reagents.add_reagent("phoron", 15)
B2.reagents.add_reagent(REAGENT_ID_PHORON, 15)
B2.reagents.add_reagent("sacid", 15)
B1.reagents.add_reagent("fuel",20)
@@ -213,7 +213,7 @@
pack = new /obj/item/storage/fancy/cigarettes(src)
// Dylovene. Going with 1.5 rather than 1.6666666...
fill_cigarre_package(pack, list("potassium" = 1.5, "nitrogen" = 1.5, "silicon" = 1.5))
fill_cigarre_package(pack, list("potassium" = 1.5, REAGENT_ID_NITROGEN = 1.5, "silicon" = 1.5))
// Mindbreaker
fill_cigarre_package(pack, list("silicon" = 4.5, "hydrogen" = 4.5))
@@ -92,7 +92,7 @@
/obj/item/tank/jetpack/void/Initialize()
. = ..()
air_contents.adjust_gas("oxygen", (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
air_contents.adjust_gas(GAS_O2, (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
/obj/item/tank/jetpack/oxygen
name = "jetpack (oxygen)"
@@ -102,7 +102,7 @@
/obj/item/tank/jetpack/oxygen/Initialize()
. = ..()
air_contents.adjust_gas("oxygen", (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
air_contents.adjust_gas(GAS_O2, (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
/obj/item/tank/jetpack/breaker
name = "CSC industrial jetpack"
@@ -112,7 +112,7 @@
/obj/item/tank/jetpack/breaker/Initialize()
. = ..()
air_contents.adjust_gas("volatile_fuel", (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
air_contents.adjust_gas(GAS_VOLATILE_FUEL, (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
/obj/item/tank/jetpack/carbondioxide
name = "jetpack (carbon dioxide)"
@@ -123,7 +123,7 @@
/obj/item/tank/jetpack/carbondioxide/Initialize()
. = ..()
air_contents.adjust_gas("carbon_dioxide", (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
air_contents.adjust_gas(GAS_CO2, (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
/obj/item/tank/jetpack/rig
name = "jetpack"
@@ -18,11 +18,11 @@
/obj/item/tank/oxygen/Initialize()
. = ..()
air_contents.adjust_gas("oxygen", (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
air_contents.adjust_gas(GAS_O2, (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
/obj/item/tank/oxygen/examine(mob/user)
. = ..()
if(loc == user && (air_contents.gas["oxygen"] < 10))
if(loc == user && (air_contents.gas[GAS_O2] < 10))
. += span_warning("The meter on \the [src] indicates you are almost out of oxygen!")
/obj/item/tank/oxygen/yellow
@@ -44,8 +44,8 @@
/obj/item/tank/anesthetic/Initialize()
. = ..()
air_contents.gas["oxygen"] = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
air_contents.gas["nitrous_oxide"] = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
air_contents.gas[GAS_O2] = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
air_contents.gas[GAS_N2O] = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
air_contents.update_values()
/*
@@ -58,13 +58,13 @@
/obj/item/tank/air/examine(mob/user)
. = ..()
if(loc == user && (air_contents.gas["oxygen"] < 1))
if(loc == user && (air_contents.gas[GAS_O2] < 1))
. += span_warning("The meter on \the [src] indicates you are almost out of air!")
user << sound('sound/effects/alert.ogg')
/obj/item/tank/air/Initialize()
. = ..()
src.air_contents.adjust_multi("oxygen", (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD, "nitrogen", (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD)
src.air_contents.adjust_multi(GAS_O2, (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD, GAS_N2, (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD)
/*
* Phoron
@@ -78,7 +78,7 @@
/obj/item/tank/phoron/Initialize()
. = ..()
src.air_contents.adjust_gas("phoron", (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C))
src.air_contents.adjust_gas(GAS_PHORON, (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C))
/obj/item/tank/phoron/attackby(obj/item/W as obj, mob/user as mob)
..()
@@ -102,7 +102,7 @@
/obj/item/tank/vox/Initialize()
. = ..()
air_contents.adjust_gas("phoron", (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)) //VOREStation Edit
air_contents.adjust_gas(GAS_PHORON, (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)) //VOREStation Edit
/obj/item/tank/phoron/pressurized
name = "fuel can"
@@ -112,7 +112,7 @@
/obj/item/tank/phoron/pressurized/Initialize()
. = ..()
adjust_scale(0.8)
air_contents.adjust_gas("phoron", (7*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
air_contents.adjust_gas(GAS_PHORON, (7*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
/*
* Emergency Oxygen
@@ -137,11 +137,11 @@
/obj/item/tank/emergency/oxygen/Initialize()
. = ..()
src.air_contents.adjust_gas("oxygen", (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
src.air_contents.adjust_gas(GAS_O2, (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
/obj/item/tank/emergency/oxygen/examine(mob/user)
. = ..()
if(loc == user && (air_contents.gas["oxygen"] < 0.2))
if(loc == user && (air_contents.gas[GAS_O2] < 0.2))
. += span_danger("The meter on the [src.name] indicates you are almost out of air!")
user << sound('sound/effects/alert.ogg')
@@ -165,7 +165,7 @@
/obj/item/tank/stasis/oxygen/Initialize()
. = ..()
src.air_contents.adjust_gas("oxygen", (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
src.air_contents.adjust_gas(GAS_O2, (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
/obj/item/tank/emergency/nitrogen
name = "emergency nitrogen tank"
@@ -175,7 +175,7 @@
/obj/item/tank/emergency/nitrogen/Initialize()
. = ..()
src.air_contents.adjust_gas("nitrogen", (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
src.air_contents.adjust_gas(GAS_N2, (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
/obj/item/tank/emergency/nitrogen/double
name = "double emergency nitrogen tank"
@@ -191,7 +191,7 @@
/obj/item/tank/emergency/phoron/Initialize()
. = ..()
src.air_contents.adjust_gas("phoron", (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
src.air_contents.adjust_gas(GAS_PHORON, (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
/obj/item/tank/emergency/phoron/double
name = "double emergency phoron tank"
@@ -210,11 +210,11 @@
/obj/item/tank/nitrogen/Initialize()
. = ..()
src.air_contents.adjust_gas("nitrogen", (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C))
src.air_contents.adjust_gas(GAS_N2, (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C))
/obj/item/tank/nitrogen/examine(mob/user)
. = ..()
if(loc == user && (air_contents.gas["nitrogen"] < 10))
if(loc == user && (air_contents.gas[GAS_N2] < 10))
. += span_danger("The meter on \the [src] indicates you are almost out of nitrogen!")
//playsound(user, 'sound/effects/alert.ogg', 50, 1)
@@ -227,4 +227,4 @@
/obj/item/tank/stasis/nitro_cryo/Initialize()
. = ..()
src.air_contents.adjust_gas_temp("nitrogen", (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*TN60C), TN60C)
src.air_contents.adjust_gas_temp(GAS_N2, (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*TN60C), TN60C)
@@ -10,7 +10,7 @@
/obj/item/tank/emergency/phoron/double/New()
..()
air_contents.adjust_gas("phoron", (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
air_contents.adjust_gas(GAS_PHORON, (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
//New icons
/obj/item/tank/oxygen
@@ -546,8 +546,8 @@ var/list/global/tank_gauge_cache = list()
oxygen_amt = 4.5
src.air_contents.gas["phoron"] = phoron_amt
src.air_contents.gas["oxygen"] = oxygen_amt
src.air_contents.gas[GAS_PHORON] = phoron_amt
src.air_contents.gas[GAS_O2] = oxygen_amt
src.air_contents.update_values()
src.valve_welded = 1
src.air_contents.temperature = PHORON_MINIMUM_BURN_TEMPERATURE-1
+2 -2
View File
@@ -150,7 +150,7 @@
/obj/structure/bonfire/proc/check_oxygen()
var/datum/gas_mixture/G = loc.return_air()
if(G.gas["oxygen"] < 1)
if(G.gas[GAS_O2] < 1)
return FALSE
return TRUE
@@ -345,7 +345,7 @@
/obj/structure/fireplace/proc/check_oxygen()
var/datum/gas_mixture/G = loc.return_air()
if(G.gas["oxygen"] < 1)
if(G.gas[GAS_O2] < 1)
return FALSE
return TRUE
@@ -149,7 +149,7 @@
return PROJECTILE_CONTINUE // It's a hole in the ground, doesn't usually stop or even care about bullets
/obj/structure/closet/grave/return_air_for_internal_lifeform(var/mob/living/L)
var/gasid = "carbon_dioxide"
var/gasid = GAS_CO2
if(ishuman(L))
var/mob/living/carbon/human/H = L
if(H.species && H.species.exhale_type)
@@ -267,7 +267,7 @@
var/material_name = S.get_material_name()
if (S)
if (S.get_amount() >= 1)
if(material_name == "rglass")
if(material_name == MAT_RGLASS)
playsound(src, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
if(do_after(user, 4 SECONDS, src, exclusive = TASK_ALL_EXCLUSIVE) && !glass)
@@ -276,7 +276,7 @@
glass = 1
else if(material_name)
// Ugly hack, will suffice for now. Need to fix it upstream as well, may rewrite mineral walls. ~Z
if(!(material_name in list("gold", "silver", "diamond", "uranium", "phoron", "sandstone")))
if(!(material_name in list(MAT_GOLD, MAT_SILVER, MAT_DIAMOND, MAT_URANIUM, MAT_PHORON, MAT_SANDSTONE)))
to_chat(user, "You cannot make an airlock out of that material.")
return
if(S.get_amount() >= 2)
+2 -2
View File
@@ -141,5 +141,5 @@
/datum/gas_mixture/pod_air/New()
. = ..()
gas = list(
"oxygen" = 21,
"nitrogen" = 79)
GAS_O2 = 21,
GAS_N2 = 79)
+9 -9
View File
@@ -242,25 +242,25 @@
SSradiation.radiate(src, round(material.radioactivity/3))
/obj/structure/simple_door/iron/Initialize(mapload,var/material_name)
..(mapload, material_name || "iron")
..(mapload, material_name || MAT_IRON)
/obj/structure/simple_door/silver/Initialize(mapload,var/material_name)
..(mapload, material_name || "silver")
..(mapload, material_name || MAT_SILVER)
/obj/structure/simple_door/gold/Initialize(mapload,var/material_name)
..(mapload, material_name || "gold")
..(mapload, material_name || MAT_GOLD)
/obj/structure/simple_door/uranium/Initialize(mapload,var/material_name)
..(mapload, material_name || "uranium")
..(mapload, material_name || MAT_URANIUM)
/obj/structure/simple_door/sandstone/Initialize(mapload,var/material_name)
..(mapload, material_name || "sandstone")
..(mapload, material_name || MAT_SANDSTONE)
/obj/structure/simple_door/phoron/Initialize(mapload,var/material_name)
..(mapload, material_name || "phoron")
..(mapload, material_name || MAT_PHORON)
/obj/structure/simple_door/diamond/Initialize(mapload,var/material_name)
..(mapload, material_name || "diamond")
..(mapload, material_name || MAT_DIAMOND)
/obj/structure/simple_door/wood/Initialize(mapload,var/material_name)
..(mapload, material_name || MAT_WOOD)
@@ -273,10 +273,10 @@
..(mapload, material_name || MAT_SIFWOOD)
/obj/structure/simple_door/resin/Initialize(mapload,var/material_name)
..(mapload, material_name || "resin")
..(mapload, material_name || MAT_RESIN)
/obj/structure/simple_door/cult/Initialize(mapload,var/material_name)
..(mapload, material_name || "cult")
..(mapload, material_name || MAT_CULT)
/obj/structure/simple_door/cult/TryToSwitchState(atom/user)
if(isliving(user))
@@ -81,7 +81,7 @@
/obj/structure/transit_tube_pod/New(loc)
..(loc)
air_contents.adjust_multi("oxygen", MOLES_O2STANDARD * 2, "nitrogen", MOLES_N2STANDARD)
air_contents.adjust_multi(GAS_O2, MOLES_O2STANDARD * 2, GAS_N2, MOLES_N2STANDARD)
air_contents.temperature = T20C
// Give auto tubes time to align before trying to start moving
+1 -1
View File
@@ -341,7 +341,7 @@
/turf/simulated/floor/reinforced/n20/Initialize()
. = ..()
if(!air) make_air()
air.adjust_gas("nitrous_oxide", ATMOSTANK_NITROUSOXIDE)
air.adjust_gas(GAS_N2O, ATMOSTANK_NITROUSOXIDE)
/turf/simulated/floor/cult
name = "engraved floor"
+2 -2
View File
@@ -21,11 +21,11 @@
var/datum/gas_mixture/water_breath = new()
var/datum/gas_mixture/above_air = return_air()
var/amount = 300
water_breath.adjust_gas("oxygen", amount) // Assuming water breathes just extract the oxygen directly from the water.
water_breath.adjust_gas(GAS_O2, amount) // Assuming water breathes just extract the oxygen directly from the water.
water_breath.temperature = above_air.temperature
return water_breath
else
var/gasid = "carbon_dioxide"
var/gasid = GAS_CO2
if(ishuman(L))
var/mob/living/carbon/human/H = L
if(H.species && H.species.exhale_type)
+20 -20
View File
@@ -47,59 +47,59 @@
icon_state = "cult"
/turf/simulated/wall/iron/Initialize(mapload)
. = ..(mapload, "iron")
. = ..(mapload, MAT_IRON)
/turf/simulated/wall/uranium/Initialize(mapload)
. = ..(mapload, "uranium")
. = ..(mapload, MAT_URANIUM)
/turf/simulated/wall/diamond/Initialize(mapload)
. = ..(mapload, "diamond")
. = ..(mapload, MAT_DIAMOND)
/turf/simulated/wall/gold/Initialize(mapload)
. = ..(mapload, "gold")
. = ..(mapload, MAT_GOLD)
/turf/simulated/wall/silver/Initialize(mapload)
. = ..(mapload, "silver")
. = ..(mapload, MAT_SILVER)
/turf/simulated/wall/lead/Initialize(mapload)
. = ..(mapload, "lead")
. = ..(mapload, MAT_LEAD)
/turf/simulated/wall/r_lead/Initialize(mapload)
. = ..(mapload, "lead", "lead")
. = ..(mapload, MAT_LEAD, MAT_LEAD)
/turf/simulated/wall/phoron/Initialize(mapload)
. = ..(mapload, "phoron")
. = ..(mapload, MAT_PHORON)
/turf/simulated/wall/sandstone/Initialize(mapload)
. = ..(mapload, "sandstone")
. = ..(mapload, MAT_SANDSTONE)
/turf/simulated/wall/ironphoron/Initialize(mapload)
. = ..(mapload, "iron","phoron")
. = ..(mapload, MAT_IRON,MAT_PHORON)
/turf/simulated/wall/golddiamond/Initialize(mapload)
. = ..(mapload, "gold","diamond")
. = ..(mapload, MAT_GOLD,MAT_DIAMOND)
/turf/simulated/wall/silvergold/Initialize(mapload)
. = ..(mapload, "silver","gold")
. = ..(mapload, MAT_SILVER,MAT_GOLD)
/turf/simulated/wall/sandstonediamond/Initialize(mapload)
. = ..(mapload, "sandstone","diamond")
. = ..(mapload, MAT_SANDSTONE,MAT_DIAMOND)
/turf/simulated/wall/snowbrick/Initialize(mapload)
. = ..(mapload, "packed snow")
. = ..(mapload, MAT_SNOWBRICK)
/turf/simulated/wall/resin/Initialize(mapload)
. = ..(mapload, "resin",null,"resin")
. = ..(mapload, MAT_RESIN,null,MAT_RESIN)
/turf/simulated/wall/concrete
icon_state = "brick"
/turf/simulated/wall/concrete/Initialize(mapload)
. = ..(mapload, "concrete") //3strong
. = ..(mapload, MAT_CONCRETE) //3strong
/turf/simulated/wall/r_concrete
icon_state = "rbrick"
/turf/simulated/wall/r_concrete/Initialize(mapload)
. = ..(mapload, "concrete","plasteel rebar") //3strong
. = ..(mapload, MAT_CONCRETE,MAT_PLASTEELREBAR) //3strong
// Kind of wondering if this is going to bite me in the butt.
/turf/simulated/wall/skipjack/Initialize(mapload)
. = ..(mapload, "alienalloy")
. = ..(mapload, MAT_ALIENALLOY)
/turf/simulated/wall/skipjack/attackby()
return
/turf/simulated/wall/titanium/Initialize(mapload)
. = ..(mapload, "titanium")
. = ..(mapload, MAT_TITANIUM)
/turf/simulated/wall/durasteel/Initialize(mapload)
. = ..(mapload, "durasteel", "durasteel")
. = ..(mapload, MAT_DURASTEEL, MAT_DURASTEEL)
/turf/simulated/wall/wood/Initialize(mapload)
. = ..(mapload, MAT_WOOD)
+4 -4
View File
@@ -59,11 +59,11 @@
var/datum/gas_mixture/water_breath = new()
var/datum/gas_mixture/above_air = return_air()
var/amount = 300
water_breath.adjust_gas("oxygen", amount) // Assuming water breathes just extract the oxygen directly from the water.
water_breath.adjust_gas(GAS_O2, amount) // Assuming water breathes just extract the oxygen directly from the water.
water_breath.temperature = above_air.temperature
return water_breath
else
var/gasid = "carbon_dioxide"
var/gasid = GAS_CO2
if(ishuman(L))
var/mob/living/carbon/human/H = L
if(H.species && H.species.exhale_type)
@@ -80,11 +80,11 @@
var/datum/gas_mixture/water_breath = new()
var/datum/gas_mixture/above_air = return_air()
var/amount = 300
water_breath.adjust_gas("oxygen", amount) // Assuming water breathes just extract the oxygen directly from the water.
water_breath.adjust_gas(GAS_O2, amount) // Assuming water breathes just extract the oxygen directly from the water.
water_breath.temperature = above_air.temperature
return water_breath
else
var/gasid = "carbon_dioxide"
var/gasid = GAS_CO2
if(ishuman(L))
var/mob/living/carbon/human/H = L
if(H.species && H.species.exhale_type)
+1 -1
View File
@@ -2012,7 +2012,7 @@
if(check_rights(R_ADMIN|R_SERVER|R_EVENT))
if(href_list["vsc"] == "airflow")
vsc.ChangeSettingsDialog(usr,vsc.settings)
if(href_list["vsc"] == "phoron")
if(href_list["vsc"] == GAS_PHORON)
vsc.ChangeSettingsDialog(usr,vsc.plc.settings)
if(href_list["vsc"] == "default")
vsc.SetDefault(usr)
+4 -4
View File
@@ -489,7 +489,7 @@
if(Rad.anchored)
if(!Rad.P)
var/obj/item/tank/phoron/Phoron = new/obj/item/tank/phoron(Rad)
Phoron.air_contents.gas["phoron"] = 70
Phoron.air_contents.gas[GAS_PHORON] = 70
Rad.drainratio = 0
Rad.P = Phoron
Phoron.loc = Rad
@@ -528,7 +528,7 @@
var/obj/item/tank/phoron/Phoron = new/obj/item/tank/phoron(Rad)
Phoron.air_contents.gas["phoron"] = 29.1154 //This is a full tank if you filled it from a canister
Phoron.air_contents.gas[GAS_PHORON] = 29.1154 //This is a full tank if you filled it from a canister
Rad.P = Phoron
Phoron.loc = Rad
@@ -541,7 +541,7 @@
var/obj/machinery/atmospherics/binary/pump/Pump = M
if(Pump.name == "Engine Feed" && response == "Setup Completely")
found_the_pump = 1
Pump.air2.gas["nitrogen"] = 3750 //The contents of 2 canisters.
Pump.air2.gas[GAS_N2] = 3750 //The contents of 2 canisters.
Pump.air2.temperature = 50
Pump.air2.update_values()
Pump.update_use_power(USE_POWER_IDLE)
@@ -569,7 +569,7 @@
if(!found_the_pump && response == "Setup Completely")
to_chat(src, span_red("Unable to locate air supply to fill up with coolant, adding some coolant around the supermatter"))
var/turf/simulated/T = SM.loc
T.zone.air.gas["nitrogen"] += 450
T.zone.air.gas[GAS_N2] += 450
T.zone.air.temperature = 50
T.zone.air.update_values()
+1 -1
View File
@@ -122,7 +122,7 @@
name = "Hostile Blob Revival"
id = "blob_revival"
result = null
required_reagents = list("phoron" = 60)
required_reagents = list(REAGENT_ID_PHORON = 60)
result_amount = 1
/decl/chemical_reaction/instant/blob_reconstitution/can_happen(var/datum/reagents/holder)
@@ -2,7 +2,7 @@
#define NEUTRAL_MODE 2
#define NEGATIVE_MODE 3
var/global/list/valid_bloodreagents = list("default","iron","copper","phoron","silver","gold","slimejelly") //allowlist-based so people don't make their blood restored by alcohol or something really silly. use reagent IDs!
var/global/list/valid_bloodreagents = list("default",REAGENT_ID_IRON,REAGENT_ID_COPPER,REAGENT_ID_PHORON,REAGENT_ID_SILVER,REAGENT_ID_GOLD,REAGENT_ID_SLIMEJELLY) //allowlist-based so people don't make their blood restored by alcohol or something really silly. use reagent IDs!
/datum/preferences
var/custom_species // Custom species name, can't be changed due to it having been used in savefiles already.
+9 -9
View File
@@ -68,31 +68,31 @@
return material
/obj/item/clothing/accessory/bracelet/material/wood/New(var/newloc)
..(newloc, "wood")
..(newloc, MAT_WOOD)
/obj/item/clothing/accessory/bracelet/material/plastic/New(var/newloc)
..(newloc, "plastic")
..(newloc, MAT_PLASTIC)
/obj/item/clothing/accessory/bracelet/material/iron/New(var/newloc)
..(newloc, "iron")
..(newloc, MAT_IRON)
/obj/item/clothing/accessory/bracelet/material/steel/New(var/newloc)
..(newloc, "steel")
..(newloc, MAT_STEEL)
/obj/item/clothing/accessory/bracelet/material/silver/New(var/newloc)
..(newloc, "silver")
..(newloc, MAT_SILVER)
/obj/item/clothing/accessory/bracelet/material/gold/New(var/newloc)
..(newloc, "gold")
..(newloc, MAT_GOLD)
/obj/item/clothing/accessory/bracelet/material/platinum/New(var/newloc)
..(newloc, "platinum")
..(newloc, MAT_PLATINUM)
/obj/item/clothing/accessory/bracelet/material/phoron/New(var/newloc)
..(newloc, "phoron")
..(newloc, MAT_PHORON)
/obj/item/clothing/accessory/bracelet/material/glass/New(var/newloc)
..(newloc, "glass")
..(newloc, MAT_GLASS)
//wristbands
+3 -3
View File
@@ -11,7 +11,7 @@
permeability_coefficient = 0.01
siemens_coefficient = 0.9
var/gas_filter_strength = 1 //For gas mask filters
var/list/filtered_gases = list("phoron", "nitrous_oxide")
var/list/filtered_gases = list(GAS_PHORON, GAS_N2O)
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 75, rad = 0)
pickup_sound = 'sound/items/pickup/rubber.ogg'
@@ -88,7 +88,7 @@
flags = PHORONGUARD
item_flags = BLOCK_GAS_SMOKE_EFFECT | AIRTIGHT
species_restricted = list(SPECIES_VOX)
filtered_gases = list("oxygen", "nitrous_oxide")
filtered_gases = list(GAS_O2, GAS_N2O)
var/mask_open = FALSE // Controls if the Vox can eat through this mask
actions_types = list(/datum/action/item_action/toggle_feeding_port)
@@ -115,7 +115,7 @@
//body_parts_covered = 0
species_restricted = list(SPECIES_ZADDAT)
flags_inv = HIDEEARS //semi-transparent
filtered_gases = list("phoron", "nitrogen", "nitrous_oxide")
filtered_gases = list(GAS_PHORON, GAS_N2, GAS_N2O)
/obj/item/clothing/mask/gas/syndicate
name = "tactical mask"
+2 -2
View File
@@ -184,10 +184,10 @@
return
//also copied from matches
if(reagents.get_reagent_amount("phoron")) // the phoron explodes when exposed to fire
if(reagents.get_reagent_amount(REAGENT_ID_PHORON)) // the phoron explodes when exposed to fire
visible_message(span_danger("\The [src] conflagrates violently!"))
var/datum/effect/effect/system/reagents_explosion/e = new()
e.set_up(round(reagents.get_reagent_amount("phoron") / 2.5, 1), get_turf(src), 0, 0)
e.set_up(round(reagents.get_reagent_amount(REAGENT_ID_PHORON) / 2.5, 1), get_turf(src), 0, 0)
e.start()
qdel(src)
return
+7 -7
View File
@@ -7,7 +7,7 @@
density = TRUE
anchored = TRUE
var/coinsToProduce = 6 //how many coins do we make per sheet? a sheet is 2000 units whilst a coin is 250, and some material should be lost in the process
var/list/validMats = list("silver", "gold", "diamond", "iron", "phoron", "uranium") //what's valid stuff to make coins out of?
var/list/validMats = list(MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_IRON, MAT_PHORON, MAT_URANIUM) //what's valid stuff to make coins out of?
/obj/machinery/mineral/mint/attackby(obj/item/stack/material/M as obj, mob/user as mob)
if(M.default_type in validMats)
@@ -16,22 +16,22 @@
icon_state = "coinpress1"
if(do_after(user, 2 SECONDS, src))
M.amount--
if(M.default_type == "silver")
if(M.default_type == MAT_SILVER)
while(coinsToProduce-- > 0)
new /obj/item/coin/silver(user.loc)
else if(M.default_type == "gold")
else if(M.default_type == MAT_GOLD)
while(coinsToProduce-- > 0)
new /obj/item/coin/gold(user.loc)
else if(M.default_type == "diamond")
else if(M.default_type == MAT_DIAMOND)
while(coinsToProduce-- > 0)
new /obj/item/coin/diamond(user.loc)
else if(M.default_type == "iron")
else if(M.default_type == MAT_IRON)
while(coinsToProduce-- > 0)
new /obj/item/coin/iron(user.loc)
else if(M.default_type == "phoron")
else if(M.default_type == MAT_PHORON)
while(coinsToProduce-- > 0)
new /obj/item/coin/phoron(user.loc)
else if(M.default_type == "uranium")
else if(M.default_type == MAT_URANIUM)
while(coinsToProduce-- > 0)
new /obj/item/coin/uranium(user.loc)
src.visible_message(span_notice("\The [src] rattles and dispenses several [M.default_type] coins!"))
+6 -6
View File
@@ -67,17 +67,17 @@
if(href_list["remove"])
var/obj/item/coin/COIN
switch(href_list["remove"])
if("gold")
if(MAT_GOLD)
COIN = locate(/obj/item/coin/gold,src.contents)
if("silver")
if(MAT_SILVER)
COIN = locate(/obj/item/coin/silver,src.contents)
if("iron")
if(MAT_IRON)
COIN = locate(/obj/item/coin/iron,src.contents)
if("diamond")
if(MAT_DIAMOND)
COIN = locate(/obj/item/coin/diamond,src.contents)
if("phoron")
if(MAT_URANIUM)
COIN = locate(/obj/item/coin/phoron,src.contents)
if("uranium")
if(MAT_URANIUM)
COIN = locate(/obj/item/coin/uranium,src.contents)
if(!COIN)
return
+3 -3
View File
@@ -19,11 +19,11 @@
// Decide which area will be targeted!
/datum/event/atmos_leak/setup()
var/gas_choices = list("carbon_dioxide", "nitrous_oxide") // Annoying
var/gas_choices = list(GAS_CO2, GAS_N2O) // Annoying
if(severity >= EVENT_LEVEL_MODERATE)
gas_choices += "phoron" // Dangerous
gas_choices += GAS_PHORON // Dangerous
// if(severity >= EVENT_LEVEL_MAJOR)
// gas_choices += "volatile_fuel" // Dangerous and no default atmos setup!
// gas_choices += GAS_VOLATILE_FUEL // Dangerous and no default atmos setup!
gas_type = pick(gas_choices)
var/list/area/grand_list_of_areas = get_station_areas(excluded)
+1 -1
View File
@@ -315,7 +315,7 @@
var/datum/gas_mixture/mixture = new
mixture.temperature = T20C
var/unpickedTypes = gas_data.gases.Copy()
unpickedTypes -= "volatile_fuel" // Don't do that one
unpickedTypes -= GAS_VOLATILE_FUEL // Don't do that one
for(var/i in 1 to differentTypes)
var/gasId = pick(unpickedTypes)
unpickedTypes -= gasId
+1 -1
View File
@@ -3,7 +3,7 @@ var/list/dreams = list(
"an ID card","a bottle","a familiar face","a crewmember","a toolbox","a " + JOB_SECURITY_OFFICER,"the " + JOB_SITE_MANAGER,
"voices from all around","deep space","a doctor","the engine","a traitor","an ally","darkness",
"light","a scientist","a monkey","a catastrophe","a loved one","a gun","warmth","freezing","the sun",
"a hat","the Luna","a ruined station","a planet","phoron","air","the medical bay","the bridge","blinking lights",
"a hat","the Luna","a ruined station","a planet",GAS_PHORON,"air","the medical bay","the bridge","blinking lights",
"a blue light","an abandoned laboratory","NanoTrasen","mercenaries","blood","healing","power","respect",
"riches","space","a crash","happiness","pride","a fall","water","flames","ice","melons","flying","the eggs","money",
"the " + JOB_HEAD_OF_PERSONNEL,"the " + JOB_HEAD_OF_SECURITY,"the " + JOB_CHIEF_ENGINEER,"the " + JOB_RESEARCH_DIRECTOR,"the " + JOB_CHIEF_MEDICAL_OFFICER,
+2 -2
View File
@@ -797,7 +797,7 @@
if(4)
reagents.add_reagent("sprinkles", 3)
if(5)
reagents.add_reagent("phoron", 3)
reagents.add_reagent(REAGENT_ID_PHORON, 3)
if(6)
reagents.add_reagent("coco", 3)
if(7)
@@ -4748,7 +4748,7 @@
/obj/item/reagent_containers/food/snacks/bageleverything/Initialize()
. = ..()
reagents.add_reagent("phoron", 5)
reagents.add_reagent(REAGENT_ID_PHORON, 5)
reagents.add_reagent("defective_nanites", 5)
/obj/item/reagent_containers/food/snacks/bageltwo
+1 -1
View File
@@ -169,7 +169,7 @@
/obj/item/reagent_containers/food/snacks/meat/worm/Initialize()
. = ..()
reagents.add_reagent("protein", 6)
reagents.add_reagent("phoron", 3)
reagents.add_reagent(REAGENT_ID_PHORON, 3)
reagents.add_reagent("myelamine", 3)
src.bitesize = 3
+1 -2
View File
@@ -152,5 +152,4 @@
/obj/item/reagent_containers/glass/bottle/potion/phoron
name = "volatile potion"
desc = "A small green bottle containing some volatile purple liquid."
prefill = list("phoron" = 10)
prefill = list(REAGENT_ID_PHORON = 10)
@@ -15,7 +15,7 @@
/datum/event2/event/gas_leak
var/potential_gas_choices = list("carbon_dioxide", "nitrous_oxide", "phoron", "volatile_fuel")
var/potential_gas_choices = list(GAS_CO2, GAS_N2O, GAS_PHORON, GAS_VOLATILE_FUEL)
var/chosen_gas = null
var/turf/chosen_turf = null
@@ -44,4 +44,4 @@
air_contents.temperature = T20C + rand(-50, 50)
air_contents.gas[chosen_gas] = 10 * MOLES_CELLSTANDARD
chosen_turf.assume_air(air_contents)
playsound(chosen_turf, 'sound/effects/smoke.ogg', 75, 1)
playsound(chosen_turf, 'sound/effects/smoke.ogg', 75, 1)
+1 -1
View File
@@ -235,7 +235,7 @@
. = ..()
reagents.add_reagent("fuel", 500)
reagents.add_reagent("cryptobiolin", 500)
reagents.add_reagent("phoron", 500)
reagents.add_reagent(REAGENT_ID_PHORON, 500)
reagents.add_reagent("condensedcapsaicin", 500)
/obj/item/watertank/op/make_noz()
+2 -2
View File
@@ -445,12 +445,12 @@
if(prob(5))
consume_gasses = list()
var/gas = pick("oxygen","nitrogen","phoron","carbon_dioxide")
var/gas = pick(GAS_O2,GAS_N2,GAS_PHORON,GAS_CO2)
consume_gasses[gas] = rand(3,9)
if(prob(5))
exude_gasses = list()
var/gas = pick("oxygen","nitrogen","phoron","carbon_dioxide")
var/gas = pick(GAS_O2,GAS_N2,GAS_PHORON,GAS_CO2)
exude_gasses[gas] = rand(3,9)
chems = list()
+2 -2
View File
@@ -4,7 +4,7 @@
seed_name = "alien weed"
display_name = "alien weeds"
force_layer = 3
chems = list("phoron" = list(1,3))
chems = list(REAGENT_ID_PHORON = list(1,3))
/datum/seed/xenomorph/New()
..()
@@ -16,4 +16,4 @@
set_trait(TRAIT_PRODUCTION,1)
set_trait(TRAIT_YIELD,-1)
set_trait(TRAIT_SPREAD,2)
set_trait(TRAIT_POTENCY,50)
set_trait(TRAIT_POTENCY,50)
@@ -118,7 +118,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(REAGENT_ID_PHORON = 50000, REAGENT_ID_SLIMEJELLY = 25000, "fuel" = 15000, "carbon" = 10000, "ethanol"= 10000, "nutriment" = 8000, "blood" = 5000)
/obj/item/integrated_circuit/passive/power/chemical_cell/New()
..()
@@ -741,10 +741,10 @@
outputs = list(
"pressure" = IC_PINTYPE_NUMBER,
"temperature" = IC_PINTYPE_NUMBER,
"oxygen" = IC_PINTYPE_NUMBER,
"nitrogen" = IC_PINTYPE_NUMBER,
GAS_O2 = IC_PINTYPE_NUMBER,
GAS_N2 = IC_PINTYPE_NUMBER,
"carbon dioxide" = IC_PINTYPE_NUMBER,
"phoron" = IC_PINTYPE_NUMBER,
GAS_PHORON = IC_PINTYPE_NUMBER,
"other" = IC_PINTYPE_NUMBER
)
activators = list("scan" = IC_PINTYPE_PULSE_IN, "on scanned" = IC_PINTYPE_PULSE_OUT)
@@ -762,10 +762,10 @@
var/total_moles = environment.total_moles
if (total_moles)
var/o2_level = environment.gas["oxygen"]/total_moles
var/n2_level = environment.gas["nitrogen"]/total_moles
var/co2_level = environment.gas["carbon_dioxide"]/total_moles
var/phoron_level = environment.gas["phoron"]/total_moles
var/o2_level = environment.gas[GAS_O2]/total_moles
var/n2_level = environment.gas[GAS_N2]/total_moles
var/co2_level = environment.gas[GAS_CO2]/total_moles
var/phoron_level = environment.gas[GAS_PHORON]/total_moles
var/unknown_level = 1-(o2_level+n2_level+co2_level+phoron_level)
set_pin_data(IC_OUTPUT, 1, pressure)
set_pin_data(IC_OUTPUT, 2, round(environment.temperature-T0C,0.1))
@@ -851,7 +851,7 @@
complexity = 3
inputs = list()
outputs = list(
"oxygen" = IC_PINTYPE_NUMBER
GAS_O2 = IC_PINTYPE_NUMBER
)
activators = list("scan" = IC_PINTYPE_PULSE_IN, "on scanned" = IC_PINTYPE_PULSE_OUT)
spawn_flags = IC_SPAWN_RESEARCH
@@ -867,7 +867,7 @@
var/total_moles = environment.total_moles
if (total_moles)
var/o2_level = environment.gas["oxygen"]/total_moles
var/o2_level = environment.gas[GAS_O2]/total_moles
set_pin_data(IC_OUTPUT, 1, round(o2_level*100,0.1))
else
set_pin_data(IC_OUTPUT, 1, 0)
@@ -897,7 +897,7 @@
var/total_moles = environment.total_moles
if (total_moles)
var/co2_level = environment.gas["carbon_dioxide"]/total_moles
var/co2_level = environment.gas[GAS_CO2]/total_moles
set_pin_data(IC_OUTPUT, 1, round(co2_level*100,0.1))
else
set_pin_data(IC_OUTPUT, 1, 0)
@@ -911,7 +911,7 @@
complexity = 3
inputs = list()
outputs = list(
"nitrogen" = IC_PINTYPE_NUMBER
GAS_N2 = IC_PINTYPE_NUMBER
)
activators = list("scan" = IC_PINTYPE_PULSE_IN, "on scanned" = IC_PINTYPE_PULSE_OUT)
spawn_flags = IC_SPAWN_RESEARCH
@@ -927,7 +927,7 @@
var/total_moles = environment.total_moles
if (total_moles)
var/n2_level = environment.gas["nitrogen"]/total_moles
var/n2_level = environment.gas[GAS_N2]/total_moles
set_pin_data(IC_OUTPUT, 1, round(n2_level*100,0.1))
else
set_pin_data(IC_OUTPUT, 1, 0)
@@ -941,7 +941,7 @@
complexity = 3
inputs = list()
outputs = list(
"phoron" = IC_PINTYPE_NUMBER
GAS_PHORON = IC_PINTYPE_NUMBER
)
activators = list("scan" = IC_PINTYPE_PULSE_IN, "on scanned" = IC_PINTYPE_PULSE_OUT)
spawn_flags = IC_SPAWN_RESEARCH
@@ -957,7 +957,7 @@
var/total_moles = environment.total_moles
if (total_moles)
var/phoron_level = environment.gas["phoron"]/total_moles
var/phoron_level = environment.gas[GAS_PHORON]/total_moles
set_pin_data(IC_OUTPUT, 1, round(phoron_level*100,0.1))
else
set_pin_data(IC_OUTPUT, 1, 0)
+2 -4
View File
@@ -1,5 +1,5 @@
/datum/material/phoron
name = "phoron"
name = MAT_PHORON
stack_type = /obj/item/stack/material/phoron
ignition_point = PHORON_MINIMUM_BURN_TEMPERATURE
icon_base = "stone"
@@ -24,7 +24,7 @@
for(var/turf/simulated/floor/target_tile in range(2,T))
var/phoronToDeduce = (temperature/30) * effect_multiplier
totalPhoron += phoronToDeduce
target_tile.assume_gas("phoron", phoronToDeduce, 200+T0C)
target_tile.assume_gas(GAS_PHORON, phoronToDeduce, 200+T0C)
spawn (0)
target_tile.hotspot_expose(temperature, 400)
return round(totalPhoron/100)
@@ -165,5 +165,3 @@
supply_conversion_value = 13
icon_base = "stone"
table_icon_base = "stone"
+10 -13
View File
@@ -1,39 +1,39 @@
/obj/item/stack/material/phoron
name = "solid phoron"
name = "solid " + MAT_PHORON
icon_state = "sheet-phoron"
default_type = "phoron"
default_type = MAT_PHORON
no_variants = FALSE
drop_sound = 'sound/items/drop/glass.ogg'
pickup_sound = 'sound/items/pickup/glass.ogg'
/obj/item/stack/material/diamond
name = "diamond"
name = MAT_DIAMOND
icon_state = "sheet-diamond"
default_type = "diamond"
default_type = MAT_DIAMOND
drop_sound = 'sound/items/drop/glass.ogg'
pickup_sound = 'sound/items/pickup/glass.ogg'
/obj/item/stack/material/painite
name = "painite"
name = MAT_PAINITE
icon_state = "sheet-gem"
singular_name = "painite gem"
default_type = "painite"
default_type = MAT_PAINITE
apply_colour = 1
no_variants = FALSE
/obj/item/stack/material/void_opal
name = "void opal"
name = MAT_VOPAL
icon_state = "sheet-void_opal"
singular_name = "void opal"
default_type = "void opal"
default_type = MAT_VOPAL
apply_colour = 1
no_variants = FALSE
/obj/item/stack/material/quartz
name = "quartz"
name = MAT_QUARTZ
icon_state = "sheet-gem"
singular_name = "quartz gem"
default_type = "quartz"
default_type = MAT_QUARTZ
apply_colour = 1
no_variants = FALSE
@@ -61,6 +61,3 @@
default_type = MAT_MORPHIUM
no_variants = FALSE
apply_colour = TRUE
+40 -40
View File
@@ -22,42 +22,42 @@
var/current_capacity = 0
var/list/stored_ore = list(
"sand" = 0,
"hematite" = 0,
"carbon" = 0,
"raw copper" = 0,
"raw tin" = 0,
"void opal" = 0,
"painite" = 0,
"quartz" = 0,
"raw bauxite" = 0,
"phoron" = 0,
"silver" = 0,
"gold" = 0,
"marble" = 0,
"uranium" = 0,
"diamond" = 0,
"platinum" = 0,
"lead" = 0,
"mhydrogen" = 0,
"verdantium" = 0,
"rutile" = 0)
ORE_SAND = 0,
ORE_HEMATITE = 0,
ORE_CARBON = 0,
ORE_COPPER = 0,
ORE_TIN = 0,
ORE_VOPAL = 0,
ORE_PAINITE = 0,
ORE_QUARTZ = 0,
ORE_BAUXITE = 0,
ORE_PHORON = 0,
ORE_SILVER = 0,
ORE_GOLD = 0,
ORE_MARBLE = 0,
ORE_URANIUM = 0,
ORE_DIAMOND = 0,
ORE_PLATINUM = 0,
ORE_LEAD = 0,
ORE_MHYDROGEN = 0,
ORE_VERDANTIUM = 0,
ORE_RUTILE = 0)
var/list/ore_types = list(
"hematite" = /obj/item/ore/iron,
"uranium" = /obj/item/ore/uranium,
"gold" = /obj/item/ore/gold,
"silver" = /obj/item/ore/silver,
"diamond" = /obj/item/ore/diamond,
"phoron" = /obj/item/ore/phoron,
"platinum" = /obj/item/ore/osmium,
"mhydrogen" = /obj/item/ore/hydrogen,
"sand" = /obj/item/ore/glass,
"carbon" = /obj/item/ore/coal,
// "copper" = /obj/item/ore/copper,
// "tin" = /obj/item/ore/tin,
// "bauxite" = /obj/item/ore/bauxite,
"rutile" = /obj/item/ore/rutile
ORE_HEMATITE = /obj/item/ore/iron,
ORE_URANIUM = /obj/item/ore/uranium,
ORE_GOLD = /obj/item/ore/gold,
ORE_SILVER = /obj/item/ore/silver,
ORE_DIAMOND = /obj/item/ore/diamond,
ORE_PHORON = /obj/item/ore/phoron,
ORE_PLATINUM = /obj/item/ore/osmium,
ORE_MHYDROGEN = /obj/item/ore/hydrogen,
ORE_SAND = /obj/item/ore/glass,
ORE_CARBON = /obj/item/ore/coal,
// ORE_COPPER = /obj/item/ore/copper,
// ORE_TIN = /obj/item/ore/tin,
// ORE_BAUXITE = /obj/item/ore/bauxite,
ORE_RUTILE = /obj/item/ore/rutile
)
//Upgrades
@@ -69,16 +69,16 @@
// Found with an advanced laser. exotic_drilling >= 1
var/list/ore_types_uncommon = list(
MAT_MARBLE = /obj/item/ore/marble,
//"painite" = /obj/item/ore/painite,
//"quartz" = /obj/item/ore/quartz,
MAT_LEAD = /obj/item/ore/lead
ORE_MARBLE = /obj/item/ore/marble,
//ORE_PAINITE = /obj/item/ore/painite,
//ORE_QUARTZ = /obj/item/ore/quartz,
ORE_LEAD = /obj/item/ore/lead
)
// Found with an ultra laser. exotic_drilling >= 2
var/list/ore_types_rare = list(
//"void opal" = /obj/item/ore/void_opal,
MAT_VERDANTIUM = /obj/item/ore/verdantium
//ORE_VOPAL = /obj/item/ore/void_opal,
ORE_VERDANTIUM = /obj/item/ore/verdantium
)
//Flags
+7 -7
View File
@@ -41,13 +41,13 @@
var/ore_type
switch(metal)
if("sand", "carbon", "marble", /*"quartz"*/) ore_type = "surface minerals"
if("hematite", /*"tin", "copper", "bauxite",*/ "lead") ore_type = "industrial metals"
if("gold", "silver", "rutile") ore_type = "precious metals"
if("diamond", /*"painite"*/) ore_type = "precious gems"
if("uranium") ore_type = "nuclear fuel"
if("phoron", "platinum", "mhydrogen") ore_type = "exotic matter"
if("verdantium", /*"void opal"*/) ore_type = "anomalous matter"
if(ORE_SAND, ORE_CARBON, ORE_MARBLE, /*ORE_QUARTZ*/) ore_type = "surface minerals"
if(ORE_HEMATITE, /*ORE_TIN, ORE_COPPER, ORE_BAUXITE,*/ ORE_LEAD) ore_type = "industrial metals"
if(ORE_GOLD, ORE_SILVER, ORE_RUTILE) ore_type = "precious metals"
if(ORE_DIAMOND, /*ORE_PAINITE*/) ore_type = "precious gems"
if(ORE_URANIUM) ore_type = "nuclear fuel"
if(ORE_PHORON, ORE_PLATINUM, ORE_MHYDROGEN) ore_type = "exotic matter"
if(ORE_VERDANTIUM, /*ORE_VOPAL*/) ore_type = "anomalous matter"
if(ore_type) metals[ore_type] += T.resources[metal]
@@ -166,26 +166,26 @@
var/points = 0
var/points_mult = 1 //VOREStation Add - multiplier for points generated when ore hits the processors
var/static/list/ore_values = list(
"sand" = 1,
"hematite" = 1,
"carbon" = 1,
"raw copper" = 1,
"raw tin" = 1,
"void opal" = 3,
"painite" = 3,
"quartz" = 3,
"raw bauxite" = 5,
"phoron" = 15,
"silver" = 16,
"gold" = 18,
"marble" = 20,
"uranium" = 30,
"diamond" = 50,
"platinum" = 40,
"lead" = 40,
"mhydrogen" = 40,
"verdantium" = 60,
"rutile" = 40) //VOREStation Add
ORE_SAND = 1,
ORE_HEMATITE = 1,
ORE_CARBON = 1,
ORE_COPPER = 1,
ORE_TIN = 1,
ORE_VOPAL = 3,
ORE_PAINITE = 3,
ORE_QUARTZ= 3,
ORE_BAUXITE = 5,
ORE_PHORON = 15,
ORE_SILVER = 16,
ORE_GOLD = 18,
ORE_MARBLE = 20,
ORE_URANIUM = 30,
ORE_DIAMOND = 50,
ORE_PLATINUM = 40,
ORE_LEAD = 40,
ORE_MHYDROGEN = 40,
ORE_VERDANTIUM = 60,
ORE_RUTILE = 40) //VOREStation Add
/obj/machinery/mineral/processing_unit/Initialize()
. = ..()
@@ -47,45 +47,45 @@
BOX.stored_ore[ore] = 0
//Icon code here. Going from most to least common.
if(ore == "sand")
if(ore == ORE_SAND)
ore_chunk.icon_state = "ore_glass"
else if(ore == "carbon")
else if(ore == ORE_CARBON)
ore_chunk.icon_state = "ore_coal"
else if(ore == "hematite")
else if(ore == ORE_HEMATITE)
ore_chunk.icon_state = "ore_iron"
else if(ore == "phoron")
else if(ore == ORE_PHORON)
ore_chunk.icon_state = "ore_phoron"
else if(ore == "silver")
else if(ore == ORE_SILVER)
ore_chunk.icon_state = "ore_silver"
else if(ore == "gold")
else if(ore == ORE_GOLD)
ore_chunk.icon_state = "ore_gold"
else if(ore == "uranium")
else if(ore == ORE_URANIUM)
ore_chunk.icon_state = "ore_uranium"
else if(ore == "diamond")
else if(ore == ORE_DIAMOND)
ore_chunk.icon_state = "ore_diamond"
else if(ore == "platinum")
else if(ore == ORE_PLATINUM)
ore_chunk.icon_state = "ore_platinum"
else if(ore == "marble")
else if(ore == ORE_MARBLE)
ore_chunk.icon_state = "ore_marble"
else if(ore == "lead")
else if(ore == ORE_LEAD)
ore_chunk.icon_state = "ore_lead"
else if(ore == "rutile")
else if(ore == ORE_RUTILE)
ore_chunk.icon_state = "ore_rutile"
else if(ore == "quartz")
else if(ore == ORE_QUARTZ)
ore_chunk.icon_state = "ore_quartz"
else if(ore == "mhydrogen")
else if(ore == ORE_MHYDROGEN)
ore_chunk.icon_state = "ore_hydrogen"
else if(ore == "verdantium")
else if(ore == ORE_VERDANTIUM)
ore_chunk.icon_state = "ore_verdantium"
else if(ore == "raw copper")
else if(ore == ORE_COPPER)
ore_chunk.icon_state = "ore_copper"
else if(ore == "raw tin")
else if(ore == ORE_TIN)
ore_chunk.icon_state = "ore_tin"
else if(ore == "void opal")
else if(ore == ORE_VOPAL)
ore_chunk.icon_state = "ore_void_opal"
else if(ore == "raw bauxite")
else if(ore == ORE_BAUXITE)
ore_chunk.icon_state = "ore_bauxite"
else if(ore == "painite")
else if(ore == ORE_PAINITE)
ore_chunk.icon_state = "ore_painite"
else
ore_chunk.icon_state = "boulder[rand(1,4)]"
@@ -102,4 +102,4 @@
O.loc = src.output.loc
else
return
return
return
+22 -22
View File
@@ -45,26 +45,26 @@ var/list/mining_overlay_cache = list()
var/ignore_mapgen
var/static/list/ore_types = list(
"hematite" = /obj/item/ore/iron,
"uranium" = /obj/item/ore/uranium,
"gold" = /obj/item/ore/gold,
"silver" = /obj/item/ore/silver,
"diamond" = /obj/item/ore/diamond,
"phoron" = /obj/item/ore/phoron,
"platinum" = /obj/item/ore/osmium,
"mhydrogen" = /obj/item/ore/hydrogen,
"sand" = /obj/item/ore/glass,
"carbon" = /obj/item/ore/coal,
"verdantium" = /obj/item/ore/verdantium,
"marble" = /obj/item/ore/marble,
"lead" = /obj/item/ore/lead,
// "copper" = /obj/item/ore/copper,
// "tin" = /obj/item/ore/tin,
// "bauxite" = /obj/item/ore/bauxite,
// "void opal" = /obj/item/ore/void_opal,
// "painite" = /obj/item/ore/painite,
// "quartz" = /obj/item/ore/quartz,
"rutile" = /obj/item/ore/rutile
ORE_HEMATITE = /obj/item/ore/iron,
ORE_URANIUM = /obj/item/ore/uranium,
ORE_GOLD = /obj/item/ore/gold,
ORE_SILVER = /obj/item/ore/silver,
ORE_DIAMOND = /obj/item/ore/diamond,
ORE_PHORON = /obj/item/ore/phoron,
ORE_PLATINUM = /obj/item/ore/osmium,
ORE_MHYDROGEN = /obj/item/ore/hydrogen,
ORE_SAND = /obj/item/ore/glass,
ORE_CARBON = /obj/item/ore/coal,
ORE_VERDANTIUM = /obj/item/ore/verdantium,
ORE_MARBLE = /obj/item/ore/marble,
ORE_LEAD = /obj/item/ore/lead,
// ORE_COPPER = /obj/item/ore/copper,
// ORE_TIN = /obj/item/ore/tin,
// ORE_BAUXITE = /obj/item/ore/bauxite,
// ORE_VOPAL = /obj/item/ore/void_opal,
// ORE_PAINITE = /obj/item/ore/painite,
// ORE_QUARTZ = /obj/item/ore/quartz,
ORE_RUTILE = /obj/item/ore/rutile
)
has_resources = 1
@@ -725,10 +725,10 @@ var/list/mining_overlay_cache = list()
var/mineral_name
if(rare_ore)
mineral_name = pickweight(list("marble" = 5,/* "quartz" = 15, "copper" = 10, "tin" = 5, "bauxite" = 5*/, "uranium" = 15, "platinum" = 20, "hematite" = 15, "rutile" = 20, "carbon" = 15, "diamond" = 3, "gold" = 15, "silver" = 15, "phoron" = 25, "lead" = 5,/* "void opal" = 1,*/ "verdantium" = 2/*, "painite" = 1*/))
mineral_name = pickweight(list(ORE_MARBLE = 5,/* ORE_QUARTZ = 15, ORE_COPPER = 10, ORE_TIN = 5, ORE_BAUXITE = 5*/, ORE_URANIUM = 15, ORE_PLATINUM = 20, ORE_HEMATITE = 15, ORE_RUTILE = 20, ORE_CARBON = 15, ORE_DIAMOND = 3, ORE_GOLD = 15, ORE_SILVER = 15, ORE_PHORON = 25, ORE_LEAD = 5,/* ORE_VOPAL = 1,*/ ORE_VERDANTIUM = 2/*, ORE_PAINITE = 1*/))
else
mineral_name = pickweight(list("marble" = 3,/* "quartz" = 10, "copper" = 20, "tin" = 15, "bauxite" = 15*/, "uranium" = 10, "platinum" = 10, "hematite" = 70, "rutile" = 15, "carbon" = 70, "diamond" = 2, "gold" = 10, "silver" = 10, "phoron" = 20, "lead" = 3,/* "void opal" = 1,*/ "verdantium" = 1/*, "painite" = 1*/))
mineral_name = pickweight(list(ORE_MARBLE = 3,/* ORE_QUARTZ = 10, ORE_COPPER = 20, ORE_TIN = 15, ORE_BAUXITE = 15*/, ORE_URANIUM = 10, ORE_PLATINUM = 10, ORE_HEMATITE = 70, ORE_RUTILE = 15, ORE_CARBON = 70, ORE_DIAMOND = 2, ORE_GOLD = 10, ORE_SILVER = 10, ORE_PHORON = 20, ORE_LEAD = 3,/* ORE_VOPAL = 1,*/ ORE_VERDANTIUM = 1/*, ORE_PAINITE = 1*/))
if(mineral_name && (mineral_name in GLOB.ore_data))
mineral = GLOB.ore_data[mineral_name]
+40 -40
View File
@@ -11,31 +11,31 @@
name = "pitchblende"
icon_state = "ore_uranium"
origin_tech = list(TECH_MATERIAL = 5)
material = "uranium"
material = ORE_URANIUM
/obj/item/ore/iron
name = "hematite"
icon_state = "ore_iron"
origin_tech = list(TECH_MATERIAL = 1)
material = "hematite"
material = ORE_HEMATITE
/obj/item/ore/coal
name = "raw carbon"
icon_state = "ore_coal"
origin_tech = list(TECH_MATERIAL = 1)
material = "carbon"
material = ORE_CARBON
/obj/item/ore/marble
name = "recrystallized carbonate"
icon_state = "ore_marble"
origin_tech = list(TECH_MATERIAL = 1)
material = "marble"
material = ORE_MARBLE
/obj/item/ore/glass
name = "sand"
icon_state = "ore_glass"
origin_tech = list(TECH_MATERIAL = 1)
material = "sand"
material = ORE_SAND
slot_flags = SLOT_HOLSTER
// POCKET SAND!
@@ -54,40 +54,40 @@
name = "phoron crystals"
icon_state = "ore_phoron"
origin_tech = list(TECH_MATERIAL = 2)
material = "phoron"
material = ORE_PHORON
/obj/item/ore/silver
name = "native silver ore"
icon_state = "ore_silver"
origin_tech = list(TECH_MATERIAL = 3)
material = "silver"
material = ORE_SILVER
/obj/item/ore/gold
name = "native gold ore"
icon_state = "ore_gold"
origin_tech = list(TECH_MATERIAL = 4)
material = "gold"
material = ORE_GOLD
/obj/item/ore/diamond
name = "diamonds"
icon_state = "ore_diamond"
origin_tech = list(TECH_MATERIAL = 6)
material = "diamond"
material = ORE_DIAMOND
/obj/item/ore/osmium
name = "raw platinum"
icon_state = "ore_platinum"
material = "platinum"
material = ORE_PLATINUM
/obj/item/ore/hydrogen
name = "raw hydrogen"
icon_state = "ore_hydrogen"
material = "mhydrogen"
material = ORE_MHYDROGEN
/obj/item/ore/verdantium
name = "verdantite dust"
icon_state = "ore_verdantium"
material = MAT_VERDANTIUM
material = ORE_VERDANTIUM
origin_tech = list(TECH_MATERIAL = 7)
// POCKET ... Crystal dust.
@@ -104,43 +104,43 @@
/obj/item/ore/lead
name = "lead glance"
icon_state = "ore_lead"
material = MAT_LEAD
material = ORE_LEAD
origin_tech = list(TECH_MATERIAL = 3)
/*
/obj/item/ore/copper
name = "raw copper"
icon_state = "ore_copper"
material = "copper"
material = ORE_COPPER
/obj/item/ore/tin
name = "raw tin"
icon_state = "ore_tin"
material = "tin"
material = ORE_TIN
/obj/item/ore/bauxite
name = "raw bauxite"
icon_state = "ore_bauxite"
material = "bauxite"
material = ORE_BAUXITE
*/
/obj/item/ore/rutile
name = "raw rutile"
icon_state = "ore_rutile"
material = "rutile"
material = ORE_RUTILE
/*
/obj/item/ore/void_opal
name = "raw void opal"
icon_state = "ore_void_opal"
material = "void opal"
material = ORE_VOPAL
/obj/item/ore/painite
name = "raw painite"
icon_state = "ore_painite"
material = "painite"
material = ORE_PAINITE
/obj/item/ore/quartz
name = "raw quartz"
icon_state = "ore_quartz"
material = "quartz"
material = ORE_QUARTZ
*/
/obj/item/ore/slag
name = "Slag"
@@ -179,26 +179,26 @@
randpixel = 8
w_class = ITEMSIZE_SMALL
var/list/stored_ore = list(
"sand" = 0,
"hematite" = 0,
"carbon" = 0,
"raw copper" = 0,
"raw tin" = 0,
"void opal" = 0,
"painite" = 0,
"quartz" = 0,
"raw bauxite" = 0,
"phoron" = 0,
"silver" = 0,
"gold" = 0,
"marble" = 0,
"uranium" = 0,
"diamond" = 0,
"platinum" = 0,
"lead" = 0,
"mhydrogen" = 0,
"verdantium" = 0,
"rutile" = 0)
ORE_SAND = 0,
ORE_HEMATITE = 0,
ORE_CARBON = 0,
ORE_COPPER = 0,
ORE_TIN = 0,
ORE_VOPAL = 0,
ORE_PAINITE = 0,
ORE_QUARTZ = 0,
ORE_BAUXITE = 0,
ORE_PHORON = 0,
ORE_SILVER = 0,
ORE_GOLD = 0,
ORE_MARBLE = 0,
ORE_URANIUM = 0,
ORE_DIAMOND = 0,
ORE_PLATINUM = 0,
ORE_LEAD = 0,
ORE_MHYDROGEN = 0,
ORE_VERDANTIUM = 0,
ORE_RUTILE = 0)
/obj/item/ore_chunk/examine(mob/user)
. = ..()
+20 -20
View File
@@ -8,26 +8,26 @@
density = TRUE
var/last_update = 0
var/list/stored_ore = list(
"sand" = 0,
"hematite" = 0,
"carbon" = 0,
"raw copper" = 0,
"raw tin" = 0,
"void opal" = 0,
"painite" = 0,
"quartz" = 0,
"raw bauxite" = 0,
"phoron" = 0,
"silver" = 0,
"gold" = 0,
"marble" = 0,
"uranium" = 0,
"diamond" = 0,
"platinum" = 0,
"lead" = 0,
"mhydrogen" = 0,
"verdantium" = 0,
"rutile" = 0)
ORE_SAND = 0,
ORE_HEMATITE = 0,
ORE_CARBON = 0,
ORE_COPPER = 0,
ORE_TIN = 0,
ORE_VOPAL = 0,
ORE_PAINITE = 0,
ORE_QUARTZ = 0,
ORE_BAUXITE = 0,
ORE_PHORON = 0,
ORE_SILVER = 0,
ORE_GOLD = 0,
ORE_MARBLE = 0,
ORE_URANIUM = 0,
ORE_DIAMOND = 0,
ORE_PLATINUM = 0,
ORE_LEAD = 0,
ORE_MHYDROGEN = 0,
ORE_VERDANTIUM = 0,
ORE_RUTILE = 0)
/obj/structure/ore_box/attackby(obj/item/W as obj, mob/user as mob)
+61 -61
View File
@@ -14,8 +14,8 @@
"thousand" = 999,
"million" = 999
)
var/xarch_source_mineral = "iron"
var/reagent = "silicate"
var/xarch_source_mineral = REAGENT_ID_IRON
var/reagent = REAGENT_SILICATE
/ore/New()
. = ..()
@@ -23,9 +23,9 @@
display_name = name
/ore/uranium
name = "uranium"
name = ORE_LEAD
display_name = "pitchblende"
smelts_to = "uranium"
smelts_to = MAT_URANIUM
result_amount = 5
spread_chance = 10
ore = /obj/item/ore/uranium
@@ -34,43 +34,43 @@
"thousand" = 999,
"million" = 704
)
xarch_source_mineral = "potassium"
reagent = "uranium"
xarch_source_mineral = REAGENT_ID_POTASSIUM
reagent = REAGENT_ID_URANIUM
/ore/hematite
name = "hematite"
name = ORE_HEMATITE
display_name = "hematite"
smelts_to = "iron"
smelts_to = MAT_IRON
alloy = 1
result_amount = 5
spread_chance = 25
ore = /obj/item/ore/iron
scan_icon = "mineral_common"
reagent = "iron"
reagent = REAGENT_ID_IRON
/ore/coal
name = "carbon"
name = ORE_CARBON
display_name = "raw carbon"
smelts_to = "plastic"
compresses_to = "graphite"
smelts_to = MAT_PLASTIC
compresses_to = MAT_GRAPHITE
alloy = 1
result_amount = 5
spread_chance = 25
ore = /obj/item/ore/coal
scan_icon = "mineral_common"
reagent = "carbon"
reagent = REAGENT_ID_CARBON
/ore/glass
name = "sand"
name = ORE_SAND
display_name = "sand"
smelts_to = "glass"
smelts_to = MAT_GLASS
alloy = 1
compresses_to = "sandstone"
/ore/phoron
name = "phoron"
name = ORE_PHORON
display_name = "phoron crystals"
compresses_to = "phoron"
compresses_to = MAT_PHORON
//smelts_to = something that explodes violently on the conveyor, huhuhuhu
result_amount = 5
spread_chance = 25
@@ -82,22 +82,22 @@
"billion" = 13,
"billion_lower" = 10
)
xarch_source_mineral = "phoron"
reagent = "phoron"
xarch_source_mineral = REAGENT_ID_PHORON
reagent = REAGENT_ID_PHORON
/ore/silver
name = "silver"
name = ORE_SILVER
display_name = "native silver"
smelts_to = "silver"
smelts_to = MAT_SILVER
result_amount = 5
spread_chance = 10
ore = /obj/item/ore/silver
scan_icon = "mineral_uncommon"
reagent = "silver"
reagent = REAGENT_ID_SILVER
/ore/gold
smelts_to = "gold"
name = "gold"
name = ORE_GOLD
smelts_to = MAT_GOLD
display_name = "native gold"
result_amount = 5
spread_chance = 10
@@ -109,42 +109,42 @@
"billion" = 4,
"billion_lower" = 3
)
reagent = "gold"
reagent = REAGENT_ID_GOLD
/ore/diamond
name = "diamond"
name = ORE_DIAMOND
display_name = "diamond"
alloy = 1
compresses_to = "diamond"
compresses_to = MAT_DIAMOND
result_amount = 5
spread_chance = 10
ore = /obj/item/ore/diamond
scan_icon = "mineral_rare"
xarch_source_mineral = "nitrogen"
reagent = "carbon"
xarch_source_mineral = REAGENT_ID_NITROGEN
reagent = REAGENT_ID_CARBON
/ore/platinum
name = "platinum"
name = ORE_PLATINUM
display_name = "raw platinum"
smelts_to = "platinum"
compresses_to = "osmium"
smelts_to = MAT_PLATINUM
compresses_to = MAT_OSMIUM
alloy = 1
result_amount = 5
spread_chance = 10
ore = /obj/item/ore/osmium
scan_icon = "mineral_rare"
reagent = "platinum"
reagent = REAGENT_ID_PLATINUM
/ore/hydrogen
name = "mhydrogen"
name = ORE_MHYDROGEN
display_name = "metallic hydrogen"
smelts_to = "tritium"
compresses_to = "mhydrogen"
smelts_to = MAT_TRITIUM
compresses_to = MAT_METALHYDROGEN
scan_icon = "mineral_rare"
reagent = "hydrogen"
reagent = REAGENT_ID_HYDROGEN
/ore/verdantium
name = MAT_VERDANTIUM
name = ORE_VERDANTIUM
display_name = "crystalline verdantite"
compresses_to = MAT_VERDANTIUM
result_amount = 2
@@ -157,40 +157,40 @@
)
/ore/marble
name = MAT_MARBLE
name = ORE_MARBLE
display_name = "recrystallized carbonate"
compresses_to = "marble"
compresses_to = MAT_MARBLE
result_amount = 1
spread_chance = 10
ore = /obj/item/ore/marble
scan_icon = "mineral_common"
reagent = "calciumcarbonate"
reagent = REAGENT_ID_CALCIUMCARBONATE
/ore/lead
name = MAT_LEAD
name = ORE_LEAD
display_name = "lead glance"
smelts_to = "lead"
smelts_to = MAT_LEAD
result_amount = 3
spread_chance = 20
ore = /obj/item/ore/lead
scan_icon = "mineral_rare"
reagent = "lead"
reagent = REAGENT_ID_LEAD
/*
/ore/copper
name = "copper"
name = ORE_COPPER
display_name = "copper"
smelts_to = "copper"
smelts_to = MAT_COPPER
alloy = 1
result_amount = 5
spread_chance = 15
ore = /obj/item/ore/copper
scan_icon = "mineral_common"
reagent = "copper"
reagent = REAGENT_ID_COPPER
/ore/tin
name = "tin"
name = ORE_TIN
display_name = "tin"
smelts_to = "tin"
smelts_to = MAT_TIN
alloy = 1
result_amount = 5
spread_chance = 10
@@ -198,28 +198,28 @@
scan_icon = "mineral_common"
/ore/quartz
name = "quartz"
name = ORE_QUARTZ
display_name = "unrefined quartz"
compresses_to = "quartz"
compresses_to = MAT_QUARTZ
result_amount = 5
spread_chance = 5
ore = /obj/item/ore/quartz
scan_icon = "mineral_common"
/ore/bauxite
name = "bauxite"
name = ORE_BAUXITE
display_name = "bauxite"
smelts_to = "aluminium"
smelts_to = MAT_ALUMINIUM
result_amount = 5
spread_chance = 25
ore = /obj/item/ore/bauxite
scan_icon = "mineral_common"
reagent = "aluminum"
reagent = REAGENT_ID_ALUMINIUM
*/
/ore/rutile
name = "rutile"
name = ORE_RUTILE
display_name = "rutile"
smelts_to = "titanium"
smelts_to = MAT_TITANIUM
result_amount = 5
spread_chance = 12
alloy = 1
@@ -227,20 +227,20 @@
scan_icon = "mineral_uncommon"
/*
/ore/painite
name = "painite"
name = ORE_PAINITE
display_name = "rough painite"
compresses_to = "painite"
compresses_to = MAT_PAINITE
result_amount = 5
spread_chance = 3
ore = /obj/item/ore/painite
scan_icon = "mineral_rare"
/ore/void_opal
name = "void opal"
name = ORE_VOPAL
display_name = "rough void opal"
compresses_to = "void opal"
compresses_to = MAT_VOPAL
result_amount = 5
spread_chance = 1
ore = /obj/item/ore/void_opal
scan_icon = "mineral_rare"
*/
*/
@@ -5,7 +5,7 @@
if(!environment) return
var/turf/T = get_turf(src)
if(environment.gas["phoron"] > 0 || (T && locate(/obj/effect/alien/weeds) in T.contents))
if(environment.gas[GAS_PHORON] > 0 || (T && locate(/obj/effect/alien/weeds) in T.contents))
update_progression()
adjustBruteLoss(-1)
adjustFireLoss(-1)
+11 -11
View File
@@ -609,13 +609,13 @@
if(species.breath_type)
breath_type = species.breath_type
else
breath_type = "oxygen"
breath_type = GAS_O2
inhaling = breath.gas[breath_type]
if(species.poison_type)
poison_type = species.poison_type
else
poison_type = "phoron"
poison_type = GAS_PHORON
poison = breath.gas[poison_type]
if(species.exhale_type)
@@ -640,17 +640,17 @@
failed_inhale = 1
switch(breath_type)
if("oxygen")
if(GAS_O2)
throw_alert("oxy", /obj/screen/alert/not_enough_oxy)
if("phoron")
if(GAS_PHORON)
throw_alert("oxy", /obj/screen/alert/not_enough_tox)
if("nitrogen")
if(GAS_N2)
throw_alert("oxy", /obj/screen/alert/not_enough_nitro)
if("carbon_dioxide")
if(GAS_CO2)
throw_alert("oxy", /obj/screen/alert/not_enough_co2)
if("volatile_fuel")
if(GAS_VOLATILE_FUEL)
throw_alert("oxy", /obj/screen/alert/not_enough_fuel)
if("nitrous_oxide")
if(GAS_N2O)
throw_alert("oxy", /obj/screen/alert/not_enough_n2o)
else
@@ -702,8 +702,8 @@
clear_alert("tox_in_air")
// If there's some other shit in the air lets deal with it here.
if(breath.gas["nitrous_oxide"])
var/SA_pp = (breath.gas["nitrous_oxide"] / breath.total_moles) * breath_pressure
if(breath.gas[GAS_N2O])
var/SA_pp = (breath.gas[GAS_N2O] / breath.total_moles) * breath_pressure
// Enough to make us paralysed for a bit
if(SA_pp > SA_para_min)
@@ -719,7 +719,7 @@
else if(SA_pp > 0.15)
if(prob(20))
spawn(0) emote(pick("giggle", "laugh"))
breath.adjust_gas("nitrous_oxide", -breath.gas["nitrous_oxide"]/6, update = 0) //update after
breath.adjust_gas(GAS_N2O, -breath.gas[GAS_N2O]/6, update = 0) //update after
// Were we able to breathe?
if (failed_inhale || failed_exhale)
@@ -43,8 +43,8 @@
gluttonous = 1
breath_type = "phoron"
poison_type = "oxygen"
breath_type = GAS_PHORON
poison_type = GAS_O2
ideal_air_type = /datum/gas_mixture/belly_air/vox
siemens_coefficient = 0.2
@@ -133,9 +133,9 @@
// Environment tolerance/life processes vars.
var/reagent_tag //Used for metabolizing reagents.
var/breath_type = "oxygen" // Non-oxygen gas breathed, if any.
var/poison_type = "phoron" // Poisonous air.
var/exhale_type = "carbon_dioxide" // Exhaled gas type.
var/breath_type = GAS_O2 // Non-oxygen gas breathed, if any.
var/poison_type = GAS_PHORON // Poisonous air.
var/exhale_type = GAS_CO2 // Exhaled gas type.
var/water_breather = FALSE
var/bad_swimmer = FALSE
@@ -18,9 +18,9 @@
selects_bodytype = SELECTS_BODYTYPE_CUSTOM //VOREStation edit
body_temperature = T20C
breath_type = "oxygen"
poison_type = "phoron"
exhale_type = "oxygen"
breath_type = GAS_O2
poison_type = GAS_PHORON
exhale_type = GAS_O2
water_breather = TRUE //eh, why not? Aquatic plants are a thing.
// Heat and cold resistances are 20 degrees broader on the level 1 range, level 2 is default, level 3 is much weaker, halfway between L2 and normal L3.
@@ -169,7 +169,7 @@
var/failed_inhale = 0
var/failed_exhale = 0
inhaling = breath.gas["carbon_dioxide"]
inhaling = breath.gas[GAS_CO2]
poison = breath.gas[poison_type]
exhaling = breath.gas[exhale_type]
@@ -193,7 +193,7 @@
H.clear_alert("oxy")
inhaled_gas_used = inhaling/6
breath.adjust_gas("carbon_dioxide", -inhaled_gas_used, update = 0) //update afterwards
breath.adjust_gas(GAS_CO2, -inhaled_gas_used, update = 0) //update afterwards
breath.adjust_gas_temp(exhale_type, inhaled_gas_used, H.bodytemperature, update = 0) //update afterwards
//Now we handle CO2.
@@ -69,10 +69,10 @@
//Called when spawning to equip them with special things.
/datum/species/custom/equip_survival_gear(var/mob/living/carbon/human/H, var/extendedtank = 0, var/comprehensive = 0)
. = ..()
if(breath_type != "oxygen")
if(breath_type != GAS_O2)
H.equip_to_slot_or_del(new /obj/item/clothing/mask/breath(H), slot_wear_mask)
var/obj/item/tank/tankpath
if(breath_type == "phoron")
if(breath_type == GAS_PHORON)
tankpath = /obj/item/tank/vox
else
tankpath = text2path("/obj/item/tank/" + breath_type)
@@ -430,7 +430,7 @@
warning_low_pressure = 300 // Low pressure warning.
hazard_low_pressure = 220 // Dangerously low pressure.
safe_pressure = 400
poison_type = "nitrogen" // technically it's a partial pressure thing but IDK if we can emulate that
poison_type = GAS_N2 // technically it's a partial pressure thing but IDK if we can emulate that
ideal_air_type = /datum/gas_mixture/belly_air/zaddat
genders = list(FEMALE, PLURAL) //females are polyp-producing, infertile females and males are nigh-identical
@@ -154,12 +154,12 @@
/datum/trait/negative/breathes/phoron
name = "Phoron Breather"
desc = "You breathe phoron instead of oxygen (which is poisonous to you), much like a Vox."
var_changes = list("breath_type" = "phoron", "poison_type" = "oxygen", "ideal_air_type" = /datum/gas_mixture/belly_air/vox)
var_changes = list("breath_type" = GAS_PHORON, "poison_type" = GAS_O2, "ideal_air_type" = /datum/gas_mixture/belly_air/vox)
/datum/trait/negative/breathes/nitrogen
name = "Nitrogen Breather"
desc = "You breathe nitrogen instead of oxygen (which is poisonous to you). Incidentally, phoron isn't poisonous to breathe to you."
var_changes = list("breath_type" = "nitrogen", "poison_type" = "oxygen", "ideal_air_type" = /datum/gas_mixture/belly_air/nitrogen_breather)
var_changes = list("breath_type" = GAS_N2, "poison_type" = GAS_O2, "ideal_air_type" = /datum/gas_mixture/belly_air/nitrogen_breather)
/datum/trait/negative/monolingual
name = "Monolingual"
@@ -114,7 +114,7 @@
var/datum/gas_mixture/environment = T.return_air()
if(!environment) return
if(environment.gas["phoron"] > 0 || locate(/obj/effect/alien/weeds) in T)
if(environment.gas[GAS_PHORON] > 0 || locate(/obj/effect/alien/weeds) in T)
if(!regenerate(H))
var/obj/item/organ/internal/xenos/plasmavessel/P = H.internal_organs_by_name[O_PLASMA]
P.stored_plasma += weeds_plasma_rate
+1 -1
View File
@@ -442,7 +442,7 @@
return 1
var/datum/gas_mixture/G = loc.return_air() // Check if we're standing in an oxygenless environment
if(G.gas["oxygen"] < 1)
if(G.gas[GAS_O2] < 1)
ExtinguishMob() //If there's no oxygen in the tile we're on, put out the fire
return 1
@@ -340,10 +340,10 @@
var/pressure = environment.return_pressure()
var/total_moles = environment.total_moles
if (total_moles)
var/o2_level = environment.gas["oxygen"]/total_moles
var/n2_level = environment.gas["nitrogen"]/total_moles
var/co2_level = environment.gas["carbon_dioxide"]/total_moles
var/phoron_level = environment.gas["phoron"]/total_moles
var/o2_level = environment.gas[GAS_O2]/total_moles
var/n2_level = environment.gas[GAS_N2]/total_moles
var/co2_level = environment.gas[GAS_CO2]/total_moles
var/phoron_level = environment.gas[GAS_PHORON]/total_moles
var/unknown_level = 1-(o2_level+n2_level+co2_level+phoron_level)
// entry is what the element is describing
+8 -8
View File
@@ -118,37 +118,37 @@
if( abs(Environment.temperature - bodytemperature) > temperature_range ) //VOREStation Edit: heating adjustments
bodytemperature += ((Environment.temperature - bodytemperature) / 5)
if(min_oxy && Environment.gas["oxygen"] < min_oxy)
if(min_oxy && Environment.gas[GAS_O2] < min_oxy)
atmos_unsuitable = 1
throw_alert("oxy", /obj/screen/alert/not_enough_oxy)
else if(max_oxy && Environment.gas["oxygen"] > max_oxy)
else if(max_oxy && Environment.gas[GAS_O2] > max_oxy)
atmos_unsuitable = 1
throw_alert("oxy", /obj/screen/alert/too_much_oxy)
else
clear_alert("oxy")
if(min_tox && Environment.gas["phoron"] < min_tox)
if(min_tox && Environment.gas[GAS_PHORON] < min_tox)
atmos_unsuitable = 2
throw_alert("tox_in_air", /obj/screen/alert/not_enough_tox)
else if(max_tox && Environment.gas["phoron"] > max_tox)
else if(max_tox && Environment.gas[GAS_PHORON] > max_tox)
atmos_unsuitable = 2
throw_alert("tox_in_air", /obj/screen/alert/tox_in_air)
else
clear_alert("tox_in_air")
if(min_n2 && Environment.gas["nitrogen"] < min_n2)
if(min_n2 && Environment.gas[GAS_N2] < min_n2)
atmos_unsuitable = 1
throw_alert("n2o", /obj/screen/alert/not_enough_nitro)
else if(max_n2 && Environment.gas["nitrogen"] > max_n2)
else if(max_n2 && Environment.gas[GAS_N2] > max_n2)
atmos_unsuitable = 1
throw_alert("n2o", /obj/screen/alert/too_much_nitro)
else
clear_alert("n2o")
if(min_co2 && Environment.gas["carbon_dioxide"] < min_co2)
if(min_co2 && Environment.gas[GAS_CO2] < min_co2)
atmos_unsuitable = 1
throw_alert("co2", /obj/screen/alert/not_enough_co2)
else if(max_co2 && Environment.gas["carbon_dioxide"] > max_co2)
else if(max_co2 && Environment.gas[GAS_CO2] > max_co2)
atmos_unsuitable = 1
throw_alert("co2", /obj/screen/alert/too_much_co2)
else
@@ -43,7 +43,7 @@
poison_chance = 30
poison_per_bite = 0.5
poison_type = "phoron"
poison_type = REAGENT_ID_PHORON
tame_items = list(
/obj/item/tank/phoron = 20,
@@ -49,8 +49,8 @@
var/list/bodypart_targets = list(BP_L_LEG,BP_R_LEG,BP_L_ARM,BP_R_ARM,BP_TORSO,BP_GROIN,BP_HEAD)
var/infest_target = BP_TORSO // The currently chosen bodypart to infest.
var/mob/living/carbon/host // Our humble host.
var/list/produceable_chemicals = list("inaprovaline","anti_toxin","alkysine","bicaridine","tramadol","kelotane","leporazine","iron","phoron","condensedcapsaicin_v","frostoil")
var/randomized_reagent = "iron" // The reagent chosen at random to be produced, if there's no one piloting the worm.
var/list/produceable_chemicals = list("inaprovaline","anti_toxin","alkysine","bicaridine","tramadol","kelotane","leporazine",REAGENT_ID_IRON,REAGENT_ID_PHORON,"condensedcapsaicin_v","frostoil")
var/randomized_reagent = REAGENT_ID_IRON // The reagent chosen at random to be produced, if there's no one piloting the worm.
var/passive_reagent = "paracetamol" // Reagent passively produced by the leech. Should usually be a painkiller.
var/feeding_delay = 30 SECONDS // How long do we have to wait to bite our host's organs?
@@ -173,7 +173,7 @@
color = "#660088"
slime_color = "dark purple"
coretype = /obj/item/slime_extract/dark_purple
reagent_injected = "phoron"
reagent_injected = REAGENT_ID_PHORON
description_info = "This slime applies phoron to enemies it attacks. A biosuit or other thick armor can protect from the toxic attack. \
If hit with a burning attack, it will erupt in flames."
@@ -190,7 +190,7 @@
/mob/living/simple_mob/slime/xenobio/dark_purple/proc/ignite()
visible_message(span_critical("\The [src] erupts in an inferno!"))
for(var/turf/simulated/target_turf in view(2, src))
target_turf.assume_gas("phoron", 30, 1500+T0C)
target_turf.assume_gas(GAS_PHORON, 30, 1500+T0C)
spawn(0)
target_turf.hotspot_expose(1500+T0C, 400)
qdel(src)
+2 -2
View File
@@ -123,7 +123,7 @@
else if(mode == 1)
mode = 2
nif.notify("Medichines unable to repair all damage. Perform manual repairs.",TRUE)
if(mode == 2 && HP_percent < -0.4) //lets inform someone who might be able to help us that we got toasted and roasted
nif.notify("User Status: CRITICAL. Notifying medical!",TRUE)
mode = 3 //this does nothing except stop it from repeating over and over and over and over and over and over and over
@@ -186,7 +186,7 @@
/datum/nifsoft/spare_breath/proc/resp_breath()
if(!active) return null
var/datum/gas_mixture/breath = new(BREATH_VOLUME)
breath.adjust_gas("oxygen", BREATH_MOLES)
breath.adjust_gas(GAS_O2, BREATH_MOLES)
breath.temperature = T20C
return breath
+1 -1
View File
@@ -284,7 +284,7 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain)
name = "Promethean Revival"
id = "prom_revival"
result = null
required_reagents = list("phoron" = 40)
required_reagents = list(REAGENT_ID_PHORON = 40)
result_amount = 1
/decl/chemical_reaction/instant/promethean_brain_revival/can_happen(var/datum/reagents/holder)

Some files were not shown because too many files have changed in this diff Show More