Skip to content

Commit

Permalink
[MIRROR] Fixes coffin cookie being invisible [MDB IGNORE] (#25510)
Browse files Browse the repository at this point in the history
* Fixes coffin cookie being invisible (#80179)

## About The Pull Request
- Fixes #80161

It's a seasonal bug i.e. occurs only during the holiday seasons. Yeah so
its caused by this code

https://github.com/tgstation/tgstation/blob/2a359b817874c4bb52be814551780af304cc9e07/code/game/objects/items/food/pastries.dm#L191-L194

So like it changes the icon state based on the season. Unfortunately
none of the icon states it picks are located in the icon file
`'icons/obj/holiday/halloween_items.dmi` i.e. it causes an invalid icon
state causing it to go invisible(not spooky just a bug).

We now make sure this cookie type does not change based on the season.
It will stay unique throughout the year

## Changelog
:cl:
fix: coffin cookies are no longer invisible during the holiday seasons
/:cl:

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@ users.noreply.github.com>

* Fixes coffin cookie being invisible

---------

Co-authored-by: SyncIt21 <[email protected]>
Co-authored-by: MrMelbert <51863163+MrMelbert@ users.noreply.github.com>
  • Loading branch information
3 people authored and FFMirrorBot committed Dec 8, 2023
1 parent 0430061 commit dc5f624
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/game/objects/items/food/pastries.dm
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@
foodtypes = GRAIN | JUNKFOOD | SUGAR
crafting_complexity = FOOD_COMPLEXITY_2

/obj/item/food/cookie/sugar/Initialize(mapload)
/obj/item/food/cookie/sugar/Initialize(mapload, seasonal_changes = TRUE)
. = ..()
if(check_holidays(FESTIVE_SEASON))
if(seasonal_changes && check_holidays(FESTIVE_SEASON))
var/shape = pick("tree", "bear", "santa", "stocking", "present", "cane")
desc = "A sugar cookie in the shape of a [shape]. I hope Santa likes it!"
icon_state = "sugarcookie_[shape]"
Expand Down
4 changes: 4 additions & 0 deletions code/modules/events/holiday/halloween.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
icon_state = "coffincookie"
crafting_complexity = FOOD_COMPLEXITY_2

/obj/item/food/cookie/sugar/spookycoffin/Initialize(mapload, seasonal_changes = FALSE)
// Changes default parameter of seasonal_changes to FALSE, pass to parent
return ..(mapload, seasonal_changes)

//spooky items

/obj/item/storage/spooky
Expand Down

0 comments on commit dc5f624

Please sign in to comment.