Boo affects APCs again

Also reworks the boo code
This commit is contained in:
Citinited
2019-05-11 18:15:13 +01:00
parent 0fb164d041
commit cd3b25bd24
7 changed files with 37 additions and 42 deletions
+4 -28
View File
@@ -1,6 +1,4 @@
var/global/list/boo_phrases=list(
GLOBAL_LIST_INIT(boo_phrases, list(
"You feel a chill run down your spine.",
"You think you see a figure in your peripheral vision.",
"What was that?",
@@ -9,13 +7,13 @@ var/global/list/boo_phrases=list(
"Something doesn't feel right...",
"You feel a presence in the room.",
"It feels like someone's standing behind you.",
)
))
/obj/effect/proc_holder/spell/aoe_turf/boo
name = "Boo!"
desc = "Fuck with the living."
ghost = 1
ghost = TRUE
school = "transmutation"
charge_max = 600
@@ -27,26 +25,4 @@ var/global/list/boo_phrases=list(
/obj/effect/proc_holder/spell/aoe_turf/boo/cast(list/targets, mob/user = usr)
for(var/turf/T in targets)
for(var/atom/A in T.contents)
// Bug humans
if(ishuman(A))
var/mob/living/carbon/human/H = A
if(H && H.client)
to_chat(H, "<i>[pick(boo_phrases)]</i>")
// Flicker unblessed lights in range
if(istype(A,/obj/machinery/light))
var/obj/machinery/light/L = A
if(L)
L.flicker()
// OH GOD BLUE APC (single animation cycle)
if(istype(A, /obj/machinery/power/apc))
A:spookify()
if(istype(A, /obj/machinery/status_display))
A:spookymode=1
if(istype(A, /obj/machinery/ai_status_display))
A:spookymode=1
T.get_spooked()
@@ -1987,6 +1987,9 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
genemutcheck(src, block, null, MUTCHK_FORCED)
dna.UpdateSE()
/mob/living/carbon/human/get_spooked()
to_chat(src, "<span class='whisper'>[pick(GLOB.boo_phrases)]</span>")
/mob/living/carbon/human/extinguish_light()
// Parent function handles stuff the human may be holding
..()
+13 -13
View File
@@ -50,7 +50,6 @@
use_power = NO_POWER_USE
req_access = list(access_engine_equip)
siemens_strength = 1
var/spooky=0
var/area/area
var/areastring = null
var/obj/item/stock_parts/cell/cell
@@ -251,9 +250,9 @@
// update the APC icon to show the three base states
// also add overlays for indicator lights
/obj/machinery/power/apc/update_icon()
/obj/machinery/power/apc/update_icon(force_update = FALSE)
if(!status_overlays)
if(!status_overlays || force_update)
status_overlays = 1
status_overlays_lock = new
status_overlays_charging = new
@@ -294,10 +293,10 @@
var/update = check_updates() //returns 0 if no need to update icons.
// 1 if we need to update the icon_state
// 2 if we need to update the overlays
if(!update)
if(!update && !force_update)
return
if(update & 1) // Updating the icon state
if(force_update || update & 1) // Updating the icon state
if(update_state & UPSTATE_ALLGOOD)
icon_state = "apc0"
else if(update_state & (UPSTATE_OPENED1|UPSTATE_OPENED2))
@@ -325,7 +324,7 @@
if(update & 2)
if(force_update || update & 2)
if(overlays.len)
overlays.len = 0
@@ -415,13 +414,14 @@
update_icon()
updating_icon = 0
/obj/machinery/power/apc/proc/spookify()
if(spooky) return // Fuck you we're already spooky
spooky=1
update_icon()
spawn(10)
spooky=0
update_icon()
/obj/machinery/power/apc/get_spooked()
if(opened || wiresexposed)
return
if(stat & (NOPOWER | BROKEN))
return
addtimer(CALLBACK(src, .proc/update_icon, TRUE), 10)
overlays.Cut()
flick("apcemag", src)
//attack with an item - open/close cover, insert cell, or (un)lock interface
+3
View File
@@ -232,6 +232,9 @@
on = FALSE
return
/obj/machinery/light/get_spooked()
flicker()
// update the icon_state and luminosity of the light depending on its state
/obj/machinery/light/proc/update(var/trigger = TRUE)
switch(status)