Skip to content

Commit

Permalink
Daytime Changer for GM's
Browse files Browse the repository at this point in the history
  • Loading branch information
VoiceInYourHead committed Aug 10, 2024
1 parent 6b7dd84 commit 1c0e287
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions colonialmarines.dme
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
24 changes: 24 additions & 0 deletions void-marines/code/light_change.dm
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 1c0e287

Please sign in to comment.