mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 15:37:36 +01:00
Merge pull request #11520 from Citinited/spooky-apcs
Boo affects APCs (again) & no more infinite Boo
This commit is contained in:
@@ -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,16 +7,17 @@ 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
|
||||
starts_charged = FALSE
|
||||
clothes_req = 0
|
||||
stat_allowed = 1
|
||||
invocation = ""
|
||||
@@ -27,26 +26,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()
|
||||
|
||||
@@ -2003,6 +2003,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
|
||||
..()
|
||||
|
||||
+16
-14
@@ -49,7 +49,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
|
||||
@@ -248,9 +247,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
|
||||
@@ -291,10 +290,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))
|
||||
@@ -322,7 +321,7 @@
|
||||
|
||||
|
||||
|
||||
if(update & 2)
|
||||
if(force_update || update & 2)
|
||||
|
||||
if(overlays.len)
|
||||
overlays.len = 0
|
||||
@@ -412,14 +411,17 @@
|
||||
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(second_pass = FALSE)
|
||||
if(opened || wiresexposed)
|
||||
return
|
||||
if(stat & (NOPOWER | BROKEN))
|
||||
return
|
||||
if(!second_pass) //The first time, we just cut overlays
|
||||
addtimer(CALLBACK(src, .get_spooked, TRUE), 1)
|
||||
cut_overlays()
|
||||
else
|
||||
flick("apcemag", src) //Second time we cause the APC to update its icon, then add a timer to update icon later
|
||||
addtimer(CALLBACK(src, .proc/update_icon, TRUE), 10)
|
||||
|
||||
//attack with an item - open/close cover, insert cell, or (un)lock interface
|
||||
/obj/machinery/power/apc/attackby(obj/item/W, mob/living/user, params)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user