diff --git a/code/controllers/Processes/night_lighting.dm b/code/controllers/Processes/night_lighting.dm index 7c80a7c2cf7..fc463f8a53d 100644 --- a/code/controllers/Processes/night_lighting.dm +++ b/code/controllers/Processes/night_lighting.dm @@ -3,6 +3,7 @@ var/datum/controller/process/night_lighting/nl_ctrl /datum/controller/process/night_lighting/ var/isactive = 0 var/firstrun = 1 + var/manual_override = 0 /datum/controller/process/night_lighting/proc/is_active() return isactive @@ -28,6 +29,8 @@ var/datum/controller/process/night_lighting/nl_ctrl /datum/controller/process/night_lighting/doWork() + if (manual_override) // don't automatically change lighting if it was manually changed in-game + return switch (worldtime2ticks()) if (0 to config.nl_finish) diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm index 7bd9e6c4356..1b02442260a 100755 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -1435,10 +1435,12 @@ area/space/atmosalert() //Security +/area/security + no_light_control = 1 + /area/security/main name = "\improper Security Office" icon_state = "security" - no_light_control = 1 /area/security/lobby name = "\improper Security Lobby" diff --git a/code/modules/nano/modules/lighting_ctrl.dm b/code/modules/nano/modules/lighting_ctrl.dm index a7c4a3f2855..aca4d5bd5a4 100644 --- a/code/modules/nano/modules/lighting_ctrl.dm +++ b/code/modules/nano/modules/lighting_ctrl.dm @@ -15,6 +15,11 @@ // whether to only select areas explicitly marked for nightlighting var/wl_only = context == "all" ? 0 : 1 + if (!wl_only && lstate == "dark") + nl_ctrl.manual_override = 1 + else if (!wl_only) + nl_ctrl.manual_override = 0 + if (lstate == "dark") log_and_message_admins("enabled night-mode [wl_only ? "in public areas" : "globally"].", lusr) nl_ctrl.activate(wl_only) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 9c1b2a0b1cb..af07103bcfb 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -903,7 +903,7 @@ return 1 if (href_list["lmode"]) - src.toggle_nightlight() + src.toggle_nightlight(href_list["lmode"]) update_icon() else if(!istype(usr, /mob/living/silicon) && (locked && !emagged)) diff --git a/html/changelogs/Lohikar-MoreNmFixes.yml b/html/changelogs/Lohikar-MoreNmFixes.yml new file mode 100644 index 00000000000..fbadaebd614 --- /dev/null +++ b/html/changelogs/Lohikar-MoreNmFixes.yml @@ -0,0 +1,5 @@ +author: Lohikar +delete-after: True +changes: + - bugfix: "Global nightmode toggle no longer affects security as was originally intended." + - tweak: "Manually turning on nightmode will prevent the automatic system from turning it off." diff --git a/nano/templates/apc.tmpl b/nano/templates/apc.tmpl index 2adb13e93b3..68b8dc129cd 100644 --- a/nano/templates/apc.tmpl +++ b/nano/templates/apc.tmpl @@ -108,7 +108,7 @@ Night Lighting: