From 1c0e2871a24b0313ca3844ee5ba59775697afd95 Mon Sep 17 00:00:00 2001 From: VoiceInYourHead Date: Sat, 10 Aug 2024 03:33:51 +0300 Subject: [PATCH] Daytime Changer for GM's --- code/modules/admin/admin_verbs.dm | 2 ++ colonialmarines.dme | 1 + void-marines/code/light_change.dm | 24 ++++++++++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 void-marines/code/light_change.dm diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 3b424bd09c..c3bbd3645c 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -338,6 +338,7 @@ var/list/roundstart_mod_verbs = list( add_verb(src, /client/proc/toggle_vehicle_blockers) add_verb(src, /client/proc/toggle_ai_xeno_weeding) add_verb(src, /client/proc/toggle_rappel_menu) + add_verb(src, /client/proc/gm_lighting) //RU-PVE add_verb(src, /client/proc/toggle_fire_support_menu) if(CLIENT_HAS_RIGHTS(src, R_SERVER)) add_verb(src, admin_verbs_server) @@ -376,6 +377,7 @@ var/list/roundstart_mod_verbs = list( /client/proc/toggle_vehicle_blockers, /client/proc/toggle_ai_xeno_weeding, /client/proc/toggle_rappel_menu, + /client/proc/gm_lighting, //RU-PVE /client/proc/toggle_fire_support_menu, admin_verbs_admin, admin_verbs_ban, diff --git a/colonialmarines.dme b/colonialmarines.dme index cb71865aba..517c992e2c 100644 --- a/colonialmarines.dme +++ b/colonialmarines.dme @@ -2499,6 +2499,7 @@ #include "maps\map_files\LV671_Ark\LV671.dm" #include "void-marines\code\admin_tools.dm" #include "void-marines\code\factory_areas.dm" +#include "void-marines\code\light_change.dm" #include "void-marines\code\loadouts.dm" #include "void-marines\code\marine_roles.dm" #include "void-marines\code\portable_detector.dm" diff --git a/void-marines/code/light_change.dm b/void-marines/code/light_change.dm new file mode 100644 index 0000000000..fc6cf3f99b --- /dev/null +++ b/void-marines/code/light_change.dm @@ -0,0 +1,24 @@ +/area/ + var/daytime_affected = FALSE + +/client/proc/gm_lighting() + set name = "Change Daytime" + set category = "Game Master.Extras" + + if(!check_rights(R_ADMIN)) + return + var/list/lightturfs + var/light_str = input(usr, "Set the light power.", "Daytime Brightness", "0.3") as null|num + var/daytime_color = input(usr, "Please select the color to use.", "Daytime Color") as color|null + var/confirm = tgui_alert(usr, "Are you sure you wish to change daytime on the map to this settings?", "Confirm", list("Yes", "No"), 1 HOURS) + if(confirm != "Yes") + return FALSE + message_admins("[key_name(usr)] changed lighting on map to [daytime_color] color with [light_str] strength.") + lightturfs = block(locate(world.maxx, world.maxy, 2), locate(1, 1, 2)) + for(var/atom/A as anything in lightturfs) + if(istype(A.loc,/area/)) + var/area/targeted = A.loc + if(!targeted.daytime_affected) + lightturfs -= A + for(var/turf/T as anything in lightturfs) + T.set_light(1, light_str, l_color = daytime_color)