diff --git a/code/__DEFINES/math.dm b/code/__DEFINES/math.dm
index d454c0a0676..1957cbf3de3 100644
--- a/code/__DEFINES/math.dm
+++ b/code/__DEFINES/math.dm
@@ -17,3 +17,4 @@
#define TICK_USAGE_TO_MS(starting_tickusage) (TICK_DELTA_TO_MS(world.tick_usage-starting_tickusage))
#define PERCENT(val) (round(val*100, 0.1))
+#define CLAMP01(x) (Clamp(x, 0, 1))
diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm
index b78bf5e34ba..7e339fff312 100644
--- a/code/__DEFINES/misc.dm
+++ b/code/__DEFINES/misc.dm
@@ -228,7 +228,7 @@ var/list/bloody_footprints_cache = list()
#define DYNAMIC_LIGHTING_DISABLED 0 //dynamic lighting disabled (area stays at full brightness)
#define DYNAMIC_LIGHTING_ENABLED 1 //dynamic lighting enabled
#define DYNAMIC_LIGHTING_IFSTARLIGHT 2 //dynamic lighting enabled only if starlight is.
-#define IS_DYNAMIC_LIGHTING(A) ( A.lighting_use_dynamic == DYNAMIC_LIGHTING_IFSTARLIGHT ? config.starlight : A.lighting_use_dynamic )
+#define IS_DYNAMIC_LIGHTING(A) ( A.dynamic_lighting == DYNAMIC_LIGHTING_IFSTARLIGHT ? config.starlight : A.dynamic_lighting )
//subtypesof(), typesof() without the parent path
#define subtypesof(typepath) ( typesof(typepath) - typepath )
diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm
index 0b4bf42a16b..1c09ddbe837 100644
--- a/code/__HELPERS/game.dm
+++ b/code/__HELPERS/game.dm
@@ -489,3 +489,13 @@
if (!client_or_usr)
return
winset(client_or_usr, "mainwindow", "flash=5")
+
+
+/proc/GetRedPart(const/hexa)
+ return hex2num(copytext(hexa, 2, 4))
+
+/proc/GetGreenPart(const/hexa)
+ return hex2num(copytext(hexa, 4, 6))
+
+/proc/GetBluePart(const/hexa)
+ return hex2num(copytext(hexa, 6, 8))
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index 67c49c6c738..c3d34fd9f32 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -1359,7 +1359,6 @@ proc/pick_closest_path(value, list/matches = get_fancy_list_of_atom_types())
density = 0
see_in_dark = 1e6
anchored = 1
- flags = INVULNERABLE
#define FOR_DVIEW(type, range, center, invis_flags) \
diff --git a/code/controllers/subsystem/lighting.dm b/code/controllers/subsystem/lighting.dm
index 7415fb16e59..1fbddb1adbe 100644
--- a/code/controllers/subsystem/lighting.dm
+++ b/code/controllers/subsystem/lighting.dm
@@ -73,9 +73,6 @@ var/list/lighting_update_overlays = list() // List of lighting overlays queued
return
if (resuming_stage == STAGE_SOURCES || !resumed)
- if (currentrun_corners && currentrun_corners.len)
- to_chat(world, "we still have corners to do, but we're gonna override them?")
-
currentrun_corners = lighting_update_corners
lighting_update_corners = list()
@@ -100,6 +97,9 @@ var/list/lighting_update_overlays = list() // List of lighting overlays queued
var/atom/movable/lighting_overlay/O = currentrun_overlays[currentrun_overlays.len]
currentrun_overlays.len--
+ if (qdeleted(O))
+ continue
+
O.update_overlay()
O.needs_update = FALSE
if (MC_TICK_CHECK)
diff --git a/code/datums/weather/weather.dm b/code/datums/weather/weather.dm
index 0380f3e207b..5a28f715b58 100644
--- a/code/datums/weather/weather.dm
+++ b/code/datums/weather/weather.dm
@@ -141,4 +141,4 @@
N.icon = 'icons/turf/areas.dmi'
N.layer = AREA_LAYER //Just default back to normal area stuff since I assume setting a var is faster than initial
N.invisibility = INVISIBILITY_MAXIMUM
- N.set_opacity(FALSE)
+ N.set_opacity(FALSE)
diff --git a/code/game/area/Space_Station_13_areas.dm b/code/game/area/Space_Station_13_areas.dm
index ee28b418ad1..f5a83eed625 100644
--- a/code/game/area/Space_Station_13_areas.dm
+++ b/code/game/area/Space_Station_13_areas.dm
@@ -37,7 +37,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
icon_state = "space"
requires_power = 1
always_unpowered = 1
- lighting_use_dynamic = DYNAMIC_LIGHTING_DISABLED
+ dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
power_light = 0
power_equip = 0
power_environ = 0
@@ -48,13 +48,13 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/space/nearstation
icon_state = "space_near"
- lighting_use_dynamic = DYNAMIC_LIGHTING_IFSTARLIGHT
+ dynamic_lighting = DYNAMIC_LIGHTING_IFSTARLIGHT
/area/start
name = "start area"
icon_state = "start"
requires_power = 0
- lighting_use_dynamic = DYNAMIC_LIGHTING_DISABLED
+ dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
has_gravity = 1
@@ -80,7 +80,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/asteroid/artifactroom/New()
..()
- SetDynamicLighting()
+ set_dynamic_lighting()
/area/planet/clown
name = "Clown Planet"
@@ -371,7 +371,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/solar
requires_power = 0
- lighting_use_dynamic = DYNAMIC_LIGHTING_IFSTARLIGHT
+ dynamic_lighting = DYNAMIC_LIGHTING_IFSTARLIGHT
valid_territory = 0
blob_allowed = FALSE
flags = NONE
@@ -826,22 +826,22 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/ai_monitored/turret_protected/AIsatextFP
name = "AI Sat Ext"
icon_state = "storage"
- lighting_use_dynamic = DYNAMIC_LIGHTING_IFSTARLIGHT
+ dynamic_lighting = DYNAMIC_LIGHTING_IFSTARLIGHT
/area/ai_monitored/turret_protected/AIsatextFS
name = "AI Sat Ext"
icon_state = "storage"
- lighting_use_dynamic = DYNAMIC_LIGHTING_IFSTARLIGHT
+ dynamic_lighting = DYNAMIC_LIGHTING_IFSTARLIGHT
/area/ai_monitored/turret_protected/AIsatextAS
name = "AI Sat Ext"
icon_state = "storage"
- lighting_use_dynamic = DYNAMIC_LIGHTING_IFSTARLIGHT
+ dynamic_lighting = DYNAMIC_LIGHTING_IFSTARLIGHT
/area/ai_monitored/turret_protected/AIsatextAP
name = "AI Sat Ext"
icon_state = "storage"
- lighting_use_dynamic = DYNAMIC_LIGHTING_IFSTARLIGHT
+ dynamic_lighting = DYNAMIC_LIGHTING_IFSTARLIGHT
/area/ai_monitored/turret_protected/NewAIMain
name = "AI Main New"
diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm
index d29ea014b96..04e4ac79c0a 100644
--- a/code/game/area/areas.dm
+++ b/code/game/area/areas.dm
@@ -111,8 +111,8 @@ var/list/teleportlocs = list()
power_equip = 1
power_environ = 1
- if (lighting_use_dynamic != DYNAMIC_LIGHTING_IFSTARLIGHT)
- lighting_use_dynamic = DYNAMIC_LIGHTING_DISABLED
+ if (dynamic_lighting != DYNAMIC_LIGHTING_IFSTARLIGHT)
+ dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
..()
diff --git a/code/game/area/areas/away_content.dm b/code/game/area/areas/away_content.dm
index 06e973b3475..15c97df8d73 100644
--- a/code/game/area/areas/away_content.dm
+++ b/code/game/area/areas/away_content.dm
@@ -21,14 +21,14 @@
/area/awaymission/beach
name = "Beach"
icon_state = "away"
- lighting_use_dynamic = DYNAMIC_LIGHTING_DISABLED
+ dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
requires_power = 0
has_gravity = 1
ambientsounds = list('sound/ambience/shore.ogg', 'sound/ambience/seag1.ogg','sound/ambience/seag2.ogg','sound/ambience/seag2.ogg')
/area/awaymission/errorroom
name = "Super Secret Room"
- lighting_use_dynamic = DYNAMIC_LIGHTING_DISABLED
+ dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
has_gravity = 1
@@ -37,7 +37,7 @@
/area/awaymission/research
name = "Research Outpost"
icon_state = "away"
- lighting_use_dynamic = DYNAMIC_LIGHTING_ENABLED
+ dynamic_lighting = DYNAMIC_LIGHTING_ENABLED
/area/awaymission/research/interior
name = "Research Inside"
@@ -156,13 +156,13 @@
name = "Snow Forest"
icon_state = "away"
requires_power = 0
- lighting_use_dynamic = DYNAMIC_LIGHTING_ENABLED
+ dynamic_lighting = DYNAMIC_LIGHTING_ENABLED
/area/awaymission/cabin
name = "Cabin"
icon_state = "away2"
requires_power = 1
- lighting_use_dynamic = DYNAMIC_LIGHTING_ENABLED
+ dynamic_lighting = DYNAMIC_LIGHTING_ENABLED
/area/awaymission/snowforest/lumbermill
name = "Lumbermill"
@@ -316,7 +316,7 @@
name = "Snowdin Tundra Plains"
icon_state = "away"
requires_power = 0
- lighting_use_dynamic = DYNAMIC_LIGHTING_ENABLED
+ dynamic_lighting = DYNAMIC_LIGHTING_ENABLED
/area/awaymission/snowdin/post
name = "Snowdin Outpost"
diff --git a/code/game/area/areas/holodeck.dm b/code/game/area/areas/holodeck.dm
index 5e640e207ec..e9603416db4 100644
--- a/code/game/area/areas/holodeck.dm
+++ b/code/game/area/areas/holodeck.dm
@@ -1,7 +1,7 @@
/area/holodeck
name = "Holodeck"
icon_state = "Holodeck"
- lighting_use_dynamic = DYNAMIC_LIGHTING_DISABLED
+ dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
flags = 0
var/obj/machinery/computer/holodeck/linked
diff --git a/code/game/area/areas/ruins.dm b/code/game/area/areas/ruins.dm
index 86373fcfaf7..d697c8436f7 100644
--- a/code/game/area/areas/ruins.dm
+++ b/code/game/area/areas/ruins.dm
@@ -113,7 +113,7 @@
icon_state = "space"
requires_power = 1
always_unpowered = 1
- lighting_use_dynamic = DYNAMIC_LIGHTING_DISABLED
+ dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
has_gravity = 0
power_light = 0
power_equip = 0
diff --git a/code/game/area/areas/shuttles.dm b/code/game/area/areas/shuttles.dm
index 7b50de73d61..5914dbfe947 100644
--- a/code/game/area/areas/shuttles.dm
+++ b/code/game/area/areas/shuttles.dm
@@ -4,7 +4,7 @@
/area/shuttle
name = "Shuttle"
requires_power = 0
- lighting_use_dynamic = DYNAMIC_LIGHTING_ENABLED
+ dynamic_lighting = DYNAMIC_LIGHTING_ENABLED
has_gravity = 1
always_unpowered = 0
valid_territory = 0
diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm
index be722e34b79..d297c088a94 100644
--- a/code/game/objects/items/blueprints.dm
+++ b/code/game/objects/items/blueprints.dm
@@ -212,6 +212,7 @@
var/area/old = get_area(get_turf(creator))
var/old_gravity = old.has_gravity
+ #warn TODO: doesn't change_area, probably fucked. Double check this. Damnit TG!
var/area/A
for(var/key in turfs)
if(key == str)
@@ -221,12 +222,12 @@
turfs -= key
if(A)
A.contents += turfs
- A.SetDynamicLighting()
+ A.set_dynamic_lighting()
else
A = new
A.setup(str)
A.contents += turfs
- A.SetDynamicLighting()
+ A.set_dynamic_lighting()
A.has_gravity = old_gravity
creator << "You have created a new area, named [str]. It is now weather proof, and constructing an APC will allow it to be powered."
return 1
diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm
index 69abe624adb..9ce889d1f3b 100644
--- a/code/game/objects/structures.dm
+++ b/code/game/objects/structures.dm
@@ -23,8 +23,6 @@
/obj/structure/Destroy()
if(ticker)
cameranet.updateVisibility(src)
- if(opacity)
- UpdateAffectingLights()
if(smooth)
queue_smooth_neighbors(src)
return ..()
diff --git a/code/game/turfs/simulated/floor/misc_floor.dm b/code/game/turfs/simulated/floor/misc_floor.dm
index e0bf32470fd..21ea16f5d64 100644
--- a/code/game/turfs/simulated/floor/misc_floor.dm
+++ b/code/game/turfs/simulated/floor/misc_floor.dm
@@ -201,4 +201,3 @@
for(var/obj/structure/spacevine/SV in src)
if(!qdestroying(SV))//Helps avoid recursive loops
qdel(SV)
- UpdateAffectingLights()
diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm
index 175422251ae..6cce5da60da 100644
--- a/code/game/turfs/turf.dm
+++ b/code/game/turfs/turf.dm
@@ -373,7 +373,6 @@
T0.ChangeTurf(turf_type)
- T0.redraw_lighting()
SSair.remove_from_active(T0)
T0.CalculateAdjacentTurfs()
SSair.add_to_active(T0,1)
diff --git a/code/modules/hydroponics/grown/towercap.dm b/code/modules/hydroponics/grown/towercap.dm
index 80e99cfb79c..0fc34a978a4 100644
--- a/code/modules/hydroponics/grown/towercap.dm
+++ b/code/modules/hydroponics/grown/towercap.dm
@@ -181,7 +181,7 @@
if(burning)
icon_state = "bonfire"
burning = 0
- Set_light(0)
+ set_light(0)
STOP_PROCESSING(SSobj, src)
/obj/structure/bonfire/buckle_mob(mob/living/M, force = 0)
diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm
index 20c23f2443e..441bab34cf8 100644
--- a/code/modules/hydroponics/hydroponics.dm
+++ b/code/modules/hydroponics/hydroponics.dm
@@ -151,7 +151,8 @@
// Lack of light hurts non-mushrooms
if(isturf(loc))
var/turf/currentTurf = loc
- var/lightAmt = currentTurf.lighting_lumcount
+ #warn TODO
+ var/lightAmt = 0//currentTurf.lighting_lumcount
if(myseed.get_gene(/datum/plant_gene/trait/plant_type/fungal_metabolism))
if(lightAmt < 2)
adjustHealth(-1 / rating)
diff --git a/code/modules/lighting/lighting_atom.dm b/code/modules/lighting/lighting_atom.dm
index 609ae76c235..c9f7ee9416f 100644
--- a/code/modules/lighting/lighting_atom.dm
+++ b/code/modules/lighting/lighting_atom.dm
@@ -31,7 +31,7 @@
// Creates or destroys it if needed, makes it update values, makes sure it's got the correct source turf...
/atom/proc/update_light()
set waitfor = FALSE
- if (gcDestroyed)
+ if (qdeleted(src))
return
if (!light_power || !light_range) // We won't emit light anyways, destroy the light source.
diff --git a/code/modules/lighting/lighting_overlay.dm b/code/modules/lighting/lighting_overlay.dm
index 3c4245ce1db..0d9817165b7 100644
--- a/code/modules/lighting/lighting_overlay.dm
+++ b/code/modules/lighting/lighting_overlay.dm
@@ -4,7 +4,6 @@
name = ""
anchored = TRUE
- ignoreinvert = TRUE
icon = LIGHTING_ICON
color = LIGHTING_BASE_MATRIX
@@ -38,7 +37,6 @@
if (force)
global.all_lighting_overlays -= src
global.lighting_update_overlays -= src
- global.lighting_update_overlays_old -= src
var/turf/T = loc
if (istype(T))
@@ -112,7 +110,7 @@
if(harderforce)
. = ..()
-/atom/movable/lighting_overlay/resetVariables(...)
+/atom/movable/lighting_overlay/ResetVars(...)
color = LIGHTING_BASE_MATRIX
return ..("color")
diff --git a/code/modules/lighting/lighting_setup.dm b/code/modules/lighting/lighting_setup.dm
index 49b7e225f54..80138f4bd20 100644
--- a/code/modules/lighting/lighting_setup.dm
+++ b/code/modules/lighting/lighting_setup.dm
@@ -6,11 +6,11 @@
ASSERT(zlevel)
for (var/turf/T in block(locate(1, 1, zlevel), locate(world.maxx, world.maxy, zlevel)))
- if (!LIGHTING_IS_DYNAMIC(T))
+ if (!IS_DYNAMIC_LIGHTING(T))
continue
var/area/A = T.loc
- if (!LIGHTING_IS_DYNAMIC(A))
+ if (!IS_DYNAMIC_LIGHTING(A))
continue
- PoolorNew(/atom/movable/lighting_overlay, T, TRUE)
+ PoolOrNew(/atom/movable/lighting_overlay, T, TRUE)
diff --git a/code/modules/lighting/lighting_turf.dm b/code/modules/lighting/lighting_turf.dm
index 0596671485c..57c04a4ea65 100644
--- a/code/modules/lighting/lighting_turf.dm
+++ b/code/modules/lighting/lighting_turf.dm
@@ -83,7 +83,7 @@
recalc_atom_opacity() // Make sure to do this before reconsider_lights(), incase we're on instant updates.
reconsider_lights()
-/turf/change_area(var/area/old_area, var/area/new_area)
+/turf/proc/change_area(var/area/old_area, var/area/new_area)
if (new_area.dynamic_lighting != old_area.dynamic_lighting)
if (new_area.dynamic_lighting)
lighting_build_overlay()
diff --git a/code/modules/mining/equipment.dm b/code/modules/mining/equipment.dm
index d1ebf0d5509..45f505bb044 100644
--- a/code/modules/mining/equipment.dm
+++ b/code/modules/mining/equipment.dm
@@ -586,11 +586,3 @@
charged = 1
icon_state = "mining_hammer1"
playsound(src.loc, 'sound/weapons/kenetic_reload.ogg', 60, 1)
-
-/obj/item/weapon/twohanded/required/mining_hammer/pickup(mob/user)
- ..()
- user.AddLuminosity(luminosity)
-
-/obj/item/weapon/twohanded/required/mining_hammer/dropped(mob/user)
- ..()
- user.AddLuminosity(-luminosity)
diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm
index d4c584964ec..649eb48d480 100644
--- a/code/modules/mining/mine_items.dm
+++ b/code/modules/mining/mine_items.dm
@@ -10,7 +10,7 @@
/obj/effect/light_emitter/New()
..()
- SetLuminosity(set_luminosity, set_cap)
+ set_light(set_luminosity, set_cap)
/**********************Miner Lockers**************************/
diff --git a/code/modules/mining/minebot.dm b/code/modules/mining/minebot.dm
index 9a241ec9e99..b095e5a3897 100644
--- a/code/modules/mining/minebot.dm
+++ b/code/modules/mining/minebot.dm
@@ -182,9 +182,9 @@
var/mob/living/simple_animal/hostile/mining_drone/user = owner
if(user.light_on)
- user.AddLuminosity(-6)
+ user.set_light(0)
else
- user.AddLuminosity(6)
+ user.set_light(6)
user.light_on = !user.light_on
user << "You toggle your light [user.light_on ? "on" : "off"]."
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 29965c802de..3d7e1ac23c9 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -860,7 +860,7 @@
on_fire = 1
src.visible_message("[src] catches fire!", \
"You're set on fire!")
- src.AddLuminosity(3)
+ src.set_light(3)
throw_alert("fire", /obj/screen/alert/fire)
update_fire()
return TRUE
@@ -870,7 +870,7 @@
if(on_fire)
on_fire = 0
fire_stacks = 0
- src.AddLuminosity(-3)
+ src.set_light(0)
clear_alert("fire")
update_fire()
@@ -900,7 +900,7 @@
//Mobs on Fire end
// used by secbot and monkeys Crossed
-/mob/living/proc/knockOver(var/mob/living/carbon/C)
+/mob/living/proc/knockOver(var/mob/living/carbon/C)
C.visible_message("[pick( \
"[C] dives out of [src]'s way!", \
"[C] stumbles over [src]!", \
@@ -909,4 +909,3 @@
"[C] topples over [src]!", \
"[C] leaps out of [src]'s way!")]")
C.Weaken(2)
-
\ No newline at end of file
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index 7f1f997bb09..4ed5f8b0117 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -716,7 +716,7 @@ var/list/ai_list = list()
src << "Camera lights deactivated."
for (var/obj/machinery/camera/C in lit_cameras)
- C.SetLuminosity(0)
+ C.set_light(0)
lit_cameras = list()
return
@@ -894,4 +894,4 @@ var/list/ai_list = list()
/mob/living/silicon/ai/spawned/New(loc, datum/ai_laws/L, mob/target_ai)
if(!target_ai)
target_ai = src //cheat! just give... ourselves as the spawned AI, because that's technically correct
- ..()
\ No newline at end of file
+ ..()
diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm
index 8c3d5ffaaac..9c4f25f6c18 100644
--- a/code/modules/mob/living/silicon/pai/pai.dm
+++ b/code/modules/mob/living/silicon/pai/pai.dm
@@ -71,7 +71,7 @@
canmove = FALSE
var/silent = 0
var/hit_slowdown = 0
- var/light_power = 5
+ var/brightness_power = 5
var/slowdown = 0
/mob/living/silicon/pai/movement_delay()
diff --git a/code/modules/mob/living/silicon/pai/pai_shell.dm b/code/modules/mob/living/silicon/pai/pai_shell.dm
index cab2148d475..d752c4d0791 100644
--- a/code/modules/mob/living/silicon/pai/pai_shell.dm
+++ b/code/modules/mob/living/silicon/pai/pai_shell.dm
@@ -35,7 +35,7 @@
if(client)
client.perspective = EYE_PERSPECTIVE
client.eye = src
- SetLuminosity(0)
+ set_light(0)
icon_state = "[chassis]"
visible_message("[src] folds out its holochassis emitter and forms a holoshell around itself!")
holoform = TRUE
@@ -63,7 +63,7 @@
forceMove(card)
canmove = FALSE
density = FALSE
- SetLuminosity(0)
+ set_light(0)
holoform = FALSE
if(resting)
lay_down()
@@ -95,8 +95,8 @@
/mob/living/silicon/pai/proc/toggle_integrated_light()
if(!luminosity)
- SetLuminosity(light_power)
+ set_light(brightness_power)
src << "You enable your integrated light."
else
- SetLuminosity(0)
+ set_light(0)
src << "You disable your integrated light."
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index 84471f18708..3f66938193d 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -743,7 +743,7 @@
update_headlamp()
/mob/living/silicon/robot/proc/update_headlamp(var/turn_off = 0, var/cooldown = 100)
- SetLuminosity(0)
+ set_light(0)
if(lamp_intensity && (turn_off || stat || low_power_mode))
src << "Your headlamp has been deactivated."
@@ -752,7 +752,7 @@
spawn(cooldown) //10 seconds by default, if the source of the deactivation does not keep stat that long.
lamp_recharging = 0
else
- AddLuminosity(lamp_intensity)
+ set_light(lamp_intensity)
if(lamp_button)
lamp_button.icon_state = "lamp[lamp_intensity]"
diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm
index 27858feaf3c..ac8c7a7dbc3 100644
--- a/code/modules/mob/living/simple_animal/bot/bot.dm
+++ b/code/modules/mob/living/simple_animal/bot/bot.dm
@@ -103,14 +103,14 @@
if(stat)
return 0
on = 1
- SetLuminosity(initial(luminosity))
+ set_light(initial(light_range))
update_icon()
diag_hud_set_botstat()
return 1
/mob/living/simple_animal/bot/proc/turn_off()
on = 0
- SetLuminosity(0)
+ set_light(0)
bot_reset() //Resets an AI's call, should it exist.
update_icon()
diff --git a/code/modules/mob/living/simple_animal/friendly/dog.dm b/code/modules/mob/living/simple_animal/friendly/dog.dm
index 2f2319c949a..cbfaf41cf5c 100644
--- a/code/modules/mob/living/simple_animal/friendly/dog.dm
+++ b/code/modules/mob/living/simple_animal/friendly/dog.dm
@@ -254,7 +254,7 @@
emote_hear = list("barks!", "woofs!", "yaps.","pants.")
emote_see = list("shakes its head.", "chases its tail.","shivers.")
desc = initial(desc)
- SetLuminosity(0)
+ set_light(0)
if(inventory_head && inventory_head.dog_fashion)
var/datum/dog_fashion/DF = new inventory_head.dog_fashion(src)
diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm
index a277de98424..0650ea26f0a 100644
--- a/code/modules/mob/living/simple_animal/guardian/guardian.dm
+++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm
@@ -340,10 +340,10 @@ var/global/list/parasites = list() //all currently existing/living guardians
/mob/living/simple_animal/hostile/guardian/proc/ToggleLight()
if(!luminosity)
src << "You activate your light."
- SetLuminosity(3)
+ set_light(3)
else
src << "You deactivate your light."
- SetLuminosity(0)
+ set_light(0)
/mob/living/simple_animal/hostile/guardian/verb/ShowType()
set name = "Check Guardian Type"
diff --git a/code/modules/mob/living/simple_animal/hostile/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm
index 0385cc8a7c2..df08ce95eb0 100644
--- a/code/modules/mob/living/simple_animal/hostile/statue.dm
+++ b/code/modules/mob/living/simple_animal/hostile/statue.dm
@@ -111,9 +111,10 @@
return null
// Check for darkness
var/turf/T = get_turf(loc)
- if(T && destination && T.lighting_object)
- if(T.lighting_lumcount<1 && destination.lighting_lumcount<1) // No one can see us in the darkness, right?
- return null
+ if(T && destination && T.lighting_overlay)
+ #warn double check this
+ //if(T.lighting_lumcount<1 && destination.lighting_lumcount<1) // No one can see us in the darkness, right?
+ // return null
if(T == destination)
destination = null
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 8b2a29de530..1777fbc2dc4 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -115,12 +115,14 @@ var/next_mob_id = 0
msg = blind_message
else
continue
+ #warn fix this
+ /*
else if(T.lighting_object)
if(T.lighting_object.invisibility <= M.see_invisible && !T.lighting_object.luminosity) //the light object is dark and not invisible to us
if(blind_message)
msg = blind_message
else
- continue
+ continue*/
M.show_message(msg,1,blind_message,2)
// Show a message to all mobs in earshot of this one
@@ -923,4 +925,4 @@ var/next_mob_id = 0
switch(var_name)
if ("attack_log")
return debug_variable(var_name, attack_log, 0, src, FALSE)
- . = ..()
\ No newline at end of file
+ . = ..()
diff --git a/code/modules/modular_computers/computers/machinery/modular_computer.dm b/code/modules/modular_computers/computers/machinery/modular_computer.dm
index 898ef176d46..66db36c616d 100644
--- a/code/modules/modular_computers/computers/machinery/modular_computer.dm
+++ b/code/modules/modular_computers/computers/machinery/modular_computer.dm
@@ -58,9 +58,9 @@ var/list/global_modular_computers = list()
add_overlay(screen_icon_screensaver)
else
icon_state = icon_state_unpowered
- SetLuminosity(0)
+ set_light(0)
else
- SetLuminosity(light_strength)
+ set_light(light_strength)
if(cpu.active_program)
add_overlay(cpu.active_program.program_icon_state ? cpu.active_program.program_icon_state : screen_icon_state_menu)
else
@@ -152,4 +152,4 @@ var/list/global_modular_computers = list()
// "Brute" damage mostly damages the casing.
/obj/machinery/modular_computer/bullet_act(obj/item/projectile/Proj)
if(cpu)
- cpu.bullet_act(Proj)
\ No newline at end of file
+ cpu.bullet_act(Proj)
diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm
index 3c46a653a3a..ec3abd5f2fd 100644
--- a/code/modules/power/lighting.dm
+++ b/code/modules/power/lighting.dm
@@ -238,7 +238,7 @@
update_icon()
if(on)
- if(!light || light.luminosity != brightness)
+ if(!light || light.light_range != brightness)
switchcount++
if(rigged)
if(status == LIGHT_OK && trigger)
@@ -248,10 +248,10 @@
burn_out()
else
use_power = 2
- SetLuminosity(brightness)
+ set_light(brightness)
else
use_power = 1
- SetLuminosity(0)
+ set_light(0)
active_power_usage = (brightness * 10)
if(on != on_gs)
@@ -268,7 +268,7 @@
status = LIGHT_BURNED
icon_state = "[base_state]-burned"
on = 0
- SetLuminosity(0)
+ set_light(0)
// attempt to set the light's on/off status
// will not switch on if broken/burned/empty
diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm
index 77194e6f634..1503a31a2ac 100644
--- a/code/modules/projectiles/gun.dm
+++ b/code/modules/projectiles/gun.dm
@@ -329,7 +329,7 @@
/obj/item/weapon/gun/proc/update_gunlight(mob/user = null)
if(gun_light)
if(gun_light.on)
- light_range(gun_light.brightness_on)
+ set_light(gun_light.brightness_on)
else
set_light(0)
update_icon()
diff --git a/config/admins.txt b/config/admins.txt
index 8cb97a84875..64a7ce9777e 100644
--- a/config/admins.txt
+++ b/config/admins.txt
@@ -122,3 +122,4 @@ kevinz000 = Game Master
Tacolizard = Game Master
TrustyGun = Game Master
Cyberboss = Game Master
+PJB3005 = Game Master
\ No newline at end of file
diff --git a/icons/effects/lighting_overlay.png b/icons/effects/lighting_overlay.png
new file mode 100644
index 00000000000..b317268b702
Binary files /dev/null and b/icons/effects/lighting_overlay.png differ