All-In-One grinder results are now defined by type, not by huge lists
This commit is contained in:
committed by
CitadelStationBot
parent
a22b225015
commit
2aef00daf0
@@ -10,6 +10,7 @@
|
||||
volume = 10
|
||||
amount_per_transfer_from_this = 0
|
||||
list_reagents = list("honey" = 5)
|
||||
grind_results = list()
|
||||
var/honey_color = ""
|
||||
|
||||
/obj/item/reagent_containers/honeycomb/New()
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
// Saves us from having to define each stupid grown's dried_type as itself.
|
||||
// If you don't want a plant to be driable (watermelons) set this to null in the time definition.
|
||||
resistance_flags = FLAMMABLE
|
||||
var/dry_grind = FALSE //If TRUE, this object needs to be dry to be ground up
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/Initialize(mapload, obj/item/seeds/new_seed)
|
||||
. = ..()
|
||||
@@ -137,6 +138,28 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/grind_requirements()
|
||||
if(dry_grind && !dry)
|
||||
to_chat(usr, "<span class='warning'>[src] needs to be dry before it can be ground up!</span>")
|
||||
return
|
||||
return TRUE
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/on_grind()
|
||||
var/nutriment = reagents.get_reagent_amount("nutriment")
|
||||
if(grind_results.len)
|
||||
for(var/i in 1 to grind_results.len)
|
||||
grind_results[grind_results[i]] = nutriment
|
||||
reagents.del_reagent("nutriment")
|
||||
reagents.del_reagent("vitamin")
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/on_juice()
|
||||
var/nutriment = reagents.get_reagent_amount("nutriment")
|
||||
if(juice_results.len)
|
||||
for(var/i in 1 to juice_results.len)
|
||||
juice_results[juice_results[i]] = nutriment
|
||||
reagents.del_reagent("nutriment")
|
||||
reagents.del_reagent("vitamin")
|
||||
|
||||
// For item-containing growns such as eggy or gatfruit
|
||||
/obj/item/reagent_containers/food/snacks/grown/shell/attack_self(mob/user)
|
||||
var/obj/item/T
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
genes = list(/datum/plant_gene/trait/repeated_harvest)
|
||||
mutatelist = list(/obj/item/seeds/apple/gold)
|
||||
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
|
||||
juice_results = list("applejuice" = 0)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/apple
|
||||
seed = /obj/item/seeds/apple
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
genes = list(/datum/plant_gene/trait/slip, /datum/plant_gene/trait/repeated_harvest)
|
||||
mutatelist = list(/obj/item/seeds/banana/mime, /obj/item/seeds/banana/bluespace)
|
||||
reagents_add = list("banana" = 0.1, "potassium" = 0.1, "vitamin" = 0.04, "nutriment" = 0.02)
|
||||
juice_results = list("banana" = 0)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/banana
|
||||
seed = /obj/item/seeds/banana
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
filling_color = "#F0E68C"
|
||||
bitesize_mod = 2
|
||||
foodtype = VEGETABLES
|
||||
grind_results = list("soymilk" = 0)
|
||||
|
||||
// Koibean
|
||||
/obj/item/seeds/soya/koi
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
filling_color = "#FF00FF"
|
||||
bitesize_mod = 2
|
||||
foodtype = FRUIT
|
||||
juice_results = list("berryjuice" = 0)
|
||||
|
||||
// Poison Berries
|
||||
/obj/item/seeds/berry/poison
|
||||
@@ -46,6 +47,7 @@
|
||||
icon_state = "poisonberrypile"
|
||||
filling_color = "#C71585"
|
||||
foodtype = FRUIT | TOXIC
|
||||
juice_results = list("poisonberryjuice" = 0)
|
||||
|
||||
// Death Berries
|
||||
/obj/item/seeds/berry/death
|
||||
@@ -121,6 +123,7 @@
|
||||
filling_color = "#FF0000"
|
||||
bitesize_mod = 2
|
||||
foodtype = FRUIT
|
||||
grind_results = list("cherryjelly" = 0)
|
||||
|
||||
// Blue Cherries
|
||||
/obj/item/seeds/cherry/blue
|
||||
@@ -142,6 +145,7 @@
|
||||
filling_color = "#6495ED"
|
||||
bitesize_mod = 2
|
||||
foodtype = FRUIT
|
||||
grind_results = list("bluecherryjelly" = 0)
|
||||
|
||||
// Grapes
|
||||
/obj/item/seeds/grape
|
||||
@@ -173,6 +177,7 @@
|
||||
filling_color = "#FF1493"
|
||||
bitesize_mod = 2
|
||||
foodtype = FRUIT
|
||||
juice_results = list("grapejuice" = 0)
|
||||
|
||||
// Green Grapes
|
||||
/obj/item/seeds/grape/green
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
filling_color = "#F0E68C"
|
||||
bitesize_mod = 2
|
||||
foodtype = GRAIN
|
||||
grind_results = list("flour" = 0)
|
||||
|
||||
// Oat
|
||||
/obj/item/seeds/wheat/oat
|
||||
@@ -42,6 +43,7 @@
|
||||
filling_color = "#556B2F"
|
||||
bitesize_mod = 2
|
||||
foodtype = GRAIN
|
||||
grind_results = list("flour" = 0)
|
||||
|
||||
// Rice
|
||||
/obj/item/seeds/wheat/rice
|
||||
@@ -63,6 +65,7 @@
|
||||
filling_color = "#FAFAD2"
|
||||
bitesize_mod = 2
|
||||
foodtype = GRAIN
|
||||
grind_results = list("rice" = 0)
|
||||
|
||||
//Meatwheat - grows into synthetic meat
|
||||
/obj/item/seeds/wheat/meat
|
||||
@@ -83,6 +86,7 @@
|
||||
bitesize_mod = 2
|
||||
seed = /obj/item/seeds/wheat/meat
|
||||
foodtype = MEAT | GRAIN
|
||||
grind_results = list("flour" = 0, "blood" = 0)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/meatwheat/attack_self(mob/living/user)
|
||||
user.visible_message("<span class='notice'>[user] crushes [src] into meat.</span>", "<span class='notice'>You crush [src] into something that resembles meat.</span>")
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
desc = "It's so sour, your face will twist."
|
||||
icon_state = "lime"
|
||||
filling_color = "#00FF00"
|
||||
juice_results = list("limejuice" = 0)
|
||||
|
||||
// Orange
|
||||
/obj/item/seeds/orange
|
||||
@@ -56,6 +57,7 @@
|
||||
desc = "It's a tangy fruit."
|
||||
icon_state = "orange"
|
||||
filling_color = "#FFA500"
|
||||
juice_results = list("orangejuice" = 0)
|
||||
|
||||
// Lemon
|
||||
/obj/item/seeds/lemon
|
||||
@@ -81,6 +83,7 @@
|
||||
desc = "When life gives you lemons, make lemonade."
|
||||
icon_state = "lemon"
|
||||
filling_color = "#FFD700"
|
||||
juice_results = list("lemonjuice" = 0)
|
||||
|
||||
// Combustible lemon
|
||||
/obj/item/seeds/firelemon //combustible lemon is too long so firelemon
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
trash = /obj/item/grown/corncob
|
||||
bitesize_mod = 2
|
||||
foodtype = VEGETABLES
|
||||
juice_results = list("corn_starch" = 0)
|
||||
|
||||
/obj/item/grown/corncob
|
||||
name = "corn cob"
|
||||
|
||||
@@ -182,6 +182,7 @@
|
||||
throw_speed = 1
|
||||
throw_range = 3
|
||||
attack_verb = list("roasted", "scorched", "burned")
|
||||
grind_results = list("capsaicin" = 0, "condensedcapsaicin" = 0)
|
||||
|
||||
/obj/item/grown/novaflower/add_juice()
|
||||
..()
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
filling_color = "#008000"
|
||||
bitesize_mod = 3
|
||||
foodtype = FRUIT
|
||||
juice_results = list("watermelonjuice" = 0)
|
||||
|
||||
// Holymelon
|
||||
/obj/item/seeds/watermelon/holy
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
throw_speed = 1
|
||||
throw_range = 3
|
||||
attack_verb = list("stung")
|
||||
grind_results = list("sacid" = 0)
|
||||
|
||||
/obj/item/grown/nettle/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is eating some of [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
@@ -91,6 +92,7 @@
|
||||
icon_state = "deathnettle"
|
||||
force = 30
|
||||
throwforce = 15
|
||||
grind_results = list("facid" = 1, "sacid" = 1)
|
||||
|
||||
/obj/item/grown/nettle/death/add_juice()
|
||||
..()
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
genes = list(/datum/plant_gene/trait/battery)
|
||||
mutatelist = list(/obj/item/seeds/potato/sweet)
|
||||
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
|
||||
juice_results = list("potato" = 0)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/potato
|
||||
seed = /obj/item/seeds/potato
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
filling_color = "#FFA500"
|
||||
bitesize_mod = 2
|
||||
foodtype = VEGETABLES
|
||||
juice_results = list("pumpkinjuice" = 0)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/pumpkin/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(W.is_sharp())
|
||||
@@ -53,4 +54,5 @@
|
||||
icon_state = "blumpkin"
|
||||
filling_color = "#87CEFA"
|
||||
bitesize_mod = 2
|
||||
foodtype = VEGETABLES
|
||||
foodtype = VEGETABLES
|
||||
juice_results = list("blumpkinjuice" = 0)
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
filling_color = "#FFA500"
|
||||
bitesize_mod = 2
|
||||
foodtype = VEGETABLES
|
||||
juice_results = list("carrotjuice" = 0)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/carrot/attackby(obj/item/I, mob/user, params)
|
||||
if(I.is_sharp())
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
icon_dead = "tea-dead"
|
||||
genes = list(/datum/plant_gene/trait/repeated_harvest)
|
||||
mutatelist = list(/obj/item/seeds/tea/astra)
|
||||
reagents_add = list("vitamin" = 0.04, "teapowder" = 0.1)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/tea
|
||||
seed = /obj/item/seeds/tea
|
||||
@@ -22,6 +21,8 @@
|
||||
desc = "These aromatic tips of the tea plant can be dried to make tea."
|
||||
icon_state = "tea_aspera_leaves"
|
||||
filling_color = "#008000"
|
||||
grind_results = list("teapowder" = 0)
|
||||
dry_grind = TRUE
|
||||
|
||||
// Tea Astra
|
||||
/obj/item/seeds/tea/astra
|
||||
@@ -39,6 +40,7 @@
|
||||
name = "Tea Astra tips"
|
||||
icon_state = "tea_astra_leaves"
|
||||
filling_color = "#4582B4"
|
||||
grind_results = list("teapowder" = 0, "salglu_solution" = 0)
|
||||
|
||||
|
||||
// Coffee
|
||||
@@ -67,6 +69,8 @@
|
||||
icon_state = "coffee_arabica"
|
||||
filling_color = "#DC143C"
|
||||
bitesize_mod = 2
|
||||
dry_grind = TRUE
|
||||
grind_results = list("coffeepowder" = 0)
|
||||
|
||||
// Coffee Robusta
|
||||
/obj/item/seeds/coffee/robusta
|
||||
@@ -84,4 +88,5 @@
|
||||
seed = /obj/item/seeds/coffee/robusta
|
||||
name = "coffee robusta beans"
|
||||
desc = "Increases robustness by 37 percent!"
|
||||
icon_state = "coffee_robusta"
|
||||
icon_state = "coffee_robusta"
|
||||
grind_results = list("coffeepowder" = 0, "morphine" = 0)
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
filling_color = "#FF6347"
|
||||
bitesize_mod = 2
|
||||
foodtype = VEGETABLES
|
||||
grind_results = list("ketchup" = 0)
|
||||
juice_results = list("tomatojuice" = 0)
|
||||
|
||||
// Blood Tomato
|
||||
/obj/item/seeds/tomato/blood
|
||||
@@ -44,6 +46,7 @@
|
||||
splat_type = /obj/effect/gibspawner/generic
|
||||
filling_color = "#FF0000"
|
||||
foodtype = VEGETABLES | GROSS
|
||||
grind_results = list("ketchup" = 0, "blood" = 0)
|
||||
|
||||
|
||||
// Blue Tomato
|
||||
|
||||
@@ -62,3 +62,7 @@
|
||||
|
||||
/obj/item/grown/microwave_act(obj/machine/microwave/M)
|
||||
return
|
||||
|
||||
/obj/item/grown/on_grind()
|
||||
for(var/i in 1 to grind_results.len)
|
||||
grind_results[grind_results[i]] = round(seed.potency)
|
||||
|
||||
Reference in New Issue
Block a user