Looping sounds, competently. (#14709)

This commit is contained in:
Wowzewow (Wezzy)
2022-10-13 00:30:14 +02:00
committed by GitHub
parent 1628e5d2d6
commit 318df630a5
116 changed files with 349 additions and 34 deletions
+4 -1
View File
@@ -54,6 +54,7 @@ FLOOR SAFES
/obj/structure/safe/Destroy()
if(drill)
drill.soundloop.stop()
drill.forceMove(loc)
drill = null
return ..()
@@ -118,6 +119,7 @@ FLOOR SAFES
if(broken)
return
last_drill_time = world.time
drill.soundloop.start()
START_PROCESSING(SSprocessing, src)
update_icon()
if("Turn Off")
@@ -126,6 +128,7 @@ FLOOR SAFES
if(do_after(user, 2 SECONDS))
if(!drill || !isprocessing)
return
drill.soundloop.stop()
STOP_PROCESSING(SSprocessing, src)
update_icon()
if("Remove Drill")
@@ -288,7 +291,7 @@ FLOOR SAFES
new /obj/random/highvalue(src)
new /obj/random/highvalue(src)
/obj/structure/safe/cash
/obj/structure/safe/cash
name = "credit safe"
/obj/structure/safe/cash/Initialize()
@@ -142,12 +142,15 @@
var/mobpresent = 0 //true if there is a mob on the shower's loc, this is to ease process()
var/is_washing = 0
var/list/temperature_settings = list("normal" = 310, "boiling" = T0C+100, "freezing" = T0C)
var/datum/looping_sound/showering/soundloop
/obj/machinery/shower/Initialize()
. = ..()
create_reagents(2)
soundloop = new(list(src), FALSE)
/obj/machinery/shower/Destroy()
QDEL_NULL(soundloop)
return ..()
//add heat controls? when emagged, you can freeze to death in it?
@@ -187,6 +190,7 @@
qdel(mymist)
if(on)
soundloop.start(src)
add_overlay(image('icons/obj/watercloset.dmi', src, "water", MOB_LAYER + 1, dir))
if(temperature_settings[watertemp] < T20C)
return //no mist for cold water
@@ -199,6 +203,7 @@
ismist = 1
mymist = new /obj/effect/mist(loc)
else
soundloop.stop(src)
if(ismist)
ismist = 1
mymist = new /obj/effect/mist(loc)