diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 7b8109f7f53..e9e671290b5 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -29,8 +29,6 @@ if(req_access && req_access.len) icon_state = "[icon_state]" base_state = icon_state - if(!color && cancolor) - color = color_windows(src) for(var/i in 1 to shards) debris += new /obj/item/shard(src) if(rods) diff --git a/code/game/objects/effects/spawners/windowspawner.dm b/code/game/objects/effects/spawners/windowspawner.dm index b9f61d049ae..77941531499 100644 --- a/code/game/objects/effects/spawners/windowspawner.dm +++ b/code/game/objects/effects/spawners/windowspawner.dm @@ -2,9 +2,9 @@ name = "window spawner" icon = 'icons/obj/structures.dmi' icon_state = "window_spawner" - var/useFull = 0 + var/useFull = 1 var/useGrille = 1 - var/windowtospawn = /obj/structure/window/basic + var/windowtospawn = /obj/structure/window/full/basic anchored = 1 // No sliding out while you prime /obj/effect/spawner/window/Initialize() @@ -38,29 +38,29 @@ // why is this line a no-op // QDEL_IN(src, 10) -/obj/effect/spawner/window/proc/sync_id(obj/structure/window/reinforced/polarized/W) +/obj/effect/spawner/window/proc/sync_id(obj/structure/window/full/reinforced/polarized/W) return /obj/effect/spawner/window/reinforced name = "reinforced window spawner" icon_state = "rwindow_spawner" - windowtospawn = /obj/structure/window/reinforced + windowtospawn = /obj/structure/window/full/reinforced /obj/effect/spawner/window/reinforced/polarized name = "polarized reinforced window spawner" icon_state = "ewindow_spawner" - windowtospawn = /obj/structure/window/reinforced/polarized + windowtospawn = /obj/structure/window/full/reinforced/polarized /// Used to link electrochromic windows to buttons var/id -/obj/effect/spawner/window/reinforced/polarized/sync_id(obj/structure/window/reinforced/polarized/W) +/obj/effect/spawner/window/reinforced/polarized/sync_id(obj/structure/window/full/reinforced/polarized/W) W.id = id /obj/effect/spawner/window/reinforced/plasma name = "reinforced plasma window spawner" icon_state = "pwindow_spawner" - windowtospawn = /obj/structure/window/plasmareinforced + windowtospawn = /obj/structure/window/full/plasmareinforced // Хоть я и сделала ниже рабочие спавнеры окон шаттлов, но по неясной мне причине, // атмос пропускает воздух через заспавненные им окна... diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 85f7cda895a..18851f3ff35 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -1,25 +1,4 @@ -GLOBAL_LIST_INIT(wcBar, pick(list("#0d8395", "#58b5c3", "#58c366", "#90d79a", "#ffffff"))) -GLOBAL_LIST_INIT(wcBrig, pick(list("#aa0808", "#7f0606", "#ff0000"))) -GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8fcf44", "#ffffff"))) -/obj/proc/color_windows(obj/W) - var/list/wcBarAreas = list(/area/crew_quarters/bar) - var/list/wcBrigAreas = list(/area/security, /area/shuttle/gamma) - - var/newcolor - var/turf/T = get_turf(W) - if(!istype(T)) - return - var/area/A = T.loc - - if(is_type_in_list(A,wcBarAreas)) - newcolor = GLOB.wcBar - else if(is_type_in_list(A,wcBrigAreas)) - newcolor = GLOB.wcBrig - else - newcolor = GLOB.wcCommon - - return newcolor /obj/structure/window name = "window" @@ -49,6 +28,8 @@ GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", var/real_explosion_block //ignore this, just use explosion_block var/breaksound = "shatter" var/hitsound = 'sound/effects/glasshit.ogg' + var/old_color + var/old_icon /obj/structure/window/examine(mob/user) . = ..() @@ -79,9 +60,6 @@ GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", ini_dir = dir - if(!color && cancolor) - color = color_windows(src) - // Precreate our own debris var/shards = 1 @@ -532,19 +510,33 @@ GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", name = "electrochromic window" desc = "Adjusts its tint with voltage. Might take a few good hits to shatter it." var/id - var/original_color - var/ispolzovano -/obj/structure/window/reinforced/polarized/proc/toggle() - if(!ispolzovano) - ispolzovano++ - original_color = color +/obj/structure/window/proc/toggle_polarization() + if(opacity) + if(!old_color) + old_color = "#FFFFFF" + animate(src, color = old_color, time = 0.5 SECONDS) + set_opacity(FALSE) + else + old_color = color + animate(src, icon = "#222222", time = 0.5 SECONDS) + set_opacity(TRUE) + +/obj/structure/window/full/proc/toggle_full_polarization() if(opacity) - animate(src, color="[original_color]", time=5) - set_opacity(0) + if(!old_icon) + old_icon = 'icons/obj/smooth_structures/reinforced_window.dmi' + animate(src, icon = old_icon, time = 0.5 SECONDS) + set_opacity(FALSE) else - animate(src, color="#222222", time=5) - set_opacity(1) + old_icon = icon + animate(src, icon = 'icons/obj/smooth_structures/tinted_window.dmi', time = 0.5 SECONDS) + set_opacity(TRUE) + +/obj/structure/window/full/reinforced/polarized + name = "electrochromic window" + desc = "Adjusts its tint with voltage. Might take a few good hits to shatter it." + var/id /obj/machinery/button/windowtint name = "window tint control" @@ -580,8 +572,15 @@ GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", for(var/obj/structure/window/reinforced/polarized/W in range(src,range)) if(W.id == src.id || !W.id) spawn(0) - W.toggle() + W.toggle_polarization() return + + for(var/obj/structure/window/full/reinforced/polarized/W in range(src,range)) + if(W.id == src.id || !W.id) + spawn(0) + W.toggle_full_polarization() + return + for(var/obj/machinery/door/airlock/G in range(src,range)) if(G.id == src.id) spawn(0) @@ -653,7 +652,23 @@ GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", max_integrity = 50 smooth = SMOOTH_TRUE cancolor = TRUE - canSmoothWith = list(/obj/structure/window/full/basic, /obj/structure/window/full/reinforced, /obj/structure/window/full/reinforced/tinted, /obj/structure/window/full/plasmabasic, /obj/structure/window/full/plasmareinforced) + canSmoothWith = list( + /obj/structure/window/full/basic, + /obj/structure/window/full/reinforced, + /obj/structure/window/full/reinforced/tinted, + /obj/structure/window/full/reinforced/polarized, + /obj/structure/window/full/plasmabasic, + /obj/structure/window/full/plasmareinforced, + /turf/simulated/wall, + /turf/simulated/wall/r_wall, + /obj/structure/falsewall, + /obj/structure/falsewall/reinforced, + /obj/structure/falsewall/clockwork, + /turf/simulated/wall/rust, + /turf/simulated/wall/r_wall/rust, + /turf/simulated/wall/r_wall/coated, + /turf/simulated/wall/indestructible/metal, + /turf/simulated/wall/indestructible/reinforced) /obj/structure/window/full/plasmabasic name = "plasma window" @@ -665,7 +680,23 @@ GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", heat_resistance = 32000 max_integrity = 300 smooth = SMOOTH_TRUE - canSmoothWith = list(/obj/structure/window/full/basic, /obj/structure/window/full/reinforced, /obj/structure/window/full/reinforced/tinted, /obj/structure/window/full/plasmabasic, /obj/structure/window/full/plasmareinforced) + canSmoothWith = list( + /obj/structure/window/full/basic, + /obj/structure/window/full/reinforced, + /obj/structure/window/full/reinforced/tinted, + /obj/structure/window/full/reinforced/polarized, + /obj/structure/window/full/plasmabasic, + /obj/structure/window/full/plasmareinforced, + /turf/simulated/wall, + /turf/simulated/wall/r_wall, + /obj/structure/falsewall, + /obj/structure/falsewall/reinforced, + /obj/structure/falsewall/clockwork, + /turf/simulated/wall/rust, + /turf/simulated/wall/r_wall/rust, + /turf/simulated/wall/r_wall/coated, + /turf/simulated/wall/indestructible/metal, + /turf/simulated/wall/indestructible/reinforced) explosion_block = 1 armor = list("melee" = 75, "bullet" = 5, "laser" = 0, "energy" = 0, "bomb" = 45, "bio" = 100, "rad" = 100, "fire" = 99, "acid" = 100) @@ -687,6 +718,23 @@ GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", shardtype = /obj/item/shard/plasma glass_type = /obj/item/stack/sheet/plasmarglass smooth = SMOOTH_TRUE + canSmoothWith = list( + /obj/structure/window/full/basic, + /obj/structure/window/full/reinforced, + /obj/structure/window/full/reinforced/tinted, + /obj/structure/window/full/reinforced/polarized, + /obj/structure/window/full/plasmabasic, + /obj/structure/window/full/plasmareinforced, + /turf/simulated/wall, + /turf/simulated/wall/r_wall, + /obj/structure/falsewall, + /obj/structure/falsewall/reinforced, + /obj/structure/falsewall/clockwork, + /turf/simulated/wall/rust, + /turf/simulated/wall/r_wall/rust, + /turf/simulated/wall/r_wall/coated, + /turf/simulated/wall/indestructible/metal, + /turf/simulated/wall/indestructible/reinforced) reinf = TRUE max_integrity = 1000 explosion_block = 2 @@ -701,7 +749,23 @@ GLOBAL_LIST_INIT(wcCommon, pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", icon = 'icons/obj/smooth_structures/reinforced_window.dmi' icon_state = "r_window" smooth = SMOOTH_TRUE - canSmoothWith = list(/obj/structure/window/full/basic, /obj/structure/window/full/reinforced, /obj/structure/window/full/reinforced/tinted, /obj/structure/window/full/plasmabasic, /obj/structure/window/full/plasmareinforced) + canSmoothWith = list( + /obj/structure/window/full/basic, + /obj/structure/window/full/reinforced, + /obj/structure/window/full/reinforced/tinted, + /obj/structure/window/full/reinforced/polarized, + /obj/structure/window/full/plasmabasic, + /obj/structure/window/full/plasmareinforced, + /turf/simulated/wall, + /turf/simulated/wall/r_wall, + /obj/structure/falsewall, + /obj/structure/falsewall/reinforced, + /obj/structure/falsewall/clockwork, + /turf/simulated/wall/rust, + /turf/simulated/wall/r_wall/rust, + /turf/simulated/wall/r_wall/coated, + /turf/simulated/wall/indestructible/metal, + /turf/simulated/wall/indestructible/reinforced) max_integrity = 100 reinf = TRUE heat_resistance = 1600 diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 896b5ac1027..f69d18b48ba 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -36,6 +36,12 @@ var/girder_type = /obj/structure/girder canSmoothWith = list( + /obj/structure/window/full/basic, + /obj/structure/window/full/reinforced, + /obj/structure/window/full/reinforced/tinted, + /obj/structure/window/full/reinforced/polarized, + /obj/structure/window/full/plasmabasic, + /obj/structure/window/full/plasmareinforced, /turf/simulated/wall, /turf/simulated/wall/r_wall, /obj/structure/falsewall, diff --git a/icons/obj/smooth_structures/plasma_window.dmi b/icons/obj/smooth_structures/plasma_window.dmi index 3d57d156f01..5daf3fa9f05 100644 Binary files a/icons/obj/smooth_structures/plasma_window.dmi and b/icons/obj/smooth_structures/plasma_window.dmi differ diff --git a/icons/obj/smooth_structures/reinforced_window.dmi b/icons/obj/smooth_structures/reinforced_window.dmi index ed9a2a143e6..0545799edbd 100644 Binary files a/icons/obj/smooth_structures/reinforced_window.dmi and b/icons/obj/smooth_structures/reinforced_window.dmi differ diff --git a/icons/obj/smooth_structures/rplasma_window.dmi b/icons/obj/smooth_structures/rplasma_window.dmi index c64f42c7f5a..dec22ef1432 100644 Binary files a/icons/obj/smooth_structures/rplasma_window.dmi and b/icons/obj/smooth_structures/rplasma_window.dmi differ diff --git a/icons/obj/smooth_structures/tinted_window.dmi b/icons/obj/smooth_structures/tinted_window.dmi index be9affafeea..a8da04a2f6c 100644 Binary files a/icons/obj/smooth_structures/tinted_window.dmi and b/icons/obj/smooth_structures/tinted_window.dmi differ diff --git a/icons/obj/smooth_structures/window.dmi b/icons/obj/smooth_structures/window.dmi index 670713bcfe0..467481fc836 100644 Binary files a/icons/obj/smooth_structures/window.dmi and b/icons/obj/smooth_structures/window.dmi differ diff --git a/icons/turf/walls/reinforced_wall.dmi b/icons/turf/walls/reinforced_wall.dmi index 13b57ef7a36..a00fa662f4f 100644 Binary files a/icons/turf/walls/reinforced_wall.dmi and b/icons/turf/walls/reinforced_wall.dmi differ diff --git a/icons/turf/walls/wall.dmi b/icons/turf/walls/wall.dmi index 9b935e7c181..108cd9ab6aa 100644 Binary files a/icons/turf/walls/wall.dmi and b/icons/turf/walls/wall.dmi differ