Auto-flush disposals, auto-hush vendending machines

This commit is contained in:
Tastyfish
2011-11-29 02:42:08 -05:00
parent e89488975f
commit e58dd6030f
2 changed files with 10 additions and 2 deletions
+9 -1
View File
@@ -18,6 +18,7 @@
var/flush = 0 // true if flush handle is pulled
var/obj/structure/disposalpipe/trunk/trunk = null // the attached pipe trunk
var/flushing = 0 // true if flushing in progress
var/timeleft = 0 //used to give a delay after the last item was put in before flushing
// create a new disposal
// find the attached trunk (if present) and init gas resvr.
@@ -80,7 +81,7 @@
if(M == user)
continue
M.show_message("[user.name] places \the [I] into the [src].", 3)
timeleft = 5
update()
// mouse drop another mob or self
@@ -117,6 +118,7 @@
continue
C.show_message(msg, 3)
timeleft = 5
update()
return
@@ -268,6 +270,12 @@
process()
if(stat & BROKEN) // nothing can happen if broken
return
if(length(src.contents) > 0)
if(timeleft == 0)
flush = 1
else
timeleft--
src.updateDialog()