[MIRROR] Ice cream now gives a chilling food effect (plus small food haste buff) (#26914)

* Ice cream now gives a chilling food effect (plus small food haste buff) (#81719)

## About The Pull Request
We have a `crafted_food_buff` in the code meant for specific food buffs
(and perhaps one day, debuffs) that has gone unused ever since it was
created during the 'Foodening' PR.

Anyway, yeah, this PR takes the fire step to implement it with ice cream
and other frozen treats.

Frozen treats (all food found in the `food/frozen.dm` file) have it by
default. Other ice cream holders such as waffles cones (and now regular
waffles too!) can aquire it when filled with ice cream. Using the ice
cream vat also adds the 'Chef Made' trait now, which is required for
food effects to happen.

Also very slight food effect refactor. There's no need to have five
different alert screen objects when only have to switch icon states.

This PR also adds an action speed modifier to the generic 'haste' food
effect. I'm confident the original creator would have done that too, but
action speed modifiers aren't as well-known.

## Why It's Good For The Game
People tend to make one feature, call it a day and then move on to the
next. Food effects are nice, however they're barely implemented, and I
don't like food being all the same-ish in the end.

## Changelog

🆑
add: Ice cream and frozen treats now have a chilling effect.
add: You can add a scoop of ice cream on waffles.
balance: added an action speed modifier to the generic food haste effect
(you do things, and not just run, an itsy bitsy faster)
/🆑

* Ice cream now gives a chilling food effect (plus small food haste buff)

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
SkyratBot
2024-03-16 22:50:16 -04:00
committed by GitHub
co-authored by Ghom
parent f2b105fb3e
commit 2a355aeed2
13 changed files with 92 additions and 68 deletions
@@ -58,6 +58,7 @@
RegisterSignal(owner, COMSIG_ITEM_ATTACK_ATOM, PROC_REF(on_item_attack_obj))
RegisterSignal(owner, COMSIG_ATOM_UPDATE_OVERLAYS, PROC_REF(on_update_overlays))
RegisterSignal(owner, COMSIG_ATOM_EXAMINE, PROC_REF(on_examine))
if(change_name)
RegisterSignal(owner, COMSIG_ATOM_UPDATE_NAME, PROC_REF(on_update_name))
if(!change_desc)
@@ -105,20 +106,27 @@
else
source.desc = replacetext(replacetext("[flavour.desc_prefix] [flavour.desc]", "$CONE_NAME", initial(source.name)), "$CUSTOM_NAME", key)
else /// Many flavours.
source.desc = "A delicious [initial(source.name)] filled with scoops of [english_list(scoops)] icecream. That's as many as [scoops_len] scoops!"
source.desc = "A delicious [initial(source.name)] filled with scoops of [english_list(scoops)] ice cream. That's as many as [scoops_len] scoops!"
/datum/component/ice_cream_holder/proc/on_examine(atom/source, mob/mob, list/examine_list)
SIGNAL_HANDLER
if(length(scoops) < max_scoops)
examine_list += span_tinynoticeital("you could use a ice cream vat to fill it with yummy ice cream...")
/datum/component/ice_cream_holder/proc/on_examine_more(atom/source, mob/mob, list/examine_list)
SIGNAL_HANDLER
var/scoops_len = length(scoops)
if(!scoops_len)
return
if(scoops_len == 1 || length(unique_list(scoops)) == 1) /// Only one flavour.
var/key = scoops[1]
var/datum/ice_cream_flavour/flavour = GLOB.ice_cream_flavours[LAZYACCESS(special_scoops, key) || key]
if(flavour?.desc) //I scream.
examine_list += "[source.p_Theyre()] filled with scoops of [flavour ? flavour.name : "broken, unhappy"] icecream."
examine_list += "[source.p_Theyre()] filled with scoops of [flavour ? flavour.name : "broken, unhappy"] ice cream."
else
examine_list += replacetext(replacetext("[source.p_Theyre()] [flavour.desc]", "$CONE_NAME", initial(source.name)), "$CUSTOM_NAME", key)
else /// Many flavours.
examine_list += "[source.p_Theyre()] filled with scoops of [english_list(scoops)] icecream. That's as many as [scoops_len] scoops!"
examine_list += "[source.p_Theyre()] filled with scoops of [english_list(scoops)] ice cream. That's as many as [scoops_len] scoops!"
/datum/component/ice_cream_holder/proc/on_update_overlays(atom/source, list/new_overlays)
SIGNAL_HANDLER
@@ -330,14 +338,14 @@ GLOBAL_LIST_INIT_TYPED(ice_cream_flavours, /datum/ice_cream_flavour, init_ice_cr
/datum/ice_cream_flavour/custom
name = ICE_CREAM_CUSTOM
color = COLOR_STARLIGHT //has its own mutable appearance overlay it will be overwritten with anyways.
desc = "filled with artisanal icecream. Made with real $CUSTOM_NAME. Ain't that something."
desc = "filled with artisanal ice cream. Made with real $CUSTOM_NAME. Ain't that something."
ingredients = list(/datum/reagent/consumable/milk, /datum/reagent/consumable/ice)
ingredients_text = "optional flavorings"
takes_custom_ingredients = TRUE
/datum/ice_cream_flavour/custom/korta
name = ICE_CREAM_KORTA_CUSTOM
desc = "filled with artisanal lizard-friendly icecream. Made with real $CUSTOM_NAME. Ain't that something."
desc = "filled with artisanal lizard-friendly ice cream. Made with real $CUSTOM_NAME. Ain't that something."
ingredients = list(/datum/reagent/consumable/korta_milk, /datum/reagent/consumable/ice)
ingredients_text = "optional flavorings"
@@ -354,7 +362,7 @@ GLOBAL_LIST_INIT_TYPED(ice_cream_flavours, /datum/ice_cream_flavour, init_ice_cr
/datum/ice_cream_flavour/bland
name = ICE_CREAM_BLAND
color = COLOR_ICECREAM_CUSTOM
desc = "filled with anemic, flavorless icecream. You wonder why this was ever scooped..."
desc = "filled with anemic, flavorless ice cream. You wonder why this was ever scooped..."
hidden = TRUE
#undef SWEETENER_PER_SCOOP