Minor Nightmode Fixes (#1305)

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."
This commit is contained in:
Lohikar
2016-12-25 17:42:40 -06:00
committed by skull132
parent 4f32cc1231
commit 7375af6c19
6 changed files with 18 additions and 3 deletions
@@ -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)
+1 -1
View File
@@ -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))