mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 06:29:23 +01:00
Fixes water overlays showing on toilets facing directions other than SOUTH (#86878)
## About The Pull Request The overlays shows on directions other than south because the code doesn't update the overlays whenever the dir is changed. Honestly saving a tiny blip of space with a pair of 1-dir static icons isn't worth making all this messy code over anyway, so I just scratched all of it and gave the icon state 4 dirs (3 of which are empty but that may change if someone decides to give the toilet a 3/4 perspective when facing right or left. ## Why It's Good For The Game Fixed water overlays showing on toilets facing directions other than SOUTH (down). ## Changelog 🆑 fix: Fixed water overlays showing on toilets facing directions other than SOUTH (down). /🆑
This commit is contained in:
@@ -25,13 +25,9 @@
|
||||
var/list/cistern_items
|
||||
///Lazylist of fish in the toilet, not to be mixed with the items in the cistern. Max of 3
|
||||
var/list/fishes
|
||||
///Static toilet water overlay given to toilets that are facing a direction we can see the water in.
|
||||
var/static/mutable_appearance/toilet_water_overlay
|
||||
|
||||
/obj/structure/toilet/Initialize(mapload)
|
||||
. = ..()
|
||||
if(isnull(toilet_water_overlay))
|
||||
toilet_water_overlay = mutable_appearance(icon, "[base_icon_state]-water")
|
||||
cover_open = round(rand(0, 1))
|
||||
update_appearance(UPDATE_ICON)
|
||||
if(mapload && SSmapping.level_trait(z, ZTRAIT_STATION))
|
||||
@@ -176,8 +172,8 @@
|
||||
|
||||
/obj/structure/toilet/update_overlays()
|
||||
. = ..()
|
||||
if(!flushing && cover_open && (dir & SOUTH))
|
||||
. += toilet_water_overlay
|
||||
if(!flushing && cover_open)
|
||||
. += "[base_icon_state]-water"
|
||||
|
||||
/obj/structure/toilet/atom_deconstruct(dissambled = TRUE)
|
||||
for(var/obj/toilet_item in cistern_items)
|
||||
|
||||
Reference in New Issue
Block a user