More bugfixes (#18830)

Get_sfx() now also returns /sound types back, preventing some runtimes
without having to rewrite 300 lines.
Food containers like frosted donuts and meat nuggets now maintain the
proper icon.

Fixes #18324
This commit is contained in:
Fluffy
2024-04-04 10:34:53 +00:00
committed by GitHub
parent 65d7b07094
commit 33e1d658f0
4 changed files with 54 additions and 12 deletions
@@ -16,17 +16,6 @@
var/is_liquid = TRUE
var/empty_icon_state
/obj/item/reagent_containers/food/update_icon()
..()
if(!reagents.total_volume)
if(("[initial(icon_state)]_empty") in icon_states(icon)) // if there's an empty icon state, use it
icon_state = "[initial(icon_state)]_empty"
else if (empty_icon_state)
icon_state = empty_icon_state
else
icon = initial(icon) //Necessary for refilling empty drinks
icon_state = initial(icon_state)
/obj/item/reagent_containers/food/self_feed_message(var/mob/user)
to_chat(user, "<span class='notice'>You [is_liquid ? "drink from" : "eat"] \the [src].</span>")
@@ -28,6 +28,17 @@ If you add a drink with an empty icon sprite, ensure it is in the same folder, e
if(drink_flags & IS_GLASS)
unacidable = TRUE
/obj/item/reagent_containers/food/drinks/update_icon()
..()
if(!reagents.total_volume)
if(("[initial(icon_state)]_empty") in icon_states(icon)) // if there's an empty icon state, use it
icon_state = "[initial(icon_state)]_empty"
else if (empty_icon_state)
icon_state = empty_icon_state
else
icon = initial(icon) //Necessary for refilling empty drinks
icon_state = initial(icon_state)
/obj/item/reagent_containers/food/drinks/on_reagent_change()
update_icon()