Skip to content

Commit

Permalink
Ports the sounds (yogstation13#13497)
Browse files Browse the repository at this point in the history
  • Loading branch information
nmajask authored Mar 27, 2022
1 parent 0ccebc3 commit 9876fd7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions code/game/machinery/Sleeper.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
///if the sleeper puts its patient into stasis
var/stasis = FALSE
var/enter_message = "<span class='notice'><b>You feel cool air surround you. You go numb as your senses turn inward.</b></span>"
var/open_sound = 'sound/machines/podopen.ogg'
var/close_sound = 'sound/machines/podclose.ogg'
payment_department = ACCOUNT_MED
fair_market_price = 5

Expand Down Expand Up @@ -86,6 +88,8 @@
if(mob_occupant)
mob_occupant.remove_status_effect(STATUS_EFFECT_STASIS)
flick("[initial(icon_state)]-anim", src)
if(open_sound)
playsound(src, open_sound, 40)
..()

/obj/machinery/sleeper/close_machine(mob/user)
Expand All @@ -97,6 +101,8 @@
to_chat(occupant, "[enter_message]")
if(mob_occupant && stasis)
mob_occupant.ExtinguishMob()
if(close_sound)
playsound(src, close_sound, 40)

/obj/machinery/sleeper/emp_act(severity)
. = ..()
Expand Down
6 changes: 6 additions & 0 deletions code/game/machinery/cryopod.dm
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ GLOBAL_VAR_INIT(cryopods_enabled, FALSE)

var/on_store_message = "has entered long-term storage."
var/on_store_name = "Cryogenic Oversight"
var/open_sound = 'sound/machines/podopen.ogg'
var/close_sound = 'sound/machines/podclose.ogg'

// 5 minutes-ish safe period before being despawned.
var/time_till_despawn = 15 MINUTES // Time if a player gets forced into cryo
Expand Down Expand Up @@ -227,6 +229,8 @@ GLOBAL_VAR_INIT(cryopods_enabled, FALSE)
..(user)
icon_state = "cryopod"
var/mob/living/mob_occupant = occupant
if(close_sound)
playsound(src, close_sound, 40)
if(mob_occupant && mob_occupant.stat != DEAD)
to_chat(occupant, span_boldnotice("You feel cool air surround you. You go numb as your senses turn inward."))
if(!occupant) //Check they still exist
Expand All @@ -247,6 +251,8 @@ GLOBAL_VAR_INIT(cryopods_enabled, FALSE)
/obj/machinery/cryopod/open_machine()
..()
icon_state = GLOB.cryopods_enabled ? "cryopod-open" : "cryopod-off"
if(open_sound)
playsound(src, open_sound, 40)
density = TRUE
name = initial(name)

Expand Down
Binary file added sound/machines/podclose.ogg
Binary file not shown.
Binary file added sound/machines/podopen.ogg
Binary file not shown.

0 comments on commit 9876fd7

Please sign in to comment.