Adds ghost visible countdowns for bombs

🆑 coiax
rscadd: For extra observer drama, ghosts can now visibly see the
countdown of various explosives.
/🆑

- Also updates my build script to take account of the move of dm.sh
This commit is contained in:
Jack Edge
2016-06-02 11:06:59 +01:00
parent 16c77c484c
commit 2df2c6334f
4 changed files with 59 additions and 1 deletions
+2
View File
@@ -18,6 +18,7 @@
var/beepsound = 'sound/items/timer.ogg'
var/delayedbig = FALSE //delay wire pulsed?
var/delayedlittle = FALSE //activation wire pulsed?
var/obj/effect/countdown/syndicatebomb/countdown
/obj/machinery/syndicatebomb/process()
if(active && !defused && (timer > 0)) //Tick Tock
@@ -41,6 +42,7 @@
if(src.payload)
payload = new payload(src)
update_icon()
countdown = new(src)
..()
/obj/machinery/syndicatebomb/Destroy()
+55
View File
@@ -0,0 +1,55 @@
/obj/effect/countdown
name = "countdown"
desc = "We're leaving together\n\
But still it's farewell\n\
And maybe we'll come back\n\
To earth, who can tell?"
var/last_displayed
var/atom/attached_to
var/text_color = "#ff0000"
invisibility = INVISIBILITY_OBSERVER
layer = GHOST_LAYER
alpha = 100
/obj/effect/countdown/New(atom/A)
. = ..()
attach(A)
/obj/effect/countdown/proc/attach(atom/A)
attached_to = A
loc = get_turf(A)
SSfastprocess.processing |= src
/obj/effect/countdown/proc/get_value()
// Get the value from our atom
return
/obj/effect/countdown/process()
if(!attached_to || qdeleted(attached_to))
qdel(src)
var/new_val = get_value()
if(new_val == last_displayed)
return
last_displayed = new_val
if(new_val)
var/image/text_image = new(loc = src)
text_image.maptext = "<font size=4>[new_val]</font>"
text_image.color = text_color
overlays.Cut()
overlays += text_image
else
overlays.Cut()
/obj/effect/countdown/Destroy()
attached_to = null
SSfastprocess.processing -= src
. = ..()
/obj/effect/countdown/syndicatebomb/get_value()
var/obj/machinery/syndicatebomb/S = attached_to
if(!istype(S))
return
else if(S.active)
return S.timer
+1
View File
@@ -1022,6 +1022,7 @@
#include "code\modules\clothing\under\jobs\engineering.dm"
#include "code\modules\clothing\under\jobs\medsci.dm"
#include "code\modules\clothing\under\jobs\security.dm"
#include "code\modules\countdown\countdown.dm"
#include "code\modules\crafting\craft.dm"
#include "code\modules\crafting\guncrafting.dm"
#include "code\modules\crafting\recipes.dm"
+1 -1
View File
@@ -31,7 +31,7 @@ def stage2(map):
txt = "-M{}".format(map)
else:
txt = ''
args = "bash dm.sh {} tgstation.dme".format(txt)
args = "bash tools/travis/dm.sh {} tgstation.dme".format(txt)
print(args)
p = subprocess.Popen(args, shell=True)
wait(p)