mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 06:00:16 +01:00
[MIRROR] More food effects (#29311)
* More food effects (#84889) ## About The Pull Request In #77887 I have introduced a food buff system with placeholder buffs to not bloat that PR with balance-related things to allow people to add their own effects and discuss the particular effects in separate PRs. The goal is to have: - Some default buffs for all food. Currently there's only Haste that scales with food complexity. - Some interesting buffs tied to food categories or specific dishes This PR is a first part of this change. - Adding an indicator to Cooking UI that food does something special - Added **Spaghetti Carbonara** dish that gives Italian speech.  - Added **Jupiter Cup Cake** that gives shock immunity instead of it being randomly given by high-complexity dishes.  - Made **Omelette Du Fromage** give French speech. - Made **Mime Tart** give Mute trait - Made **Clown Cake** give Waddle Walk trait - Made **Stuffed Legion** give Ashstorm Immune trait ## Why It's Good For The Game Foodening PR was incomplete, this PR is a step towards the completion. ## TODO - [X] Pick a certain dish to give the French speech - [X] Pick a certain pasta to give the Italian speech - [X] Pick a certain dish for the shock immunity buff - [x] Add an indicator to the cooking UI that a dish has a special effect - [x] Add more food effects per suggestions ## Changelog 🆑 qol: Dishes with a special food effect are marked in the Cooking UI add: New Spaghetti Carbonara dish that makes people Italian temporarily add: Omelette Du Fromage makes people French temporarily add: Shock Immunity is no longer a random level 4-5 food buff, but a buff given by a new Jupiter-Cup-Cake add: Mime Tart gives Mute trait add: Clown Cake gives Waddle Walk trait add: Stuffed Legion gives Ashstorm Immune trait /🆑 * More food effects --------- Co-authored-by: Andrew <mt.forspam@gmail.com>
This commit is contained in:
@@ -144,7 +144,7 @@ GLOBAL_LIST_INIT(food_quality_events, list(
|
||||
FOOD_QUALITY_TOP = /datum/mood_event/food/top,
|
||||
))
|
||||
|
||||
/// Crafted food buffs grouped by crafting_complexity
|
||||
/// Weighted lists of crafted food buffs randomly given according to crafting_complexity unless the food has a specific buff
|
||||
GLOBAL_LIST_INIT(food_buffs, list(
|
||||
FOOD_COMPLEXITY_1 = list(
|
||||
/datum/status_effect/food/haste = 1,
|
||||
@@ -157,11 +157,9 @@ GLOBAL_LIST_INIT(food_buffs, list(
|
||||
),
|
||||
FOOD_COMPLEXITY_4 = list(
|
||||
/datum/status_effect/food/haste = 1,
|
||||
/datum/status_effect/food/trait/shockimmune = 1,
|
||||
),
|
||||
FOOD_COMPLEXITY_5 = list(
|
||||
/datum/status_effect/food/haste = 1,
|
||||
/datum/status_effect/food/trait/shockimmune = 2,
|
||||
),
|
||||
))
|
||||
|
||||
|
||||
@@ -620,6 +620,9 @@
|
||||
data["name"] = "[data["name"]] [recipe.result_amount]x"
|
||||
data["desc"] = recipe.desc || initial(atom.desc)
|
||||
|
||||
if(ispath(recipe.result, /obj/item/food))
|
||||
var/obj/item/food/food = recipe.result
|
||||
data["has_food_effect"] = !!food.crafted_food_buff
|
||||
|
||||
// Crafting
|
||||
if(recipe.non_craftable)
|
||||
|
||||
@@ -34,6 +34,12 @@
|
||||
|
||||
var/atom/owner = parent
|
||||
|
||||
if (istype(parent, /datum/status_effect))
|
||||
var/datum/status_effect/effect = parent
|
||||
targeted = effect.owner
|
||||
RegisterSignal(targeted, COMSIG_MOB_SAY, PROC_REF(handle_speech))
|
||||
return
|
||||
|
||||
if (ismob(parent))
|
||||
targeted = parent
|
||||
RegisterSignal(targeted, COMSIG_MOB_SAY, PROC_REF(handle_speech))
|
||||
|
||||
+3
-20
@@ -1,19 +1,18 @@
|
||||
/// Buffs given by eating hand-crafted food. The duration scales with consumable reagents purity.
|
||||
/datum/status_effect/food
|
||||
id = "food_buff"
|
||||
id = "food_effect"
|
||||
duration = 5 MINUTES // Same as food mood buffs
|
||||
status_type = STATUS_EFFECT_REPLACE // Only one food buff allowed
|
||||
alert_type = /atom/movable/screen/alert/status_effect/food
|
||||
show_duration = TRUE
|
||||
/// Buff power
|
||||
/// Buff power equal to food complexity (1 to 5)
|
||||
var/strength
|
||||
|
||||
/datum/status_effect/food/on_creation(mob/living/new_owner, timeout_mod = 1, strength = 1)
|
||||
. = ..()
|
||||
src.strength = strength
|
||||
//Generate alert when not specified
|
||||
if(isnum(timeout_mod))
|
||||
duration *= timeout_mod
|
||||
. = ..()
|
||||
if(istype(linked_alert, /atom/movable/screen/alert/status_effect/food))
|
||||
linked_alert.icon_state = "[linked_alert.base_icon_state]_[strength]"
|
||||
|
||||
@@ -22,19 +21,3 @@
|
||||
desc = "Eating it made me feel better."
|
||||
icon_state = "food_buff_1"
|
||||
base_icon_state = "food_buff"
|
||||
|
||||
/// Makes you gain a trait
|
||||
/datum/status_effect/food/trait
|
||||
var/trait = TRAIT_DUMB // You need to override this
|
||||
|
||||
/datum/status_effect/food/trait/on_apply()
|
||||
ADD_TRAIT(owner, trait, type)
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/food/trait/be_replaced()
|
||||
REMOVE_TRAIT(owner, trait, type)
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/food/trait/on_remove()
|
||||
REMOVE_TRAIT(owner, trait, type)
|
||||
return ..()
|
||||
@@ -1,7 +0,0 @@
|
||||
/datum/status_effect/food/trait/shockimmune
|
||||
alert_type = /atom/movable/screen/alert/status_effect/food/trait_shockimmune
|
||||
trait = TRAIT_SHOCKIMMUNE
|
||||
|
||||
/atom/movable/screen/alert/status_effect/food/trait_shockimmune
|
||||
name = "Grounded"
|
||||
desc = "That meal made me feel like a superconductor..."
|
||||
@@ -0,0 +1,56 @@
|
||||
/// Makes you gain a trait
|
||||
/datum/status_effect/food/trait
|
||||
var/trait = TRAIT_DUMB // You need to override this
|
||||
|
||||
/datum/status_effect/food/trait/on_apply()
|
||||
if(!HAS_TRAIT_FROM(owner, trait, type)) // Check if trait was already applied
|
||||
ADD_TRAIT(owner, trait, type)
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/food/trait/be_replaced()
|
||||
REMOVE_TRAIT(owner, trait, type)
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/food/trait/on_remove()
|
||||
REMOVE_TRAIT(owner, trait, type)
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/food/trait/shockimmune
|
||||
alert_type = /atom/movable/screen/alert/status_effect/shockimmune
|
||||
trait = TRAIT_SHOCKIMMUNE
|
||||
|
||||
/atom/movable/screen/alert/status_effect/shockimmune
|
||||
name = "Grounded"
|
||||
desc = "That meal made me feel like a superconductor..."
|
||||
icon_state = "shock_immune"
|
||||
|
||||
/datum/status_effect/food/trait/mute
|
||||
alert_type = /atom/movable/screen/alert/status_effect/mute
|
||||
trait = TRAIT_MUTE
|
||||
|
||||
/atom/movable/screen/alert/status_effect/mute
|
||||
name = "..."
|
||||
desc = "..."
|
||||
icon_state = "mute"
|
||||
|
||||
/datum/status_effect/food/trait/ashstorm_immune
|
||||
alert_type = /atom/movable/screen/alert/status_effect/ashstorm_immune
|
||||
trait = TRAIT_ASHSTORM_IMMUNE
|
||||
|
||||
/atom/movable/screen/alert/status_effect/ashstorm_immune
|
||||
name = "Ashstorm-proof"
|
||||
desc = "That meal makes me feel born on Lavaland."
|
||||
icon_state = "ashstorm_immune"
|
||||
|
||||
/datum/status_effect/food/trait/waddle
|
||||
alert_type = /atom/movable/screen/alert/status_effect/waddle
|
||||
trait = TRAIT_WADDLING
|
||||
|
||||
/datum/status_effect/food/trait/waddle/on_apply()
|
||||
owner.AddElementTrait(trait, type, /datum/element/waddling)
|
||||
return ..()
|
||||
|
||||
/atom/movable/screen/alert/status_effect/waddle
|
||||
name = "Waddling"
|
||||
desc = "That meal makes me want to joke around."
|
||||
icon_state = "waddle"
|
||||
@@ -0,0 +1,45 @@
|
||||
///Temporary modifies the speech using the /datum/component/speechmod
|
||||
/datum/status_effect/food/speech
|
||||
|
||||
/datum/status_effect/food/speech/italian
|
||||
alert_type = /atom/movable/screen/alert/status_effect/italian_speech
|
||||
|
||||
/datum/status_effect/food/speech/italian/on_apply()
|
||||
AddComponent( \
|
||||
/datum/component/speechmod, \
|
||||
replacements = strings("italian_replacement.json", "italian"), \
|
||||
end_string = list(
|
||||
" Ravioli, ravioli, give me the formuoli!",
|
||||
" Mamma-mia!",
|
||||
" Mamma-mia! That's a spicy meat-ball!",
|
||||
" La la la la la funiculi funicula!"
|
||||
), \
|
||||
end_string_chance = 3 \
|
||||
)
|
||||
return ..()
|
||||
|
||||
/atom/movable/screen/alert/status_effect/italian_speech
|
||||
name = "Linguini Embrace"
|
||||
desc = "You feel a sudden urge to gesticulate wildly."
|
||||
icon_state = "food_italian"
|
||||
|
||||
/datum/status_effect/food/speech/french
|
||||
alert_type = /atom/movable/screen/alert/status_effect/french_speech
|
||||
|
||||
/datum/status_effect/food/speech/french/on_apply()
|
||||
AddComponent( \
|
||||
/datum/component/speechmod, \
|
||||
replacements = strings("french_replacement.json", "french"), \
|
||||
end_string = list(
|
||||
" Honh honh honh!",
|
||||
" Honh!",
|
||||
" Zut Alors!"
|
||||
), \
|
||||
end_string_chance = 3, \
|
||||
)
|
||||
return ..()
|
||||
|
||||
/atom/movable/screen/alert/status_effect/french_speech
|
||||
name = "Café Chic"
|
||||
desc = "Suddenly, everything seems worthy of a passionate debate."
|
||||
icon_state = "food_french"
|
||||
@@ -521,6 +521,7 @@
|
||||
foodtypes = GRAIN | SUGAR | DAIRY
|
||||
slice_type = /obj/item/food/cakeslice/clown_slice
|
||||
crafting_complexity = FOOD_COMPLEXITY_5
|
||||
crafted_food_buff = /datum/status_effect/food/trait/waddle
|
||||
|
||||
/obj/item/food/cakeslice/clown_slice
|
||||
name = "clown cake slice"
|
||||
@@ -534,6 +535,7 @@
|
||||
tastes = list("cake" = 1, "sugar" = 1, "joy" = 10)
|
||||
foodtypes = GRAIN | SUGAR | DAIRY
|
||||
crafting_complexity = FOOD_COMPLEXITY_5
|
||||
crafted_food_buff = /datum/status_effect/food/trait/waddle
|
||||
|
||||
/obj/item/food/cake/trumpet
|
||||
name = "spaceman's cake"
|
||||
|
||||
@@ -277,6 +277,7 @@ GLOBAL_VAR_INIT(chicks_from_eggs, 0)
|
||||
foodtypes = MEAT | BREAKFAST | DAIRY
|
||||
venue_value = FOOD_PRICE_CHEAP
|
||||
crafting_complexity = FOOD_COMPLEXITY_2
|
||||
crafted_food_buff = /datum/status_effect/food/speech/french
|
||||
|
||||
/obj/item/food/omelette/attackby(obj/item/item, mob/user, params)
|
||||
if(istype(item, /obj/item/kitchen/fork))
|
||||
|
||||
@@ -196,6 +196,7 @@
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
venue_value = FOOD_PRICE_LEGENDARY
|
||||
crafting_complexity = FOOD_COMPLEXITY_5
|
||||
crafted_food_buff = /datum/status_effect/food/trait/ashstorm_immune
|
||||
|
||||
/obj/item/food/chipsandsalsa
|
||||
name = "chips and salsa"
|
||||
|
||||
@@ -327,6 +327,20 @@
|
||||
tastes = list("cake" = 3, "blue cherry" = 1)
|
||||
crafting_complexity = FOOD_COMPLEXITY_3
|
||||
|
||||
/obj/item/food/jupitercupcake
|
||||
name = "jupiter-cup-cake"
|
||||
desc = "A static dessert."
|
||||
icon_state = "jupitercupcake"
|
||||
food_reagents = list(
|
||||
/datum/reagent/consumable/nutriment = 6,
|
||||
/datum/reagent/consumable/nutriment/vitamin = 2,
|
||||
/datum/reagent/consumable/caramel = 3,
|
||||
/datum/reagent/consumable/liquidelectricity/enriched = 3,
|
||||
)
|
||||
tastes = list("cake" = 3, "caramel" = 2, "zap" = 1)
|
||||
crafting_complexity = FOOD_COMPLEXITY_3
|
||||
crafted_food_buff = /datum/status_effect/food/trait/shockimmune
|
||||
|
||||
/obj/item/food/honeybun
|
||||
name = "honey bun"
|
||||
desc = "A sticky pastry bun glazed with honey."
|
||||
|
||||
@@ -316,6 +316,7 @@
|
||||
)
|
||||
tastes = list("nothing" = 3)
|
||||
foodtypes = GRAIN
|
||||
crafted_food_buff = /datum/status_effect/food/trait/mute
|
||||
|
||||
/obj/item/food/pie/berrytart
|
||||
name = "berry tart"
|
||||
|
||||
@@ -249,3 +249,17 @@
|
||||
tastes = list("noodles" = 5, "fried tofu" = 4, "lime" = 2, "peanut" = 3, "onion" = 2)
|
||||
foodtypes = GRAIN | VEGETABLES | NUTS | FRUIT
|
||||
crafting_complexity = FOOD_COMPLEXITY_4
|
||||
|
||||
/obj/item/food/spaghetti/carbonara
|
||||
name = "spaghetti carbonara"
|
||||
desc = "Silky eggs, crispy pork, cheesy bliss. Mamma mia!"
|
||||
icon_state = "carbonara"
|
||||
food_reagents = list(
|
||||
/datum/reagent/consumable/nutriment = 10,
|
||||
/datum/reagent/consumable/nutriment/protein = 6,
|
||||
/datum/reagent/consumable/nutriment/vitamin = 4,
|
||||
)
|
||||
tastes = list("spaghetti" = 1, "parmigiano reggiano" = 1, "guanciale" = 1)
|
||||
foodtypes = GRAIN | MEAT | DAIRY
|
||||
crafting_complexity = FOOD_COMPLEXITY_4
|
||||
crafted_food_buff = /datum/status_effect/food/speech/italian
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
category = CAT_EGG
|
||||
|
||||
/datum/crafting_recipe/food/omelette
|
||||
name = "Omelette"
|
||||
name = "Omelette du fromage"
|
||||
reqs = list(
|
||||
/obj/item/food/egg = 2,
|
||||
/obj/item/food/cheese/wedge = 2
|
||||
|
||||
@@ -604,6 +604,16 @@
|
||||
result = /obj/item/food/cherrycupcake/blue
|
||||
category = CAT_PASTRY
|
||||
|
||||
/datum/crafting_recipe/food/jupitercupcake
|
||||
name = "Jupiter-cup-cake"
|
||||
reqs = list(
|
||||
/obj/item/food/pastrybase = 1,
|
||||
/obj/item/food/grown/mushroom/jupitercup = 1,
|
||||
/datum/reagent/consumable/caramel = 3,
|
||||
)
|
||||
result = /obj/item/food/jupitercupcake
|
||||
category = CAT_PASTRY
|
||||
|
||||
/datum/crafting_recipe/food/honeybun
|
||||
name = "Honey bun"
|
||||
reqs = list(
|
||||
|
||||
@@ -157,3 +157,15 @@
|
||||
)
|
||||
result = /obj/item/food/spaghetti/pad_thai
|
||||
category = CAT_SPAGHETTI
|
||||
|
||||
/datum/crafting_recipe/food/carbonara
|
||||
name = "Spaghetti Carbonara"
|
||||
reqs = list(
|
||||
/obj/item/food/spaghetti/boiledspaghetti = 1,
|
||||
/obj/item/food/cheese/firm_cheese_slice = 1,
|
||||
/obj/item/food/meat/bacon = 1,
|
||||
/obj/item/food/egg = 1,
|
||||
/datum/reagent/consumable/blackpepper = 2,
|
||||
)
|
||||
result = /obj/item/food/spaghetti/carbonara
|
||||
category = CAT_SPAGHETTI
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 143 KiB After Width: | Height: | Size: 145 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 71 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
+3
-2
@@ -1933,7 +1933,6 @@
|
||||
#include "code\datums\status_effects\agent_pinpointer.dm"
|
||||
#include "code\datums\status_effects\buffs.dm"
|
||||
#include "code\datums\status_effects\drug_effects.dm"
|
||||
#include "code\datums\status_effects\food_effects.dm"
|
||||
#include "code\datums\status_effects\gas.dm"
|
||||
#include "code\datums\status_effects\grouped_effect.dm"
|
||||
#include "code\datums\status_effects\limited_effect.dm"
|
||||
@@ -1948,9 +1947,11 @@
|
||||
#include "code\datums\status_effects\buffs\bioware\cortex.dm"
|
||||
#include "code\datums\status_effects\buffs\bioware\ligaments.dm"
|
||||
#include "code\datums\status_effects\buffs\bioware\nerves.dm"
|
||||
#include "code\datums\status_effects\buffs\food\_food_effect.dm"
|
||||
#include "code\datums\status_effects\buffs\food\chilling.dm"
|
||||
#include "code\datums\status_effects\buffs\food\food_traits.dm"
|
||||
#include "code\datums\status_effects\buffs\food\grant_trait.dm"
|
||||
#include "code\datums\status_effects\buffs\food\haste.dm"
|
||||
#include "code\datums\status_effects\buffs\food\speech.dm"
|
||||
#include "code\datums\status_effects\debuffs\blindness.dm"
|
||||
#include "code\datums\status_effects\debuffs\choke.dm"
|
||||
#include "code\datums\status_effects\debuffs\confusion.dm"
|
||||
|
||||
@@ -140,6 +140,7 @@ type Recipe = {
|
||||
structures: string[];
|
||||
steps: string[];
|
||||
foodtypes: string[];
|
||||
has_food_effect: BooleanLike;
|
||||
};
|
||||
|
||||
type Diet = {
|
||||
@@ -787,10 +788,16 @@ const RecipeContent = ({ item, craftable, busy, mode, diet }) => {
|
||||
<Stack.Item grow>
|
||||
<Stack>
|
||||
<Stack.Item grow={5}>
|
||||
<Box mb={0.5} bold style={{ textTransform: 'capitalize' }}>
|
||||
<Box mb={1} bold style={{ textTransform: 'capitalize' }}>
|
||||
{item.name}
|
||||
</Box>
|
||||
{item.desc && <Box color={'gray'}>{item.desc}</Box>}
|
||||
{!!item.has_food_effect && (
|
||||
<Box my={2} color={'pink'}>
|
||||
<Icon name="wand-magic-sparkles" mr={1} />
|
||||
Special effect on consumption.
|
||||
</Box>
|
||||
)}
|
||||
<Box style={{ textTransform: 'capitalize' }}>
|
||||
{item.reqs && (
|
||||
<Box>
|
||||
|
||||
Reference in New Issue
Block a user