[MIRROR] Converts gas, ore, plants and reagent strings to defines (#9611)

Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2024-12-11 18:11:06 -07:00
committed by GitHub
parent d5b62d4159
commit fd5d9267ff
622 changed files with 11273 additions and 9558 deletions

View File

@@ -27,7 +27,7 @@
var/obj/item/stack/nanopaste/np = W
if((supply.get_free_space() >= efficiency) && np.use(1))
to_chat(user, span_notice("You convert some nanopaste into programmed nanites inside \the [src]."))
supply.add_reagent(id = "nifrepairnanites", amount = efficiency)
supply.add_reagent(id = REAGENT_ID_NIFREPAIRNANITES, amount = efficiency)
update_icon()
else if(supply.get_free_space() < efficiency)
to_chat(user, span_warning("\The [src] is too full. Empty it into a container first."))

View File

@@ -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

View File

@@ -343,7 +343,7 @@
if(!heart)
return TRUE
var/blood_volume = H.vessel.get_reagent_amount("blood")
var/blood_volume = H.vessel.get_reagent_amount(REAGENT_ID_BLOOD)
if(!heart || heart.is_broken())
blood_volume *= 0.3
else if(heart.is_bruised())

View File

@@ -149,8 +149,8 @@
if(M.getBrainLoss() > 15)
to_chat(user, span_notice("There's visible lag between left and right pupils' reactions."))
var/list/pinpoint = list("oxycodone"=1,"tramadol"=5)
var/list/dilating = list("bliss"=5,"ambrosia_extract"=5,"mindbreaker"=1)
var/list/pinpoint = list(REAGENT_ID_OXYCODONE=1,REAGENT_ID_TRAMADOL=5)
var/list/dilating = list(REAGENT_ID_BLISS=5,REAGENT_ID_AMBROSIAEXTRACT=5,REAGENT_ID_MINDBREAKER=1)
if(M.reagents.has_any_reagent(pinpoint) || H.ingested.has_any_reagent(pinpoint))
to_chat(user, span_notice("\The [M]'s pupils are already pinpoint and cannot narrow any more."))
else if(M.reagents.has_any_reagent(dilating) || H.ingested.has_any_reagent(dilating))

View File

@@ -66,7 +66,7 @@
. += "It has [uses] lights remaining."
/obj/item/lightreplacer/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/stack/material) && W.get_material_name() == "glass" || istype(W, /obj/item/stack/material/cyborg/glass))
if(istype(W, /obj/item/stack/material) && W.get_material_name() == MAT_GLASS || istype(W, /obj/item/stack/material/cyborg/glass))
var/obj/item/stack/G = W
if(uses >= max_uses)
to_chat(user, span_warning("[src.name] is full."))

View File

@@ -71,7 +71,7 @@
if(org.damage >= 1 && !istype(org, /obj/item/organ/internal/brain))
organ = TRUE
var/blood_volume = M.vessel.get_reagent_amount("blood")
var/blood_volume = M.vessel.get_reagent_amount(REAGENT_ID_BLOOD)
if(blood_volume <= M.species.blood_volume*M.species.blood_level_safe)
bloodloss = TRUE

View File

@@ -260,8 +260,8 @@
if (M.getCloneLoss())
dat += span_warning("Subject appears to have been imperfectly cloned.")
dat += "<br>"
// if (M.reagents && M.reagents.get_reagent_amount("inaprovaline"))
// user.show_message(span_notice("Bloodstream Analysis located [M.reagents:get_reagent_amount("inaprovaline")] units of rejuvenation chemicals."))
// if (M.reagents && M.reagents.get_reagent_amount(REAGENT_ID_INAPROVALINE))
// user.show_message(span_notice("Bloodstream Analysis located [M.reagents:get_reagent_amount(REAGENT_ID_INAPROVALINE)] units of rejuvenation chemicals."))
if (M.has_brain_worms())
dat += span_warning("Subject suffering from aberrant brain activity. Recommend further scanning.")
dat += "<br>"
@@ -359,7 +359,7 @@
// Blood level
if(M:vessel)
var/blood_volume = H.vessel.get_reagent_amount("blood")
var/blood_volume = H.vessel.get_reagent_amount(REAGENT_ID_BLOOD)
var/blood_percent = round((blood_volume / H.species.blood_volume)*100)
var/blood_type = H.dna.b_type
var/blood_reagent = H.species.blood_reagents

View File

@@ -40,7 +40,7 @@
if(reagents.total_volume)
var/list/blood_traces = list()
for(var/datum/reagent/R in reagents.reagent_list)
if(R.id != "blood")
if(R.id != REAGENT_ID_BLOOD)
reagents.clear_reagents()
to_chat(user, span_warning("The sample was contaminated! Please insert another sample"))
return