From 1d6d5d28ad89f628512ce084e7c2f14212e87a41 Mon Sep 17 00:00:00 2001 From: "elly1989@rocketmail.com" Date: Mon, 26 Nov 2012 13:46:21 +0000 Subject: [PATCH] Resolves Issue 1083 - Dynamic lighting will no longer revert custom areas back to their previous state. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5202 316c924e-a436-60f5-8080-3fe189b3f50e --- code/controllers/_DynamicAreaLighting_TG.dm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/code/controllers/_DynamicAreaLighting_TG.dm b/code/controllers/_DynamicAreaLighting_TG.dm index 2bc317aabbc..36fffedbcb0 100644 --- a/code/controllers/_DynamicAreaLighting_TG.dm +++ b/code/controllers/_DynamicAreaLighting_TG.dm @@ -243,7 +243,13 @@ turf/proc/shift_to_subarea() // change the turf's area depending on its brightness // restrict light to valid levels var/light = min(max(round(lighting_lumcount,1),0),lighting_controller.lighting_states) - var/new_tag = "[Area.type]sd_L[light]" + //var/new_tag = "[Area.type]sd_L[light]" + + var/new_tag + if(length(Area.tag) > 5) + new_tag = "[copytext(Area.tag,1,-5)]sd_L[light]" + else + new_tag = "[Area.type]sd_L[light]" if(Area.tag!=new_tag) //skip if already in this area var/area/A = locate(new_tag) // find an appropriate area