Skip to content

Commit

Permalink
Merge pull request tgstation#1186 from VistaPOWA/disposals
Browse files Browse the repository at this point in the history
Added delay to Disposals sounds
  • Loading branch information
caelaislinn committed Aug 19, 2013
2 parents 6354544 + cb6fb77 commit 01e87ce
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
12 changes: 8 additions & 4 deletions code/modules/recycling/disposal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1212,6 +1212,7 @@
var/active = 0
var/turf/target // this will be where the output objects are 'thrown' to.
var/mode = 0
var/start_eject = 0

New()
..()
Expand All @@ -1229,10 +1230,13 @@
proc/expel(var/obj/structure/disposalholder/H)

flick("outlet-open", src)
playsound(src, 'sound/machines/warning-buzzer.ogg', 50, 0, 0)
sleep(20) //wait until correct animation frame
playsound(src, 'sound/machines/hiss.ogg', 50, 0, 0)

if((start_eject + 30) < world.time)
start_eject = world.time
playsound(src, 'sound/machines/warning-buzzer.ogg', 50, 0, 0)
sleep(20)
playsound(src, 'sound/machines/hiss.ogg', 50, 0, 0)
else
sleep(20)
if(H)
for(var/atom/movable/AM in H)
AM.loc = src.loc
Expand Down
5 changes: 4 additions & 1 deletion code/modules/recycling/sortingmachinery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@
density = 1
icon_state = "intake"

var/start_flush = 0
var/c_mode = 0

New()
Expand Down Expand Up @@ -267,7 +268,9 @@
air_contents = new() // new empty gas resv.

sleep(10)
playsound(src, 'sound/machines/disposalflush.ogg', 50, 0, 0)
if((start_flush + 15) < world.time)
start_flush = world.time
playsound(src, 'sound/machines/disposalflush.ogg', 50, 0, 0)
sleep(5) // wait for animation to finish

H.init(src) // copy the contents of disposer to holder
Expand Down

0 comments on commit 01e87ce

Please sign in to comment.