mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 05:23:22 +01:00
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:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user