Adds Sleep Music to Surgery/Cryo/Sleeper

Plays quiet music when you have;
- An anesthetic mask on your face.
- Been put into a cryopod
- Been put into a sleeper

TBD: Maybe make sleeping do it, but iirc even dying does sleep.

There is a pref toggle for these under Preferences: "Sleeping Music"

Example [here](https://streamable.com/pls63y) of surgery being done. Volume is higher than normal, was adjusted down to 40%.
This commit is contained in:
Rykka Stormheart
2023-03-04 15:56:56 -08:00
parent 6cd9b042ed
commit 2982a7ca85
9 changed files with 91 additions and 2 deletions

View File

@@ -169,7 +169,7 @@
/obj/machinery/sleeper/attack_hand(var/mob/user)
if(!controls_inside)
return FALSE
if(user == occupant)
tgui_interact(user)
@@ -481,10 +481,12 @@
M.loc = src
update_use_power(USE_POWER_ACTIVE)
occupant = M
occupant.cozyloop.start() // CHOMPStation Add: Cozy Music
update_icon()
/obj/machinery/sleeper/proc/go_out()
if(!occupant || occupant.loc != src)
occupant.cozyloop.stop() // CHOMPStation Add: Cozy Music
occupant = null // JUST IN CASE
return
if(occupant.client)
@@ -492,6 +494,7 @@
occupant.client.perspective = MOB_PERSPECTIVE
occupant.Stasis(0)
occupant.loc = src.loc
occupant.cozyloop.stop() // CHOMPStation Add: Cozy Music
occupant = null
for(var/atom/movable/A in src) // In case an object was dropped inside or something
if(A == beaker || A == circuit)