Skip to content

Commit

Permalink
bowls/mushroom bowls now use fill icon stuff for their fillings (#2567)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

Fixes mushroom bowl becoming invisible/getting weird filling overlay
since it's inheriting the normal bowl's behavior.


![image](https://github.com/shiptest-ss13/Shiptest/assets/24857008/51e17b94-8142-486f-937b-a2b2507457cf)

## Why It's Good For The Game

fixes #2508

## Changelog

🆑 
fix: mushroom bowls no longer become invisible when reagents are
transferred from them
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
  • Loading branch information
SomeguyManperson authored Dec 11, 2023
1 parent d44345a commit ec314b3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 28 deletions.
19 changes: 3 additions & 16 deletions code/modules/food_and_drinks/food/customizables.dm
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@
reagent_flags = OPENCONTAINER
custom_materials = list(/datum/material/glass = 500)
w_class = WEIGHT_CLASS_NORMAL
fill_icon = 'icons/obj/food/soupsalad.dmi'
fill_icon_state = "fullbowl"
fill_icon_thresholds = list(1)

/obj/item/reagent_containers/glass/bowl/attackby(obj/item/I,mob/user, params)
if(istype(I, /obj/item/reagent_containers/food/snacks))
Expand All @@ -323,22 +326,6 @@
. = ..()
return

/obj/item/reagent_containers/glass/bowl/on_reagent_change(changetype)
..()
update_appearance()

/obj/item/reagent_containers/glass/bowl/update_icon_state()
if(!reagents || !reagents.total_volume)
icon_state = "bowl"
return ..()

/obj/item/reagent_containers/glass/bowl/update_overlays()
. = ..()
if(reagents && reagents.total_volume)
var/mutable_appearance/filling = mutable_appearance('icons/obj/food/soupsalad.dmi', "fullbowl")
filling.color = mix_color_from_reagents(reagents.reagent_list)
. += filling

#undef INGREDIENTS_FILL
#undef INGREDIENTS_SCATTER
#undef INGREDIENTS_STACK
Expand Down
13 changes: 1 addition & 12 deletions code/modules/mining/lavaland/ash_flora.dm
Original file line number Diff line number Diff line change
Expand Up @@ -458,18 +458,7 @@
desc = "A bowl made out of mushrooms. Not food, though it might have contained some at some point."
icon = 'icons/obj/lavaland/ash_flora.dmi'
icon_state = "mushroom_bowl"

/obj/item/reagent_containers/glass/bowl/mushroom_bowl/update_overlays()
. = ..()
if(reagents && reagents.total_volume)
var/mutable_appearance/filling = mutable_appearance('icons/obj/lavaland/ash_flora.dmi', "fullbowl")
filling.color = mix_color_from_reagents(reagents.reagent_list)
. += filling

/obj/item/reagent_containers/glass/bowl/mushroom_bowl/update_icon_state()
if(!reagents || !reagents.total_volume)
icon_state = "mushroom_bowl"
return ..()
fill_icon = 'icons/obj/lavaland/ash_flora.dmi'

/obj/item/reagent_containers/glass/bowl/mushroom_bowl/attackby(obj/item/I,mob/user, params)
if(istype(I, /obj/item/reagent_containers/food/snacks))
Expand Down
Binary file modified icons/obj/food/soupsalad.dmi
Binary file not shown.
Binary file modified icons/obj/lavaland/ash_flora.dmi
Binary file not shown.

0 comments on commit ec314b3

Please sign in to comment.