mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-09 16:12:17 +00:00
[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:
committed by
GitHub
parent
d5b62d4159
commit
fd5d9267ff
@@ -716,16 +716,16 @@
|
||||
/mob/living/proc/calculate_composition() // moved from devour.dm on aurora's side
|
||||
if (!composition_reagent)//if no reagent has been set, then we'll set one
|
||||
if (isSynthetic())
|
||||
src.composition_reagent = "iron"
|
||||
src.composition_reagent = REAGENT_ID_IRON
|
||||
else
|
||||
if(istype(src, /mob/living/carbon/human/diona) || istype(src, /mob/living/carbon/alien/diona))
|
||||
src.composition_reagent = "nutriment" // diona are plants, not meat
|
||||
src.composition_reagent = REAGENT_ID_NUTRIMENT // diona are plants, not meat
|
||||
else
|
||||
src.composition_reagent = "protein"
|
||||
src.composition_reagent = REAGENT_ID_PROTEIN
|
||||
if(istype(src, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = src
|
||||
if(istype(H.species, /datum/species/diona))
|
||||
src.composition_reagent = "nutriment"
|
||||
src.composition_reagent = REAGENT_ID_NUTRIMENT
|
||||
|
||||
//if the mob is a simple animal - MOB NOT ANIMAL - with a defined meat quantity
|
||||
if (istype(src, /mob/living/simple_mob))
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
if(prob(20))
|
||||
// Sometimes the fryer will start with much less than full oil, significantly impacting efficiency until filled
|
||||
variance = rand()*0.5
|
||||
oil.add_reagent("cookingoil", optimal_oil*(1 - variance))
|
||||
oil.add_reagent(REAGENT_ID_COOKINGOIL, optimal_oil*(1 - variance))
|
||||
|
||||
/obj/machinery/appliance/cooker/fryer/Destroy()
|
||||
QDEL_NULL(fry_loop)
|
||||
|
||||
@@ -218,7 +218,7 @@
|
||||
var/obj/item/reagent_containers/food/snacks/meat/new_meat = new slab_type(src, rand(3,8))
|
||||
if(istype(new_meat))
|
||||
new_meat.name = "[slab_name] [new_meat.name]"
|
||||
new_meat.reagents.add_reagent("nutriment",slab_nutrition)
|
||||
new_meat.reagents.add_reagent(REAGENT_ID_NUTRIMENT,slab_nutrition)
|
||||
if(src.occupant.reagents)
|
||||
src.occupant.reagents.trans_to_obj(new_meat, round(occupant.reagents.total_volume/(2 + occupant.meat_amount),1))
|
||||
|
||||
|
||||
@@ -24,17 +24,17 @@
|
||||
/obj/machinery/icecream_vat/proc/get_ingredient_list(var/type)
|
||||
switch(type)
|
||||
if(ICECREAM_CHOCOLATE)
|
||||
return list("milk", "ice", "coco")
|
||||
return list(REAGENT_ID_MILK, REAGENT_ID_ICE, REAGENT_ID_COCO)
|
||||
if(ICECREAM_STRAWBERRY)
|
||||
return list("milk", "ice", "berryjuice")
|
||||
return list(REAGENT_ID_MILK, REAGENT_ID_ICE, REAGENT_ID_BERRYJUICE)
|
||||
if(ICECREAM_BLUE)
|
||||
return list("milk", "ice", "singulo")
|
||||
return list(REAGENT_ID_MILK, REAGENT_ID_ICE, REAGENT_ID_SINGULO)
|
||||
if(CONE_WAFFLE)
|
||||
return list("flour", "sugar")
|
||||
return list(REAGENT_ID_FLOUR, REAGENT_ID_SUGAR)
|
||||
if(CONE_CHOC)
|
||||
return list("flour", "sugar", "coco")
|
||||
return list(REAGENT_ID_FLOUR, REAGENT_ID_SUGAR, REAGENT_ID_COCO)
|
||||
else
|
||||
return list("milk", "ice")
|
||||
return list(REAGENT_ID_MILK, REAGENT_ID_ICE)
|
||||
|
||||
/obj/machinery/icecream_vat/proc/get_flavour_name(var/flavour_type)
|
||||
switch(flavour_type)
|
||||
@@ -56,10 +56,10 @@
|
||||
create_reagents(100)
|
||||
while(product_types.len < 6)
|
||||
product_types.Add(5)
|
||||
reagents.add_reagent("milk", 5)
|
||||
reagents.add_reagent("flour", 5)
|
||||
reagents.add_reagent("sugar", 5)
|
||||
reagents.add_reagent("ice", 5)
|
||||
reagents.add_reagent(REAGENT_ID_MILK, 5)
|
||||
reagents.add_reagent(REAGENT_ID_FLOUR, 5)
|
||||
reagents.add_reagent(REAGENT_ID_SUGAR, 5)
|
||||
reagents.add_reagent(REAGENT_ID_ICE, 5)
|
||||
|
||||
/obj/machinery/icecream_vat/attack_hand(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
@@ -104,7 +104,7 @@
|
||||
// if(beaker)
|
||||
// beaker.reagents.trans_to(I, 10)
|
||||
if(I.reagents.total_volume < 10)
|
||||
I.reagents.add_reagent("sugar", 10 - I.reagents.total_volume)
|
||||
I.reagents.add_reagent(REAGENT_ID_SUGAR, 10 - I.reagents.total_volume)
|
||||
else
|
||||
to_chat(user, span_warning("There is not enough icecream left!"))
|
||||
else
|
||||
@@ -185,7 +185,7 @@
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/icecream/New()
|
||||
create_reagents(20)
|
||||
reagents.add_reagent("nutriment", 5)
|
||||
reagents.add_reagent(REAGENT_ID_NUTRIMENT, 5)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/icecream/proc/add_ice_cream(var/flavour_name)
|
||||
name = "[flavour_name] icecream"
|
||||
|
||||
@@ -276,9 +276,9 @@
|
||||
var/list/reagents_data = list()
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
var/display_name = R.name
|
||||
if(R.id == "capsaicin")
|
||||
if(R.id == REAGENT_ID_CAPSAICIN)
|
||||
display_name = "Hotsauce"
|
||||
if(R.id == "frostoil")
|
||||
if(R.id == REAGENT_ID_FROSTOIL)
|
||||
display_name = "Coldsauce"
|
||||
UNTYPED_LIST_ADD(reagents_data, list(
|
||||
"name" = display_name,
|
||||
@@ -552,8 +552,8 @@
|
||||
qdel(H.held_mob)
|
||||
qdel(O)
|
||||
src.reagents.clear_reagents()
|
||||
ffuu.reagents.add_reagent("carbon", amount)
|
||||
ffuu.reagents.add_reagent("toxin", amount/10)
|
||||
ffuu.reagents.add_reagent(REAGENT_ID_CARBON, amount)
|
||||
ffuu.reagents.add_reagent(REAGENT_ID_TOXIN, amount/10)
|
||||
return ffuu
|
||||
|
||||
/obj/machinery/microwave/verb/Eject()
|
||||
|
||||
Reference in New Issue
Block a user