Gravity generator glows. (#3588)

Resolves #3583
This commit is contained in:
chaoko99
2017-10-13 17:39:48 +03:00
committed by Erki
parent e8786864b1
commit 2d527d31d8
2 changed files with 57 additions and 4 deletions
+20 -4
View File
@@ -24,7 +24,9 @@
use_power = 0
unacidable = 1
var/sprite_number = 0
light_color = LIGHT_COLOR_CYAN
light_power = 1
light_range = 8
/obj/machinery/gravity_generator/ex_act(severity)
if(severity == 1) // Very sturdy.
set_broken()
@@ -88,6 +90,8 @@
/obj/machinery/gravity_generator/main/station/proc/round_startset()
if(round_start >= 1)
round_start--
set_light(8,1,LIGHT_COLOR_CYAN)
//
// Generator an admin can spawn
//
@@ -96,6 +100,8 @@
. = ..()
round_start = 1
//
// Main Generator with the main code
//
@@ -119,9 +125,9 @@
var/list/localareas = list()
var/round_start = 2 //To help stop a bug with round start
var/backpanelopen = 0
var/eventon = 0
var/eventon = 0
/obj/machinery/gravity_generator/main/Destroy()
/obj/machinery/gravity_generator/main/Destroy()
log_debug("Gravity Generator Destroyed")
investigate_log("was destroyed!", "gravity")
on = 0
@@ -298,6 +304,11 @@
new /obj/singularity(src.loc)
if(prob(33)) //Releasing all that power at once is dangerous.
empulse(src.loc, 2, 4)
set_light(10,1,LIGHT_COLOR_FLARE)
sleep(5)
set_light(5,0.5,LIGHT_COLOR_FIRE)
sleep(5)
set_light(0,0,"#000000")
/obj/machinery/gravity_generator/main/get_status()
if(stat & BROKEN)
@@ -375,14 +386,19 @@
switch(charge_count)
if(0 to 20)
overlay_state = null
set_light(0,0,"#000000")
if(21 to 40)
overlay_state = "startup"
set_light(4,0.2,LIGHT_COLOR_BLUE)
if(41 to 60)
overlay_state = "idle"
set_light(6,0.5,"#7D9BFF") //More of a washed out perywinkle than blue but shut up.
if(61 to 80)
overlay_state = "activating"
set_light(6,0.8,"#7DC3FF")
if(81 to 100)
overlay_state = "activated"
set_light(8,1,LIGHT_COLOR_CYAN)
if(overlay_state != current_overlay)
if(middle)
@@ -439,7 +455,7 @@
/obj/machinery/gravity_generator/main/Initialize()
. = ..()
addtimer(CALLBACK(src, .proc/updateareas), 10)
addtimer(CALLBACK(src, .proc/updateareas), 10)
return
/obj/machinery/gravity_generator/main/proc/updateareas()