From 3c8b98a3aabf7b384acbfb4b00a13dc89e22dac8 Mon Sep 17 00:00:00 2001 From: PJB3005 Date: Wed, 8 Feb 2017 15:07:58 +0100 Subject: [PATCH] 9/11 --- code/controllers/subsystem/lighting.dm | 2 +- .../clock_cult/clock_mobs/anima_fragment.dm | 2 +- .../clock_mobs/clockwork_marauder.dm | 2 +- code/game/objects/effects/overlays.dm | 2 +- .../turfs/simulated/floor/plating/lava.dm | 1 - code/modules/client/client_procs.dm | 2 ++ code/modules/clothing/spacesuits/plasmamen.dm | 24 +++---------------- code/modules/lighting/lighting_atom.dm | 2 +- code/modules/lighting/lighting_overlay.dm | 11 +++------ code/modules/lighting/lighting_setup.dm | 2 +- code/modules/lighting/lighting_turf.dm | 4 ++-- code/modules/surgery/organs/organ_internal.dm | 6 ++--- 12 files changed, 19 insertions(+), 41 deletions(-) diff --git a/code/controllers/subsystem/lighting.dm b/code/controllers/subsystem/lighting.dm index 1fbddb1adbe..566d6a6daf2 100644 --- a/code/controllers/subsystem/lighting.dm +++ b/code/controllers/subsystem/lighting.dm @@ -97,7 +97,7 @@ 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)) + if (QDELETED(O)) continue O.update_overlay() diff --git a/code/game/gamemodes/clock_cult/clock_mobs/anima_fragment.dm b/code/game/gamemodes/clock_cult/clock_mobs/anima_fragment.dm index cbe8a089bb2..142c243ccf0 100644 --- a/code/game/gamemodes/clock_cult/clock_mobs/anima_fragment.dm +++ b/code/game/gamemodes/clock_cult/clock_mobs/anima_fragment.dm @@ -20,7 +20,7 @@ /mob/living/simple_animal/hostile/clockwork/fragment/New() ..() - SetLuminosity(2,1) + set_light(2, 0.1) if(prob(1)) name = "anime fragment" desc = "I-it's not like I want to show you the light of the Justiciar or anything, B-BAKA!" diff --git a/code/game/gamemodes/clock_cult/clock_mobs/clockwork_marauder.dm b/code/game/gamemodes/clock_cult/clock_mobs/clockwork_marauder.dm index 9b8404c7a67..ef0fb0c6efa 100644 --- a/code/game/gamemodes/clock_cult/clock_mobs/clockwork_marauder.dm +++ b/code/game/gamemodes/clock_cult/clock_mobs/clockwork_marauder.dm @@ -32,7 +32,7 @@ /mob/living/simple_animal/hostile/clockwork/marauder/New() ..() true_name = pick(possible_true_names) - SetLuminosity(2,1) + set_light(2, 0.1) /mob/living/simple_animal/hostile/clockwork/marauder/Life() ..() diff --git a/code/game/objects/effects/overlays.dm b/code/game/objects/effects/overlays.dm index f23152b6fd5..117b59002d6 100644 --- a/code/game/objects/effects/overlays.dm +++ b/code/game/objects/effects/overlays.dm @@ -325,7 +325,7 @@ damage *= multiplier duration = max(round(damage * 0.2), 1) ..() - SetLuminosity(3, 2) + set_light(3, 0.2) /obj/effect/overlay/temp/ratvar/volt_hit/true/New(loc, caster, multiplier) ..() diff --git a/code/game/turfs/simulated/floor/plating/lava.dm b/code/game/turfs/simulated/floor/plating/lava.dm index d80d3c537e8..5f5c3f0a10e 100644 --- a/code/game/turfs/simulated/floor/plating/lava.dm +++ b/code/game/turfs/simulated/floor/plating/lava.dm @@ -6,7 +6,6 @@ gender = PLURAL //"That's some lava." baseturf = /turf/open/floor/plating/lava //lava all the way down slowdown = 2 - light_range = 1 var/static/list/safeties_typecache = list(/obj/structure/lattice/catwalk) //if anything matching this typecache is found in the lava, we don't burn things diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 01480d92f2d..8b1c44f6d33 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -558,3 +558,5 @@ var/next_external_rsc = 0 CRASH("change_view called without argument.") view = new_size + if (mob.hud_used) + mob.hud_used.lighting_backdrop.update_size(new_size) diff --git a/code/modules/clothing/spacesuits/plasmamen.dm b/code/modules/clothing/spacesuits/plasmamen.dm index 359afc302f2..db715a7ee55 100644 --- a/code/modules/clothing/spacesuits/plasmamen.dm +++ b/code/modules/clothing/spacesuits/plasmamen.dm @@ -54,28 +54,10 @@ user.update_inv_head() //So the mob overlay updates if(on) - turn_on(user) + set_light(brightness_on) else - turn_off(user) + set_light(0) + for(var/X in actions) var/datum/action/A=X A.UpdateButtonIcon() - -/obj/item/clothing/head/helmet/space/plasmaman/pickup(mob/user) - ..() - if(on) - user.AddLuminosity(brightness_on) - SetLuminosity(0) - -/obj/item/clothing/head/helmet/space/plasmaman/dropped(mob/user) - ..() - if(on) - user.AddLuminosity(-brightness_on) - SetLuminosity(brightness_on) - -/obj/item/clothing/head/helmet/space/plasmaman/proc/turn_on/(mob/user) - user.AddLuminosity(brightness_on) - -/obj/item/clothing/head/helmet/space/plasmaman/proc/turn_off/(mob/user) - user.AddLuminosity(-brightness_on) - diff --git a/code/modules/lighting/lighting_atom.dm b/code/modules/lighting/lighting_atom.dm index c9f7ee9416f..cb814545cb5 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 (qdeleted(src)) + 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 0d9817165b7..716da425659 100644 --- a/code/modules/lighting/lighting_overlay.dm +++ b/code/modules/lighting/lighting_overlay.dm @@ -44,7 +44,7 @@ T.luminosity = 1 ..() - return QDEL_HINT_PUTINPOOL + return QDEL_HINT_QUEUE else return QDEL_HINT_LETMELIVE @@ -53,10 +53,10 @@ var/turf/T = loc if (!istype(T)) // Erm... if (loc) - warning("A lighting overlay realised its loc was NOT a turf (actual loc: [loc], [loc.type]) in update_overlay() and got pooled!") + warning("A lighting overlay realised its loc was NOT a turf (actual loc: [loc], [loc.type]) in update_overlay()!") else - warning("A lighting overlay realised it was in nullspace in update_overlay() and got pooled!") + warning("A lighting overlay realised it was in nullspace in update_overlay()!") qdel(src, TRUE) return @@ -109,8 +109,3 @@ /atom/movable/lighting_overlay/forceMove(atom/destination, var/no_tp=FALSE, var/harderforce = FALSE) if(harderforce) . = ..() - -/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 60aa164e3a5..60fbf288a00 100644 --- a/code/modules/lighting/lighting_setup.dm +++ b/code/modules/lighting/lighting_setup.dm @@ -13,4 +13,4 @@ if (!IS_DYNAMIC_LIGHTING(A)) continue - PoolOrNew(/atom/movable/lighting_overlay, list(T, TRUE)) + new/atom/movable/lighting_overlay(T, TRUE) diff --git a/code/modules/lighting/lighting_turf.dm b/code/modules/lighting/lighting_turf.dm index b7d786a4f07..56021808b54 100644 --- a/code/modules/lighting/lighting_turf.dm +++ b/code/modules/lighting/lighting_turf.dm @@ -37,7 +37,7 @@ if (!lighting_corners_initialised) generate_missing_corners() - PoolOrNew(/atom/movable/lighting_overlay, src) + new/atom/movable/lighting_overlay(src) for (var/datum/lighting_corner/C in corners) if (!C.active) // We would activate the corner, calculate the lighting for it. @@ -68,7 +68,7 @@ /turf/proc/is_softly_lit() if (!lighting_overlay) return FALSE - + return !lighting_overlay.luminosity // Can't think of a good name, this proc will recalculate the has_opaque_atom variable. diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index 3342ef840c5..94ca4ecbd18 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -850,11 +850,11 @@ /obj/item/organ/eyes/robotic/flashlight/Insert(var/mob/living/carbon/M, var/special = 0) ..() - M.AddLuminosity(15) + set_light(15) /obj/item/organ/eyes/robotic/flashlight/Remove(var/mob/living/carbon/M, var/special = 0) - M.AddLuminosity(-15) + set_light(-15) ..() // Welding shield implant @@ -865,4 +865,4 @@ flash_protect = 2 /obj/item/organ/eyes/robotic/shield/emp_act(severity) - return \ No newline at end of file + return