[MIRROR] Fixes water bottle cap overlays & adds an opening sound [MDB IGNORE] (#19110)

* Fixes water bottle cap overlays & adds an opening sound (#73135)

## About The Pull Request

Watter bottle caps are now visible and create a pop sound when opened.
Couldn't find a sound effect for closing the cap though.

Fixes #72927

## Changelog
🆑
fix: Water bottle cap overlays & missing opening sound
/🆑

* Fixes water bottle cap overlays & adds an opening sound

---------

Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-02-02 17:15:24 +01:00
committed by GitHub
parent 6a2b916758
commit e4fa713b67
@@ -216,6 +216,7 @@
fill_icon_thresholds = list(0, 10, 25, 50, 75, 80, 90)
isGlass = FALSE
// The 2 bottles have separate cap overlay icons because if the bottle falls over while bottle flipping the cap stays fucked on the moved overlay
var/cap_icon = 'icons/obj/drinks/drink_effects.dmi'
var/cap_icon_state = "bottle_cap_small"
var/cap_on = TRUE
var/cap_lost = FALSE
@@ -225,7 +226,7 @@
/obj/item/reagent_containers/cup/glass/waterbottle/Initialize(mapload)
. = ..()
cap_overlay = mutable_appearance(icon, cap_icon_state)
cap_overlay = mutable_appearance(cap_icon, cap_icon_state)
if(cap_on)
spillable = FALSE
update_appearance()
@@ -260,6 +261,7 @@
cap_lost = TRUE
else
to_chat(user, span_notice("You remove the cap from [src]."))
playsound(loc, 'sound/effects/can_open1.ogg', 50, TRUE)
else
cap_on = TRUE
spillable = FALSE