From 5eab79f06da76ad311ddefaf74e40f00ed5045bc Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Wed, 17 Jan 2024 21:36:17 +1100 Subject: [PATCH] Adding extremely halfassed grill cooking to bonfires. --- code/game/objects/structures/bonfire.dm | 18 +++-- code/modules/economy/price_list.dm | 7 +- code/modules/food/food/snacks.dm | 73 ++++++++++++++++--- code/modules/food/food/snacks_sif.dm | 10 +-- code/modules/food/recipes_microwave.dm | 9 ++- code/modules/food/recipes_oven.dm | 2 +- code/modules/food/recipes_sif.dm | 2 + code/modules/hydroponics/grown.dm | 3 + code/modules/hydroponics/seed.dm | 5 ++ code/modules/hydroponics/seedtypes/apples.dm | 2 + code/modules/hydroponics/seedtypes/corn.dm | 4 +- code/modules/hydroponics/seedtypes/potato.dm | 4 +- .../reagents/reactions/instant/food.dm | 2 +- 13 files changed, 110 insertions(+), 31 deletions(-) diff --git a/code/game/objects/structures/bonfire.dm b/code/game/objects/structures/bonfire.dm index 4178457456..ba6018592c 100644 --- a/code/game/objects/structures/bonfire.dm +++ b/code/game/objects/structures/bonfire.dm @@ -46,7 +46,7 @@ to_chat(user, "You add a rod to \the [src].") var/mutable_appearance/rod_underlay = mutable_appearance('icons/obj/structures.dmi', "bonfire_rod") rod_underlay.pixel_y = 16 - rod_underlay.appearance_flags = RESET_COLOR|PIXEL_SCALE|TILE_BOUND + rod_underlay.appearance_flags = RESET_COLOR | PIXEL_SCALE | TILE_BOUND | KEEP_APART underlays += rod_underlay if("Grill") R.use(1) @@ -193,14 +193,14 @@ if(4.6 to 10) state = "bonfire_hot" var/image/I = image(icon, state) - I.appearance_flags = RESET_COLOR + I.appearance_flags = RESET_COLOR | KEEP_APART add_overlay(I) if(has_buckled_mobs() && get_fuel_amount() >= 5) I = image(icon, "bonfire_intense") I.pixel_y = 13 I.layer = MOB_LAYER + 0.1 - I.appearance_flags = RESET_COLOR + I.appearance_flags = RESET_COLOR | KEEP_APART add_overlay(I) var/light_strength = max(get_fuel_amount() / 2, 2) @@ -210,10 +210,9 @@ if(grill) var/image/grille_image = image(icon, "bonfire_grill") - grille_image.appearance_flags = RESET_COLOR + grille_image.appearance_flags = RESET_COLOR | KEEP_APART add_overlay(grille_image) - /obj/structure/bonfire/process() if(!check_oxygen()) extinguish() @@ -222,7 +221,10 @@ if(!consume_fuel(pop(contents))) extinguish() return - if(!grill) + if(grill) + for(var/obj/item/reagent_containers/food/snacks/snack in loc) + snack.grill() + else burn() if(burning) @@ -384,7 +386,7 @@ if(6.6 to 10) state = "fireplace_intense" //don't need to throw a corpse inside to make it burn hotter. var/image/I = image(icon, state) - I.appearance_flags = RESET_COLOR + I.appearance_flags = RESET_COLOR | KEEP_APART add_overlay(I) var/light_strength = max(get_fuel_amount() / 2, 2) @@ -423,4 +425,4 @@ /obj/structure/fireplace/water_act(amount) if(prob(amount * 10)) - extinguish() \ No newline at end of file + extinguish() diff --git a/code/modules/economy/price_list.dm b/code/modules/economy/price_list.dm index 46d1e9fb99..92c0975b5a 100644 --- a/code/modules/economy/price_list.dm +++ b/code/modules/economy/price_list.dm @@ -696,7 +696,10 @@ /obj/item/reagent_containers/food/snacks/cubancarp price_tag = 5 -/obj/item/reagent_containers/food/snacks/loadedbakedpotato +/obj/item/reagent_containers/food/snacks/bakedpotato + price_tag = 3 + +/obj/item/reagent_containers/food/snacks/bakedpotato/loaded price_tag = 5 /obj/item/reagent_containers/food/snacks/fries @@ -1026,4 +1029,4 @@ //******************************// /datum/reagent/ethanol/euphoria - price_tag = 30 \ No newline at end of file + price_tag = 30 diff --git a/code/modules/food/food/snacks.dm b/code/modules/food/food/snacks.dm index 8242754353..0a2c2f4bc8 100644 --- a/code/modules/food/food/snacks.dm +++ b/code/modules/food/food/snacks.dm @@ -45,6 +45,24 @@ . = ..() nutriment_desc = null +// Halfassed version of Crabs' cooking system on Cit, should be folded into that if it is ported to Polaris. +/obj/item/reagent_containers/food/snacks + var/backyard_grilling_progress = 0 + var/backyard_grilling_product = /obj/item/reagent_containers/food/snacks/badrecipe + var/backyard_grilling_threshold = 5 + var/backyard_grilling_announcement = "smokes and chars!" + +/obj/item/reagent_containers/food/snacks/proc/grill(var/atom/heat_source) + if(!backyard_grilling_product || !backyard_grilling_threshold) + return + backyard_grilling_progress++ + if(backyard_grilling_progress >= backyard_grilling_threshold) + var/obj/item/food = new backyard_grilling_product + food.dropInto(loc) + if(backyard_grilling_announcement) + food.visible_message("\The [src] [backyard_grilling_announcement]") + qdel(src) + //Placeholder for effect that trigger on eating that aren't tied to reagents. /obj/item/reagent_containers/food/snacks/proc/On_Consume(var/mob/M) if(!usr) @@ -943,10 +961,13 @@ center_of_mass = list("x"=16, "y"=10) bitesize = 6 +/obj/item/reagent_containers/food/snacks/xenomeat/proc/add_venom() + reagents.add_reagent("pacid",6) + /obj/item/reagent_containers/food/snacks/xenomeat/Initialize() . = ..() reagents.add_reagent("protein", 6, TASTE_DATA(list("faintly metallic meat" = 6))) - reagents.add_reagent("pacid",6) + add_venom() /obj/item/reagent_containers/food/snacks/xenomeat/spidermeat // Substitute for recipes requiring xeno meat. name = "spider meat" @@ -955,11 +976,20 @@ filling_color = "#43DE18" center_of_mass = list("x"=16, "y"=10) bitesize = 6 + backyard_grilling_product = /obj/item/reagent_containers/food/snacks/xenomeat/spidermeat/charred + backyard_grilling_announcement = "smokes as the poison burns away." -/obj/item/reagent_containers/food/snacks/xenomeat/spidermeat/Initialize() - . = ..() +/obj/item/reagent_containers/food/snacks/xenomeat/spidermeat/add_venom() + ..() reagents.add_reagent("spidertoxin",6) - reagents.remove_reagent("pacid",6) + +/obj/item/reagent_containers/food/snacks/xenomeat/spidermeat/charred + name = "charred spider meat" + desc = "A slab of green meat with char lines. The poison has been burned out of it." + color = COLOR_LIGHT_RED + +/obj/item/reagent_containers/food/snacks/xenomeat/spidermeat/charred/add_venom() + return /obj/item/reagent_containers/food/snacks/meatball name = "meatball" @@ -1464,16 +1494,23 @@ unpopped = max(0, unpopped-1) . = ..() -/obj/item/reagent_containers/food/snacks/loadedbakedpotato - name = "loaded baked potato" +/obj/item/reagent_containers/food/snacks/bakedpotato + name = "baked potato" desc = "Totally baked." - icon_state = "loadedbakedpotato" + icon_state = "bakedpotato" filling_color = "#9C7A68" center_of_mass = list("x"=16, "y"=10) + nutriment_amt = 6 + nutriment_desc = list("baked potato" = 3) + nutriment_allergens = ALLERGEN_VEGETABLE + bitesize = 2 + +/obj/item/reagent_containers/food/snacks/bakedpotato/loaded + name = "loaded baked potato" + icon_state = "loadedbakedpotato" nutriment_amt = 12 nutriment_desc = list("baked potato" = 3, "cheese" = 3) nutriment_allergens = ALLERGEN_VEGETABLE|ALLERGEN_DAIRY - bitesize = 2 /obj/item/reagent_containers/food/snacks/fries name = "skinny fries" @@ -1579,6 +1616,9 @@ center_of_mass = list("x"=16, "y"=12) bitesize = 2 +/obj/item/reagent_containers/food/snacks/badrecipe/grill(var/atom/heat_source) + return // We are already carbonized. + /obj/item/reagent_containers/food/snacks/badrecipe/Initialize() . = ..() reagents.add_reagent("toxin", 1) @@ -2107,6 +2147,8 @@ nutriment_desc = list("bread" = 3, "cheese" = 3) nutriment_allergens = ALLERGEN_DAIRY bitesize = 2 + backyard_grilling_product = /obj/item/reagent_containers/food/snacks/toastedsandwich + backyard_grilling_announcement = "is toasted golden brown." /obj/item/reagent_containers/food/snacks/clubsandwich name = "club sandwich" @@ -3592,6 +3634,8 @@ nutriment_amt = 4 nutriment_desc = list("uncooked dough" = 3) nutriment_allergens = ALLERGEN_GRAINS|ALLERGEN_EGGS //We're going to call the egg a gameplay abstraction for the mostpart, but for now you JUST put an egg in here...= + backyard_grilling_product = /obj/item/reagent_containers/food/snacks/bun + backyard_grilling_announcement = "is baked into a simple bun." // Dough + rolling pin = flat dough /obj/item/reagent_containers/food/snacks/dough/attackby(obj/item/W as obj, mob/user as mob) @@ -3612,7 +3656,8 @@ nutriment_desc = list("raw dough" = 3) center_of_mass = list("x"=16, "y"=16) nutriment_allergens = ALLERGEN_GRAINS|ALLERGEN_EGGS - + backyard_grilling_product = /obj/item/reagent_containers/food/snacks/flatbread + backyard_grilling_announcement = "is baked into a simple flatbread." /obj/item/reagent_containers/food/snacks/doughslice name = "dough slice" @@ -3736,6 +3781,8 @@ icon_state = "rawcutlet" bitesize = 1 center_of_mass = list("x"=17, "y"=20) + backyard_grilling_product = /obj/item/reagent_containers/food/snacks/cutlet + backyard_grilling_announcement = "sizzles as it is grilled through." /obj/item/reagent_containers/food/snacks/rawcutlet/Initialize() . = ..() @@ -3760,6 +3807,8 @@ icon_state = "rawmeatball" bitesize = 2 center_of_mass = list("x"=16, "y"=15) + backyard_grilling_product = /obj/item/reagent_containers/food/snacks/meatball + backyard_grilling_announcement = "sizzles as it is grilled through." /obj/item/reagent_containers/food/snacks/rawmeatball/Initialize() . = ..() @@ -3796,6 +3845,8 @@ nutriment_amt = 3 nutriment_desc = list("raw potato" = 3) nutriment_allergens = ALLERGEN_VEGETABLE + // This probably should need a container and oil + // backyard_grilling_product = /obj/item/reagent_containers/food/snacks/fries /obj/item/reagent_containers/food/snacks/rawsunflower name = "sunflower seeds" @@ -3807,6 +3858,8 @@ nutriment_amt = 1 nutriment_desc = list("starch" = 3) nutriment_allergens = ALLERGEN_SEEDS + // This probably should need a container and oil + // backyard_grilling_product = /obj/item/reagent_containers/food/snacks/roastedsunflower /obj/item/reagent_containers/food/snacks/frostbelle name = "frostbelle bud" @@ -4233,6 +4286,8 @@ nutriment_amt = 2 nutriment_desc = list("tartness" = 1) w_class = ITEMSIZE_TINY + backyard_grilling_product = /obj/item/reagent_containers/food/snacks/roast_sifpod + backyard_grilling_announcement = "crackles and pops as the roast hull splits open." /obj/item/reagent_containers/food/snacks/siffruit/Initialize() . = ..() diff --git a/code/modules/food/food/snacks_sif.dm b/code/modules/food/food/snacks_sif.dm index 7b1d9a9bc6..f5592ffb0c 100644 --- a/code/modules/food/food/snacks_sif.dm +++ b/code/modules/food/food/snacks_sif.dm @@ -46,7 +46,7 @@ icon = 'icons/obj/food_sivian.dmi' icon_state = "jambalaya" trash = /obj/item/trash/jambalaya_bowl - nutriment_amt = 5 + nutriment_amt = 2 nutriment_desc = list( "rich tomato and chili" = 3, "savoury rice" = 5, @@ -58,10 +58,10 @@ /obj/item/reagent_containers/food/snacks/sif_jambalaya/Initialize() . = ..() - reagents.add_reagent("protein", 3) - reagents.add_reagent("tomatojuice", 3) - reagents.add_reagent("water", 3) - reagents.add_reagent("rice", 3) + reagents.add_reagent("protein", 1) + reagents.add_reagent("tomatojuice", 1) + reagents.add_reagent("water", 1) + reagents.add_reagent("rice", 1) /obj/item/trash/jambalaya_bowl name = "small bowl" diff --git a/code/modules/food/recipes_microwave.dm b/code/modules/food/recipes_microwave.dm index 2779e048fa..25b588955f 100644 --- a/code/modules/food/recipes_microwave.dm +++ b/code/modules/food/recipes_microwave.dm @@ -119,11 +119,14 @@ I said no! ) result = /obj/item/reagent_containers/food/snacks/wingfangchu -/datum/recipe/loadedbakedpotato +/datum/recipe/bakedpotato fruit = list("potato" = 1) - items = list(/obj/item/reagent_containers/food/snacks/cheesewedge) reagent_mix = RECIPE_REAGENT_REPLACE //No raw tater - result = /obj/item/reagent_containers/food/snacks/loadedbakedpotato + result = /obj/item/reagent_containers/food/snacks/bakedpotato + +/datum/recipe/bakedpotato/loaded + items = list(/obj/item/reagent_containers/food/snacks/cheesewedge) + result = /obj/item/reagent_containers/food/snacks/bakedpotato/loaded /datum/recipe/microchips appliance = MICROWAVE diff --git a/code/modules/food/recipes_oven.dm b/code/modules/food/recipes_oven.dm index f42f82ee18..67de954da5 100644 --- a/code/modules/food/recipes_oven.dm +++ b/code/modules/food/recipes_oven.dm @@ -671,7 +671,7 @@ appliance = OVEN fruit = list("potato" = 1) items = list(/obj/item/reagent_containers/food/snacks/cheesewedge) - result = /obj/item/reagent_containers/food/snacks/loadedbakedpotato + result = /obj/item/reagent_containers/food/snacks/bakedpotato/loaded /datum/recipe/meatbun appliance = OVEN diff --git a/code/modules/food/recipes_sif.dm b/code/modules/food/recipes_sif.dm index 7cf38a84e8..4c746a3848 100644 --- a/code/modules/food/recipes_sif.dm +++ b/code/modules/food/recipes_sif.dm @@ -22,6 +22,7 @@ /datum/recipe/sif_jambalaya appliance = OVEN reagent_mix = RECIPE_REAGENT_REPLACE + result_quantity = 5 reagents = list( "water" = 5, "rice" = 10 @@ -53,6 +54,7 @@ /datum/recipe/sif_gumbo appliance = OVEN reagent_mix = RECIPE_REAGENT_REPLACE + result_quantity = 3 reagents = list( "water" = 5, "rice" = 5 diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index 2fc6b3dd7f..eee7b4eb21 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -38,6 +38,9 @@ name = "[seed.seed_name]" trash = seed.get_trash_type() + backyard_grilling_product = seed.backyard_grilling_product + backyard_grilling_threshold = seed.backyard_grilling_threshold + backyard_grilling_announcement = seed.backyard_grilling_announcement update_icon() diff --git a/code/modules/hydroponics/seed.dm b/code/modules/hydroponics/seed.dm index c6cee8cb20..d391bf5da3 100644 --- a/code/modules/hydroponics/seed.dm +++ b/code/modules/hydroponics/seed.dm @@ -27,6 +27,11 @@ var/has_item_product // Item products. (Eggy) var/force_layer + // Backyard grilling vars. Not passed through genetics. + var/backyard_grilling_threshold = 5 + var/backyard_grilling_product = /obj/item/reagent_containers/food/snacks/badrecipe + var/backyard_grilling_announcement = "smokes and chars!" + // Making the assumption anything in HYDRO-ponics is capable of processing water, and nutrients commonly associated with it, leaving us with the below to be tweaked. var/list/beneficial_reagents // Reagents considered uniquely 'beneficial' by a plant. var/list/mutagenic_reagents // Reagents considered uniquely 'mutagenic' by a plant. diff --git a/code/modules/hydroponics/seedtypes/apples.dm b/code/modules/hydroponics/seedtypes/apples.dm index 7db9986403..19dc439142 100644 --- a/code/modules/hydroponics/seedtypes/apples.dm +++ b/code/modules/hydroponics/seedtypes/apples.dm @@ -46,6 +46,8 @@ seed_name = "sivian pod" display_name = "sivian pod" kitchen_tag = "sifpod" + backyard_grilling_product = /obj/item/reagent_containers/food/snacks/roast_sifpod + backyard_grilling_announcement = "crackles and pops as the roast hull splits open." chems = list("nutriment" = list(1,5),"sifsap" = list(10,20)) /datum/seed/apple/sif/New() diff --git a/code/modules/hydroponics/seedtypes/corn.dm b/code/modules/hydroponics/seedtypes/corn.dm index 40071604fb..3c71e888ef 100644 --- a/code/modules/hydroponics/seedtypes/corn.dm +++ b/code/modules/hydroponics/seedtypes/corn.dm @@ -5,6 +5,8 @@ kitchen_tag = "corn" chems = list("nutriment" = list(1,10), "cornoil" = list(3,15)) trash_type = /obj/item/corncob + backyard_grilling_product = /obj/item/reagent_containers/food/snacks/popcorn + backyard_grilling_announcement = "pops enthusiastically!" /datum/seed/corn/New() ..() @@ -18,4 +20,4 @@ set_trait(TRAIT_PLANT_ICON,"corn") set_trait(TRAIT_IDEAL_HEAT, 298) set_trait(TRAIT_IDEAL_LIGHT, 6) - set_trait(TRAIT_WATER_CONSUMPTION, 6) \ No newline at end of file + set_trait(TRAIT_WATER_CONSUMPTION, 6) diff --git a/code/modules/hydroponics/seedtypes/potato.dm b/code/modules/hydroponics/seedtypes/potato.dm index 8aad55afc6..f0324ac4a6 100644 --- a/code/modules/hydroponics/seedtypes/potato.dm +++ b/code/modules/hydroponics/seedtypes/potato.dm @@ -4,6 +4,8 @@ display_name = "potatoes" kitchen_tag = "potato" chems = list("nutriment" = list(1,10), "potatojuice" = list(10,10)) + backyard_grilling_product = /obj/item/reagent_containers/food/snacks/bakedpotato + c = "steams as it is baked through." /datum/seed/potato/New() ..() @@ -15,4 +17,4 @@ set_trait(TRAIT_PRODUCT_ICON,"potato") set_trait(TRAIT_PRODUCT_COLOUR,"#D4CAB4") set_trait(TRAIT_PLANT_ICON,"bush2") - set_trait(TRAIT_WATER_CONSUMPTION, 6) \ No newline at end of file + set_trait(TRAIT_WATER_CONSUMPTION, 6) diff --git a/code/modules/reagents/reactions/instant/food.dm b/code/modules/reagents/reactions/instant/food.dm index d19ea24ade..f91e82aead 100644 --- a/code/modules/reagents/reactions/instant/food.dm +++ b/code/modules/reagents/reactions/instant/food.dm @@ -112,7 +112,7 @@ /decl/chemical_reaction/instant/food/meatball/on_reaction(var/datum/reagents/holder, var/created_volume) var/location = get_turf(holder.my_atom) for(var/i = 1, i <= created_volume, i++) - new /obj/item/reagent_containers/food/snacks/meatball(location) + new /obj/item/reagent_containers/food/snacks/rawmeatball(location) return /decl/chemical_reaction/instant/food/dough