From 4b78bd469ba4456650d9a698139efc7d3e28e688 Mon Sep 17 00:00:00 2001 From: Aryn Date: Mon, 24 Feb 2014 03:35:07 -0700 Subject: [PATCH] Lighting code complete. --- code/WorkInProgress/Aryn/Lighting/Controller.dm | 2 +- code/WorkInProgress/Aryn/Lighting/Engine.dm | 10 +++++----- code/WorkInProgress/Aryn/Lighting/Light.dm | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/code/WorkInProgress/Aryn/Lighting/Controller.dm b/code/WorkInProgress/Aryn/Lighting/Controller.dm index da2c32128cc..92085eb9c39 100644 --- a/code/WorkInProgress/Aryn/Lighting/Controller.dm +++ b/code/WorkInProgress/Aryn/Lighting/Controller.dm @@ -71,7 +71,7 @@ var/list/lit_z_levels = list(1,5) if(x > 0 && y > 0) turfs_updated++ - if((turfs_updated % 5000) == 0) + if((turfs_updated % (total_turfs>>2)) == 0) sleep(1) world << "Progress: [round((turfs_updated/total_turfs)*100, 0.01)]% ([turfs_updated]/[total_turfs])" diff --git a/code/WorkInProgress/Aryn/Lighting/Engine.dm b/code/WorkInProgress/Aryn/Lighting/Engine.dm index 53033235727..498e84aa4fd 100644 --- a/code/WorkInProgress/Aryn/Lighting/Engine.dm +++ b/code/WorkInProgress/Aryn/Lighting/Engine.dm @@ -100,21 +100,21 @@ atom/movable/Move() if(lighting_ready()) lighting_controller.FlushIconUpdates() atom/proc/SetLight(intensity, radius) - if(lights_verbose) world << "SetLight([intensity],[radius])" + //if(lights_verbose) world << "SetLight([intensity],[radius])" if(!intensity) if(!light || !light.intensity) - if(lights_verbose) world << "Still off." + //if(lights_verbose) world << "Still off." return - if(lights_verbose) world << "Shut off light with [light.lit_turfs.len] turfs lit." + //if(lights_verbose) world << "Shut off light with [light.lit_turfs.len] turfs lit." light.Off() light.intensity = 0 if(lighting_ready()) lighting_controller.FlushIconUpdates() return if(!light) - if(lights_verbose) world << "New light." + //if(lights_verbose) world << "New light." light = new(src) if(light.intensity == intensity) - if(lights_verbose) world << "Same intensity." + //if(lights_verbose) world << "Same intensity." return light.radius = min(radius,15) light.intensity = intensity diff --git a/code/WorkInProgress/Aryn/Lighting/Light.dm b/code/WorkInProgress/Aryn/Lighting/Light.dm index 9e6113169a6..28eb733a271 100644 --- a/code/WorkInProgress/Aryn/Lighting/Light.dm +++ b/code/WorkInProgress/Aryn/Lighting/Light.dm @@ -31,18 +31,18 @@ light/New(atom/atom) src.atom = atom light/proc/Reset() - if(atom.lights_verbose) world << "light.Reset()" + //if(atom.lights_verbose) world << "light.Reset()" Off() if(intensity > 0) - if(atom.lights_verbose) world << "Restoring light." + //if(atom.lights_verbose) world << "Restoring light." for(var/turf/T in view(get_turf(atom),radius+1)) if(!T.is_outside) T.AddLight(src) lit_turfs.Add(T) - if(atom.lights_verbose) world << "[lit_turfs.len] turfs added." + //if(atom.lights_verbose) world << "[lit_turfs.len] turfs added." light/proc/Off() - if(atom.lights_verbose) world << "light.Off()" + //if(atom.lights_verbose) world << "light.Off()" for(var/turf/T in lit_turfs) T.RemoveLight(src) lit_turfs = list()