From 2d527d31d864a094cca7ac20fe19ed1ef487f325 Mon Sep 17 00:00:00 2001 From: chaoko99 Date: Fri, 13 Oct 2017 07:39:48 -0700 Subject: [PATCH] Gravity generator glows. (#3588) Resolves #3583 --- code/modules/power/gravitygenerator.dm | 24 ++++++++++++++--- html/changelogs/chaoko99-genny.yml | 37 ++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 html/changelogs/chaoko99-genny.yml diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm index b62f290c040..6cadc234592 100644 --- a/code/modules/power/gravitygenerator.dm +++ b/code/modules/power/gravitygenerator.dm @@ -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() diff --git a/html/changelogs/chaoko99-genny.yml b/html/changelogs/chaoko99-genny.yml new file mode 100644 index 00000000000..5349e5e5f81 --- /dev/null +++ b/html/changelogs/chaoko99-genny.yml @@ -0,0 +1,37 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +################################# + +# Your name. +author: Chaoko99 + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Gravity generator has lights now." \ No newline at end of file