diff --git a/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm b/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm index bd66d3201eef..460f79c59bd0 100644 --- a/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm +++ b/code/modules/mob/living/silicon/ai/decentralized/ai_data_core.dm @@ -19,6 +19,8 @@ GLOBAL_VAR_INIT(primary_data_core, null) var/warning_sent = FALSE + var/TimerID //party time + /obj/machinery/ai/data_core/Initialize() . = ..() GLOB.data_cores += src @@ -143,7 +145,17 @@ GLOBAL_VAR_INIT(primary_data_core, null) var/mutable_appearance/on_overlay = mutable_appearance(icon, "[initial(icon_state)]_on") add_overlay(on_overlay) - +/obj/machinery/ai/data_core/proc/partytime() + if(TimerID) + return FALSE + var/current_color = random_color() + set_light(7, 3, current_color) + TimerID = addtimer(CALLBACK(src, .proc/partytime), 0.5 SECONDS, TIMER_STOPPABLE) + +/obj/machinery/ai/data_core/proc/stoptheparty() + set_light(0) + if(TimerID) + deltimer(TimerID) /obj/machinery/ai/data_core/primary name = "primary AI Data Core" desc = "A complicated computer system capable of emulating the neural functions of a human at near-instantanous speeds. This one has a scrawny and faded note saying: 'Primary AI Data Core'" diff --git a/code/modules/mob/living/silicon/ai/decentralized/projects/rgb.dm b/code/modules/mob/living/silicon/ai/decentralized/projects/rgb.dm new file mode 100644 index 000000000000..895b4ae2710c --- /dev/null +++ b/code/modules/mob/living/silicon/ai/decentralized/projects/rgb.dm @@ -0,0 +1,20 @@ +/datum/ai_project/rgb + name = "RGB Lighting" + description = "By varying the current levels in the lighting subsystems of your servers, you can make pretty colors." + research_cost = 250 + ram_required = 0 + research_requirements_text = "None" + category = AI_PROJECT_MISC + +/datum/ai_project/rgb/run_project(force_run = FALSE) + . = ..() + if(!.) + return . + for(var/obj/machinery/ai/data_core/datacores in GLOB.data_cores) + datacores.partytime() + + +/datum/ai_project/rgb/stop() + for(var/obj/machinery/ai/data_core/datacores in GLOB.data_cores) + datacores.stoptheparty() + ..() diff --git a/yogstation.dme b/yogstation.dme index e24438c62a06..1a977bcb2f5c 100644 --- a/yogstation.dme +++ b/yogstation.dme @@ -2361,6 +2361,7 @@ #include "code\modules\mob\living\silicon\ai\decentralized\projects\examine.dm" #include "code\modules\mob\living\silicon\ai\decentralized\projects\firewall.dm" #include "code\modules\mob\living\silicon\ai\decentralized\projects\induction.dm" +#include "code\modules\mob\living\silicon\ai\decentralized\projects\rgb.dm" #include "code\modules\mob\living\silicon\ai\decentralized\projects\surveillance.dm" #include "code\modules\mob\living\silicon\ai\freelook\cameranet.dm" #include "code\modules\mob\living\silicon\ai\freelook\chunk.dm"