Skip to content

Commit

Permalink
Done
Browse files Browse the repository at this point in the history
  • Loading branch information
rye-rice committed Jun 6, 2024
1 parent 194b597 commit 2ce9981
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions code/game/objects/items/storage/fancy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,29 @@
STR.max_items = 12
STR.set_holdable(list(/obj/item/reagent_containers/food/snacks/egg))

/obj/item/storage/fancy/egg_box/update_icon_state()
. = ..()
icon_state = "[base_icon_state][is_open ? "_open" : null]"

/obj/item/storage/fancy/egg_box/update_overlays()
. = ..()
cut_overlays()
if(!is_open)
return
var/egg_count = 0
for(var/obj/item/reagent_containers/food/snacks/egg as anything in contents)
egg_count++
if(!egg)
return
var/image/current_huevo = image(icon = icon, icon_state = "eggbox_eggoverlay")
if(egg_count <= 6) //less than 6 eggs
current_huevo.pixel_x = (3*(egg_count-1))
else //if more than 6, make an extra row
current_huevo.pixel_x = (3*(egg_count-7)) //-7 to 'reset' it
current_huevo.pixel_y = -3
add_overlay(current_huevo)


/*
* Candle Box
*/
Expand Down
Binary file modified icons/obj/food/containers.dmi
Binary file not shown.

0 comments on commit 2ce9981

Please sign in to comment.