mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-16 10:35:41 +01:00
0b0c5ea91e
## About The Pull Request Extends the part of the crafting unit test that ensures consistency between the total mats of the components of a recipe (or rather, the result of said recipe) and a generic instance of the same type as its result, previously only implemented on food recipes. ## Why It's Good For The Game This ensures a degree of consistency with the material composition of various objects in the game. I couldn't do it in the original PR as that one was too big already and it took months to get it merged, and have the relative bugs fixed. Currently a WIP as I slowly deal with the unit test reports. ## Changelog 🆑 refactor: Follow-up to the crafting/material refactor from months ago. All objects crafted with stacks now inherit their mat composition (not necessarily the effects and color) by default, while previously only a few things like chair, sinks and toilets did. Report any object looking or behaving weirdly as a result. fix: The material composition of ammo boxes is no longer a 1/10 of what it's supposed to be. It was a shitty hack to make it harder to recycle empty ammo boxes. Instead, they lose materials as they're emptied now. /🆑
161 lines
5.9 KiB
Plaintext
161 lines
5.9 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."
|
|
abstract_type = /obj/item/food/cheese
|
|
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/wedge/Initialize(mapload)
|
|
. = ..()
|
|
AddComponent(/datum/component/food_storage)
|
|
|
|
/obj/item/food/cheese/wheel
|
|
name = "cheese wheel"
|
|
desc = "A big wheel of delicious 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", sound_to_play = SFX_KNIFE_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
|
|
custom_materials = list(/datum/material/gold = SHEET_MATERIAL_AMOUNT * 5)
|
|
|
|
//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)
|
|
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"
|
|
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)
|
|
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", sound_to_play = SFX_KNIFE_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)
|
|
w_class = WEIGHT_CLASS_SMALL
|
|
rat_heal = 10
|
|
crafting_complexity = FOOD_COMPLEXITY_3
|
|
|
|
/obj/item/food/cheese/firm_cheese_slice/Initialize(mapload)
|
|
. = ..()
|
|
AddComponent(/datum/component/food_storage)
|
|
|
|
/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)
|
|
w_class = WEIGHT_CLASS_SMALL
|
|
rat_heal = 10
|
|
crafting_complexity = FOOD_COMPLEXITY_2
|