From b52a3915fb408a1309be87c34f4abddf53848524 Mon Sep 17 00:00:00 2001 From: paprka Date: Mon, 29 Dec 2014 04:58:53 -0800 Subject: [PATCH 1/2] Fixes shuttle windows smoothing with normal windows --- code/game/objects/structures/window.dm | 34 +++++++++++--------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index d748bdd960d..38ead2c8a7f 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -14,7 +14,7 @@ var/state = 0 var/reinf = 0 var/disassembled = 0 - var/shuttlew = 0 + var/wtype = "glass" var/fulltile = 0 var/obj/item/stack/rods/storedrods var/obj/item/weapon/shard/storedshard @@ -28,15 +28,8 @@ storedshard = new/obj/item/weapon/shard(src) ini_dir = dir if(reinf) - icon_state = "rwindow" - desc = "A reinforced window." - name = "reinforced window" state = 2*anchored - if(opacity) - icon_state = "twindow" storedrods = new/obj/item/stack/rods(src) - else - icon_state = "window" air_update_turf(1) update_nearby_icons() @@ -409,17 +402,17 @@ if(anchored) for(var/obj/structure/window/W in orange(src,1)) if(W.anchored && W.density && W.fulltile) //Only counts anchored, not-destroyed fill-tile windows. - if(abs(x-W.x)-abs(y-W.y) ) //doesn't count windows, placed diagonally to src - junction |= get_dir(src,W) - if(opacity) + if(src.wtype == W.wtype) + if(abs(x-W.x)-abs(y-W.y) ) //doesn't count windows, placed diagonally to src + junction |= get_dir(src,W) + if(istype(src, /obj/structure/window)) + icon_state = "window[junction]" + if(istype(src, /obj/structure/window/reinforced)) + icon_state = "rwindow[junction]" + if(istype(src, /obj/structure/window/reinforced/tinted)) icon_state = "twindow[junction]" - else - if(shuttlew) - icon_state = "swindow[junction]" - else if(reinf) - icon_state = "rwindow[junction]" - else - icon_state = "window[junction]" + if(istype(src, /obj/structure/window/shuttle)) + icon_state = "swindow[junction]" overlays.Cut() var/ratio = health / maxhealth @@ -467,9 +460,10 @@ /obj/structure/window/shuttle name = "shuttle window" - desc = "A strong, air-locked pod window that is extremely difficult to destroy." + desc = "A reinforced, air-locked pod window." icon_state = "swindow" dir = 5 maxhealth = 100 - shuttlew = 1 + wtype = "shuttle" fulltile = 1 + reinf = 1 \ No newline at end of file From ad5872e84f88093e5d24b42d223113c2f872d9f7 Mon Sep 17 00:00:00 2001 From: paprka Date: Fri, 2 Jan 2015 15:14:36 -0800 Subject: [PATCH 2/2] fixes window junction update to use initial icon state --- code/game/objects/structures/window.dm | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 38ead2c8a7f..84af17010e2 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -405,14 +405,7 @@ if(src.wtype == W.wtype) if(abs(x-W.x)-abs(y-W.y) ) //doesn't count windows, placed diagonally to src junction |= get_dir(src,W) - if(istype(src, /obj/structure/window)) - icon_state = "window[junction]" - if(istype(src, /obj/structure/window/reinforced)) - icon_state = "rwindow[junction]" - if(istype(src, /obj/structure/window/reinforced/tinted)) - icon_state = "twindow[junction]" - if(istype(src, /obj/structure/window/shuttle)) - icon_state = "swindow[junction]" + icon_state = "[initial(icon_state)][junction]" overlays.Cut() var/ratio = health / maxhealth