mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-30 11:01:35 +00:00
## About The Pull Request Currently, burning food is handled in the following way (for the sake of brevity I'll explain it with baking but it's essentially the exact same with grilling): - If a recipe has a baking recipe added in it's `make_bakeable`, then it will produce that when baked. - If it does not have a recipe added, but `burns_in_oven` is TRUE, then it will have a negative baking recipe for "burned mess" added by the parent of `make_bakeable`, and be turned to that after 20 to 25 seconds. - If it has neither, it will instantly be set on fire. What this PR does is, basically, remove the check for `burns_in_oven/burns_on_grill` and make food always have a negative burned mess recipe unless overriden by an actual recipe. Also modified the examines a bit to better fit food that hasn't necessarily been baked/grilled before but would still turn to a burnt mess if put in either. ## Why It's Good For The Game My issues with the way it currently works are: 1. The "default" case is one that largely doesn't make sense for food. Most things would logically just get turned to a burnt mess after being overcooked for some time rather than combusting the very moment you close the range. 2. If you make any cooking item the result of a baking recipe, then you must also remember to make its `burns_in_oven` var true, because otherwise it will be set on fire as soon as it finishes baking, making it impossible to cook. (See issue #77377) This is pretty bad because it's easy not to notice or add these vars, given that they're a bit out of the way mechanically and... 3. ...the var names are very unintuitive. In practical terms all `burns_in_oven` and `burns_in_grill` do is add a timer before the item is ruined, not actually cause or prevent the ruining. By removing these vars and their function we deal with all three, as turning into a burnt mess is now the default outcome for food that shouldn't be baked/grilled and coders adding food/recipes don't need to worry about the confusingly-named vars. Also, as mentioned before, fixes #77377. ## Changelog 🆑 fix: boiled rice doesn't burn instantly after being baked code: simplifies the way burning food is handled, grilled/baked food now turns to a burnt mess rather than being set on fire, unless they have a baking/grilling recipe /🆑
156 lines
5.6 KiB
Plaintext
156 lines
5.6 KiB
Plaintext
/**
|
|
* # Abstract cheese class
|
|
*
|
|
* Everything that is a subclass of this counts as cheese for regal rats.
|
|
*/
|
|
/obj/item/food/cheese
|
|
name = "the concept of cheese"
|
|
desc = "This probably shouldn't exist."
|
|
tastes = list("cheese" = 1)
|
|
food_reagents = list(/datum/reagent/consumable/nutriment/fat = 3)
|
|
foodtypes = DAIRY
|
|
crafting_complexity = FOOD_COMPLEXITY_1
|
|
/// used to determine how much health rats/regal rats recover when they eat it.
|
|
var/rat_heal = 0
|
|
|
|
/obj/item/food/cheese/Initialize(mapload)
|
|
. = ..()
|
|
RegisterSignal(src, COMSIG_RAT_INTERACT, PROC_REF(on_rat_eat))
|
|
|
|
/obj/item/food/cheese/proc/on_rat_eat(datum/source, mob/living/basic/regal_rat/king)
|
|
SIGNAL_HANDLER
|
|
|
|
king.cheese_heal(src, rat_heal, span_green("You eat [src], restoring some health."))
|
|
return COMPONENT_RAT_INTERACTED
|
|
|
|
/obj/item/food/cheese/wedge
|
|
name = "cheese wedge"
|
|
desc = "A wedge of delicious Cheddar. The cheese wheel it was cut from can't have gone far."
|
|
icon_state = "cheesewedge"
|
|
food_reagents = list(
|
|
/datum/reagent/consumable/nutriment/fat = 2,
|
|
/datum/reagent/consumable/nutriment/protein = 1,
|
|
/datum/reagent/consumable/nutriment/vitamin = 1,
|
|
)
|
|
w_class = WEIGHT_CLASS_SMALL
|
|
rat_heal = 10
|
|
crafting_complexity = FOOD_COMPLEXITY_1
|
|
|
|
/obj/item/food/cheese/wheel
|
|
name = "cheese wheel"
|
|
desc = "A big wheel of delcious Cheddar."
|
|
icon_state = "cheesewheel"
|
|
food_reagents = list(
|
|
/datum/reagent/consumable/nutriment/fat = 10,
|
|
/datum/reagent/consumable/nutriment/protein = 5,
|
|
/datum/reagent/consumable/nutriment/vitamin = 5,
|
|
) //Hard cheeses contain about 25% protein
|
|
w_class = WEIGHT_CLASS_NORMAL
|
|
rat_heal = 35
|
|
crafting_complexity = FOOD_COMPLEXITY_1
|
|
|
|
/obj/item/food/cheese/wheel/Initialize(mapload)
|
|
. = ..()
|
|
AddComponent(/datum/component/food_storage)
|
|
|
|
/obj/item/food/cheese/wheel/make_processable()
|
|
AddElement(/datum/element/processable, TOOL_KNIFE, /obj/item/food/cheese/wedge, 5, 3 SECONDS, table_required = TRUE, screentip_verb = "Slice")
|
|
|
|
/obj/item/food/cheese/wheel/make_bakeable()
|
|
AddComponent(/datum/component/bakeable, /obj/item/food/baked_cheese, rand(20 SECONDS, 25 SECONDS), TRUE, TRUE)
|
|
|
|
/**
|
|
* Whiffs away cheese that was touched by the chaos entity byond the realm. In layman's terms, deletes the cheese and throws sparks.
|
|
* Used in wizard grand rituals' optional cheesy alternative.
|
|
*/
|
|
/obj/item/food/cheese/wheel/proc/consume_cheese()
|
|
visible_message(span_revenwarning("...and is consumed in a vortex of chaos!"))
|
|
do_sparks(number = 1, cardinal_only = TRUE, source = get_turf(src))
|
|
qdel(src)
|
|
|
|
/obj/item/food/cheese/royal
|
|
name = "royal cheese"
|
|
desc = "Ascend the throne. Consume the wheel. Feel the POWER."
|
|
icon_state = "royalcheese"
|
|
food_reagents = list(
|
|
/datum/reagent/consumable/nutriment/fat = 15,
|
|
/datum/reagent/consumable/nutriment/vitamin = 5,
|
|
/datum/reagent/gold = 20,
|
|
/datum/reagent/toxin/mutagen = 5,
|
|
)
|
|
w_class = WEIGHT_CLASS_BULKY
|
|
tastes = list("cheese" = 4, "royalty" = 1)
|
|
rat_heal = 70
|
|
crafting_complexity = FOOD_COMPLEXITY_3
|
|
|
|
//Curd cheese, a general term which I will now proceed to stretch as thin as the toppings on a supermarket sandwich:
|
|
//I'll use it as a substitute for ricotta, cottage cheese and quark, as well as any other non-aged, soft grainy cheese
|
|
/obj/item/food/cheese/curd_cheese
|
|
name = "curd cheese"
|
|
desc = "Known by many names throughout human cuisine, curd cheese is useful for a wide variety of dishes."
|
|
icon_state = "curd_cheese"
|
|
food_reagents = list(
|
|
/datum/reagent/consumable/nutriment/protein = 3,
|
|
/datum/reagent/consumable/cream = 1,
|
|
)
|
|
tastes = list("cream" = 1, "cheese" = 1)
|
|
foodtypes = DAIRY
|
|
w_class = WEIGHT_CLASS_SMALL
|
|
rat_heal = 35
|
|
crafting_complexity = FOOD_COMPLEXITY_2
|
|
|
|
/obj/item/food/cheese/curd_cheese/make_bakeable()
|
|
AddComponent(/datum/component/bakeable, /obj/item/food/cheese/cheese_curds, rand(15 SECONDS, 20 SECONDS), TRUE, TRUE)
|
|
|
|
/obj/item/food/cheese/curd_cheese/make_microwaveable()
|
|
AddElement(/datum/element/microwavable, /obj/item/food/cheese/cheese_curds)
|
|
|
|
/obj/item/food/cheese/cheese_curds
|
|
name = "cheese curds"
|
|
desc = "Not to be mistaken for curd cheese. Tasty deep fried."
|
|
icon_state = "cheese_curds"
|
|
foodtypes = DAIRY
|
|
w_class = WEIGHT_CLASS_SMALL
|
|
rat_heal = 35
|
|
crafting_complexity = FOOD_COMPLEXITY_2
|
|
|
|
/obj/item/food/cheese/cheese_curds/Initialize(mapload)
|
|
. = ..()
|
|
AddElement(/datum/element/dryable, /obj/item/food/cheese/firm_cheese)
|
|
|
|
/obj/item/food/cheese/firm_cheese
|
|
name = "firm cheese"
|
|
desc = "Firm aged cheese, similar in texture to firm tofu. Due to its lack of moisture it's particularly useful for cooking with, as it doesn't melt easily."
|
|
icon_state = "firm_cheese"
|
|
tastes = list("aged cheese" = 1)
|
|
foodtypes = DAIRY | VEGETABLES
|
|
w_class = WEIGHT_CLASS_SMALL
|
|
rat_heal = 35
|
|
crafting_complexity = FOOD_COMPLEXITY_3
|
|
|
|
/obj/item/food/cheese/firm_cheese/make_processable()
|
|
AddElement(/datum/element/processable, TOOL_KNIFE, /obj/item/food/cheese/firm_cheese_slice, 3, 3 SECONDS, screentip_verb = "Slice")
|
|
|
|
/obj/item/food/cheese/firm_cheese_slice
|
|
name = "firm cheese slice"
|
|
desc = "A slice of firm cheese. Perfect for grilling or making into delicious pesto."
|
|
icon_state = "firm_cheese_slice"
|
|
tastes = list("aged cheese" = 1)
|
|
foodtypes = DAIRY | VEGETABLES
|
|
w_class = WEIGHT_CLASS_SMALL
|
|
rat_heal = 10
|
|
crafting_complexity = FOOD_COMPLEXITY_3
|
|
|
|
/obj/item/food/cheese/firm_cheese_slice/make_grillable()
|
|
AddComponent(/datum/component/grillable, /obj/item/food/grilled_cheese, rand(25 SECONDS, 35 SECONDS), TRUE, TRUE)
|
|
|
|
/obj/item/food/cheese/mozzarella
|
|
name = "mozzarella cheese"
|
|
desc = "Delicious, creamy, and cheesy, all in one simple package."
|
|
icon_state = "mozzarella"
|
|
tastes = list("mozzarella" = 1)
|
|
foodtypes = DAIRY
|
|
w_class = WEIGHT_CLASS_SMALL
|
|
rat_heal = 10
|
|
crafting_complexity = FOOD_COMPLEXITY_2
|