mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Introduce Mining Lantern Hook flickering
Requested, you can now spook mining lanterns to flicker them Flickering mining lanterns is hit and miss (testing doesn't show it properly going on/off/on/off as expected), but it turns off when spooked and back on when done, so here's that
This commit is contained in:
@@ -52,6 +52,7 @@
|
||||
light_color = LIGHT_COLOR_TUNGSTEN
|
||||
ghost_write = 0 //Can't be too safe
|
||||
ghost_read = 0
|
||||
var/flickering = 0 //SPOOK
|
||||
|
||||
/obj/structure/hanging_lantern/New()
|
||||
..()
|
||||
@@ -71,3 +72,17 @@
|
||||
user.put_in_hands(lantern)
|
||||
alllights -= src
|
||||
qdel(src)
|
||||
|
||||
//Direct rip from lights with a few adjustments, not much to worry about since it's not machinery
|
||||
/obj/structure/hanging_lantern/proc/flicker(var/amount = rand(10, 20))
|
||||
if(flickering)
|
||||
return
|
||||
//Store our light's vars in here
|
||||
flickering = 1
|
||||
spawn(0)
|
||||
for(var/i = 0; i < amount; i++)
|
||||
set_light(0)
|
||||
spawn(rand(5, 15))
|
||||
set_light(6, 2, LIGHT_COLOR_TUNGSTEN)
|
||||
set_light(6, 2, LIGHT_COLOR_TUNGSTEN)
|
||||
flickering = 0
|
||||
|
||||
@@ -69,6 +69,11 @@ var/global/list/boo_phrases_silicon=list(
|
||||
if(L)
|
||||
L.flicker()
|
||||
|
||||
if(istype(A,/obj/structure/hanging_lantern))
|
||||
var/obj/structure/hanging_lantern/H = A
|
||||
if(H) //Fucked if I know
|
||||
H.flicker()
|
||||
|
||||
// OH GOD BLUE APC (single animation cycle)
|
||||
if(istype(A, /obj/machinery/power/apc))
|
||||
A:spookify()
|
||||
|
||||
Reference in New Issue
Block a user