Skip to content

Commit

Permalink
re:eggbox (#3074)
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

Resprites the eggbox, Done on behalf of @CoiledLamb 

## Why It's Good For The Game


![image](https://github.com/shiptest-ss13/Shiptest/assets/58402542/cb914d43-5b68-462d-b3ed-94bdc9009ff8)

## Changelog

:cl: CoiledLamb 
add: Resprites the eggbox
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: 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. -->

Co-authored-by: retlaw34 <[email protected]>
  • Loading branch information
rye-rice and rye-rice authored Jun 10, 2024
1 parent ba8c32d commit 7d08f71
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 7d08f71

Please sign in to comment.