diff --git a/aurorastation.dme b/aurorastation.dme
index 501cb51e9b8..04300421cc8 100644
--- a/aurorastation.dme
+++ b/aurorastation.dme
@@ -1114,6 +1114,7 @@
#include "code\game\objects\structures\extinguisher.dm"
#include "code\game\objects\structures\fireaxe_cabinet.dm"
#include "code\game\objects\structures\flora.dm"
+#include "code\game\objects\structures\full_window_frame.dm"
#include "code\game\objects\structures\girders.dm"
#include "code\game\objects\structures\grille.dm"
#include "code\game\objects\structures\inflatable.dm"
diff --git a/code/game/objects/structures/full_window_frame.dm b/code/game/objects/structures/full_window_frame.dm
new file mode 100644
index 00000000000..fbcf304f88a
--- /dev/null
+++ b/code/game/objects/structures/full_window_frame.dm
@@ -0,0 +1,52 @@
+/obj/structure/window_frame
+ name = "window frame"
+ desc = "An empty window frame."
+ icon = 'icons/obj/smooth/full_window.dmi'
+ icon_state = "window_frame"
+ build_amt = 4
+ anchored = FALSE
+
+/obj/structure/window_frame/anchored
+ anchored = TRUE
+
+/obj/structure/window_frame/attackby(obj/item/W, mob/user)
+ if((W.isscrewdriver()) && (istype(loc, /turf/simulated) || anchored))
+ playsound(src, W.usesound, 80, 1)
+ anchored = !anchored
+ user.visible_message("[user] [anchored ? "fastens" : "unfastens"] \the [src].", \
+ "You have [anchored ? "fastened the grille to" : "unfastened the grill from"] the floor.")
+ return
+
+ else if(W.iswelder())
+ var/obj/item/weldingtool/WT = W
+ if(!WT.isOn())
+ to_chat(user, SPAN_WARNING("\The [WT] isn't turned on."))
+ return
+ if(WT.remove_fuel(0, user))
+ to_chat(user, SPAN_NOTICE("You use \the [WT] to remove \the [src]."))
+ playsound(src, WT.usesound, 80, 1)
+ new /obj/item/stack/material/steel(get_turf(src),rand(1,3))
+ qdel(src)
+ return
+
+ else if(istype(W, /obj/item/stack/material) && W.get_material_name() == MATERIAL_GLASS_REINFORCED && anchored)
+ var/obj/item/stack/material/G = W
+ if(G.use(4))
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
+ to_chat(user, SPAN_WARNING ("You place the glass on the window frame."))
+ new /obj/structure/window/full(get_turf(src))
+ qdel(src)
+ return
+ else
+ to_chat(user, SPAN_WARNING ("You need at least four sheets of reinforced glass to finished the window."))
+
+ else if(istype(W, /obj/item/stack/material) && W.get_material_name() == MATERIAL_GLASS_REINFORCED_PHORON && anchored)
+ var/obj/item/stack/material/G = W
+ if(G.use(4))
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
+ to_chat(user, SPAN_WARNING ("You place the glass on the window frame."))
+ new /obj/structure/window/full/phoron(get_turf(src))
+ qdel(src)
+ return
+ else
+ to_chat(user, SPAN_WARNING ("You need at least four sheets of reinforced borosilicate glass to finished the window."))
diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm
index 13091df3b39..17c2b50f22e 100644
--- a/code/game/objects/structures/grille.dm
+++ b/code/game/objects/structures/grille.dm
@@ -10,6 +10,7 @@
anchored = TRUE
flags = CONDUCT
explosion_resistance = 1
+ layer = 2.98
var/health = 10
var/destroyed = 0
diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm
index 6d3b4088e78..d4787b79ac9 100644
--- a/code/game/objects/structures/window.dm
+++ b/code/game/objects/structures/window.dm
@@ -19,6 +19,7 @@
var/shardtype = /obj/item/material/shard
var/glasstype = null // Set this in subtypes. Null is assumed strange or otherwise impossible to dismantle, such as for shuttle glass.
var/silicate = 0 // number of units of silicate
+ var/base_frame = null
atmos_canpass = CANPASS_PROC
@@ -45,6 +46,12 @@
else
to_chat(user, SPAN_NOTICE("There is a thick layer of silicate covering it."))
+/obj/structure/window/proc/update_nearby_icons()
+ queue_smooth_neighbors(src)
+
+/obj/structure/window/update_icon()
+ queue_smooth(src)
+
/obj/structure/window/proc/take_damage(var/damage = 0, var/sound_effect = 1)
var/initialhealth = health
@@ -102,6 +109,14 @@
new shardtype(loc) //todo pooling?
if(reinf)
new /obj/item/stack/rods(loc)
+
+ if(base_frame)
+ if(prob(50))
+ var/obj/F = new base_frame(loc)
+ F.anchored = anchored
+ else
+ new /obj/item/material/shard/shrapnel(loc)
+
qdel(src)
return
@@ -233,6 +248,7 @@
to_chat(user, (state == 1 ? SPAN_NOTICE("You have unfastened the window from the frame.") : SPAN_NOTICE("You have fastened the window to the frame.")))
else if(reinf && state == 0)
anchored = !anchored
+ update_icon()
update_nearby_icons()
playsound(loc, W.usesound, 75, 1)
to_chat(user, (anchored ? SPAN_NOTICE("You have fastened the frame to the floor.") : SPAN_NOTICE("You have unfastened the frame from the floor.")))
@@ -241,6 +257,8 @@
update_nearby_icons()
playsound(loc, W.usesound, 75, 1)
to_chat(user, (anchored ? SPAN_NOTICE("You have fastened the window to the floor.") : SPAN_NOTICE("You have unfastened the window.")))
+ update_icon()
+ update_nearby_icons()
else if(W.iscrowbar() && reinf && state <= 1)
state = 1 - state
playsound(loc, W.usesound, 75, 1)
@@ -250,12 +268,7 @@
to_chat(user, SPAN_NOTICE("You're not sure how to dismantle \the [src] properly."))
else
visible_message(SPAN_NOTICE("[user] dismantles \the [src]."))
- if(dir == SOUTHWEST)
- var/obj/item/stack/material/mats = new glasstype(loc)
- mats.amount = is_fulltile() ? 4 : 2
- else
- new glasstype(loc)
- qdel(src)
+ dismantle_window()
else
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
if(W.damtype == BRUTE || W.damtype == BURN)
@@ -300,6 +313,14 @@
take_damage(damage)
return
+/obj/structure/window/proc/dismantle_window()
+ if(dir == SOUTHWEST)
+ var/obj/item/stack/material/mats = new glasstype(loc)
+ mats.amount = is_fulltile() ? 4 : 2
+ else
+ new glasstype(loc)
+ qdel(src)
+
/obj/structure/window/Initialize(mapload, start_dir = null, constructed=0)
. = ..()
@@ -342,33 +363,6 @@
return 1
return 0
-//This proc is used to update the icons of nearby windows. It should not be confused with update_nearby_tiles(), which is an atmos proc!
-/obj/structure/window/proc/update_nearby_icons()
- update_icon()
- for(var/obj/structure/window/W in orange(src, 1))
- W.update_icon()
-
-//merges adjacent full-tile windows into one (blatant ripoff from game/smoothwall.dm)
-/obj/structure/window/update_icon()
- //A little cludge here, since I don't know how it will work with slim windows. Most likely VERY wrong.
- //this way it will only update full-tile ones
- cut_overlays()
- if(!is_fulltile())
- icon_state = "[basestate]"
- return
- var/list/dirs = list()
- if(anchored)
- for(var/obj/structure/window/W in orange(src,1))
- if(W.anchored && W.density && W.type == src.type && W.is_fulltile()) //Only counts anchored, not-destroyed fill-tile windows.
- dirs += get_dir(src, W)
-
- var/list/connections = dirs_to_corner_states(dirs)
-
- icon_state = ""
- for(var/i = 1 to 4)
- var/image/I = image(icon, "[basestate][connections[i]]", dir = 1<<(i-1))
- add_overlay(I)
-
/obj/structure/window/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > maximal_heat)
hit(damage_per_fire_tick, 0)
@@ -499,12 +493,6 @@
/obj/structure/window/shuttle/crescent/take_damage()
return
-/obj/structure/window/shuttle/update_nearby_icons()
- queue_smooth_neighbors(src)
-
-/obj/structure/window/update_icon()
- queue_smooth(src)
-
/obj/structure/window/reinforced/polarized
name = "electrochromic window"
desc = "Adjusts its tint with voltage. Might take a few good hits to shatter it."
@@ -566,3 +554,59 @@
/obj/machinery/button/switch/windowtint/update_icon()
icon_state = "light[active]"
+
+/obj/structure/window/full
+ name = "reinforced window"
+ desc = "It looks rather strong. Might take a few good hits to shatter it."
+ icon = 'icons/obj/smooth/full_window.dmi'
+ icon_state = "window_glass"
+ basestate = "window_glass"
+ maxhealth = 40
+ reinf = TRUE
+ maximal_heat = T0C + 750
+ dir = 5
+ smooth = SMOOTH_TRUE
+ damage_per_fire_tick = 2.0
+ can_be_unanchored = TRUE
+ glasstype = /obj/item/stack/material/glass/reinforced
+ layer = 2.99
+ base_frame = /obj/structure/window_frame
+
+/obj/structure/window/full/dismantle_window()
+ var/obj/item/stack/material/mats = new glasstype(loc)
+ mats.amount = 4
+ var/obj/structure/window_frame/F = new/obj/structure/window_frame (get_turf(src))
+ F.anchored = anchored
+ qdel(src)
+
+/obj/structure/window/full/phoron
+ name = "reinforced borosilicate window"
+ desc = "A borosilicate alloy window, with rods supporting it. It seems to be very strong."
+ icon = 'icons/obj/smooth/phoron_full_window.dmi'
+ icon_state = "window_glass"
+ basestate = "window_glass"
+ shardtype = /obj/item/material/shard/phoron
+ glasstype = /obj/item/stack/material/glass/phoronrglass
+ maximal_heat = T0C + 4000
+ damage_per_fire_tick = 1.0
+ maxhealth = 80.0
+ layer = 2.99
+ base_frame = /obj/structure/window_frame
+
+/obj/structure/window/reinforced/polarized/full
+ name = "reinforced electrochromic window"
+ desc = "Adjusts its tint with voltage. Might take a few good hits to shatter it."
+ icon = 'icons/obj/smooth/full_window.dmi'
+ icon_state = "window_glass"
+ basestate = "window_glass"
+ dir = 5
+ smooth = SMOOTH_TRUE
+ layer = 2.99
+ base_frame = /obj/structure/window_frame
+
+/obj/structure/window/reinforced/polarized/full/dismantle_window()
+ var/obj/item/stack/material/mats = new glasstype(loc)
+ mats.amount = 4
+ var/obj/structure/window_frame/F = new/obj/structure/window_frame (get_turf(src))
+ F.anchored = anchored
+ qdel(src)
diff --git a/code/modules/effects/map_effects/window_spawner.dm b/code/modules/effects/map_effects/window_spawner.dm
index 1d5a37f01ab..90236c4e163 100644
--- a/code/modules/effects/map_effects/window_spawner.dm
+++ b/code/modules/effects/map_effects/window_spawner.dm
@@ -5,6 +5,7 @@
var/grill_path = /obj/structure/grille
var/spawn_firedoor = FALSE
var/activated
+ var/single_window = FALSE
// stops ZAS expanding zones past us, the windows will block the zone anyway
/obj/effect/map_effect/wingrille_spawn/CanPass()
@@ -37,23 +38,26 @@
if (!locate(grill_path) in get_turf(src))
var/obj/structure/grille/G = new grill_path(src.loc)
handle_grille_spawn(G)
- var/list/neighbours = list()
- for (var/dir in cardinal)
- var/turf/T = get_step(src, dir)
- var/obj/effect/map_effect/wingrille_spawn/other = locate(/obj/effect/map_effect/wingrille_spawn) in T
- if(!other)
- var/found_connection
- if(locate(grill_path) in T)
- for(var/obj/structure/window/W in T)
- if(W.type == win_path && W.dir == get_dir(T,src))
- found_connection = 1
- qdel(W)
- if(!found_connection)
- var/obj/structure/window/new_win = new win_path(src.loc)
- new_win.set_dir(dir)
- handle_window_spawn(new_win)
- else
- neighbours |= other
+ if(!single_window)
+ var/list/neighbours = list()
+ for (var/dir in cardinal)
+ var/turf/T = get_step(src, dir)
+ var/obj/effect/map_effect/wingrille_spawn/other = locate(/obj/effect/map_effect/wingrille_spawn) in T
+ if(!other)
+ var/found_connection
+ if(locate(grill_path) in T)
+ for(var/obj/structure/window/W in T)
+ if(W.type == win_path && W.dir == get_dir(T,src))
+ found_connection = 1
+ qdel(W)
+ if(!found_connection)
+ var/obj/structure/window/new_win = new win_path(src.loc)
+ new_win.set_dir(dir)
+ handle_window_spawn(new_win)
+ else
+ neighbours |= other
+ else
+ new win_path(loc)
activated = 1
/obj/effect/map_effect/wingrille_spawn/proc/handle_window_spawn(var/obj/structure/window/W)
@@ -97,4 +101,23 @@
/obj/effect/map_effect/wingrille_spawn/reinforced/polarized/handle_window_spawn(var/obj/structure/window/reinforced/polarized/P)
if(id)
- P.id = id
\ No newline at end of file
+ P.id = id
+
+/obj/effect/map_effect/wingrille_spawn/full
+ name = "full window grille spawner"
+ icon_state = "full_window"
+ win_path = /obj/structure/window/full
+ grill_path = /obj/structure/grille
+ spawn_firedoor = TRUE
+ single_window = TRUE
+
+/obj/effect/map_effect/wingrille_spawn/full/phoron
+ icon_state = "full_phoron_window"
+ win_path = /obj/structure/window/full/phoron
+ single_window = TRUE
+
+/obj/effect/map_effect/wingrille_spawn/reinforced/polarized/full
+ name = "full polarized window grille spawner"
+ icon_state = "full_window"
+ win_path = /obj/structure/window/reinforced/polarized/full
+ single_window = TRUE
\ No newline at end of file
diff --git a/code/modules/materials/material_recipes.dm b/code/modules/materials/material_recipes.dm
index 95b2b9674f2..e01ba281b2d 100644
--- a/code/modules/materials/material_recipes.dm
+++ b/code/modules/materials/material_recipes.dm
@@ -52,6 +52,7 @@
new /datum/stack_recipe("metal rod", /obj/item/stack/rods, 1, 2, 60),
new /datum/stack_recipe("table frame", /obj/structure/table, BUILD_AMT, time = 10, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("wall girders", /obj/structure/girder, BUILD_AMT, time = 50, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("window frame", /obj/structure/window_frame, BUILD_AMT, time = 10, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("computer frame", /obj/structure/computerframe, BUILD_AMT, time = 25, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("machine blueprint", /obj/machinery/constructable_frame/machine_frame, 2, time = 25, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("light fixture frame", /obj/item/frame/light, 2),
diff --git a/html/changelogs/Alberyk-newwindows.yml b/html/changelogs/Alberyk-newwindows.yml
new file mode 100644
index 00000000000..c0128b39b57
--- /dev/null
+++ b/html/changelogs/Alberyk-newwindows.yml
@@ -0,0 +1,6 @@
+author: 50_N00b, Alberyk, Desven
+
+delete-after: True
+
+changes:
+ - rscadd: "Added a new type of full window with new sprites. It can be build by making a frame from metal sheets and then completing it with reinforced glass."
\ No newline at end of file
diff --git a/icons/effects/map_effects.dmi b/icons/effects/map_effects.dmi
index ef9246ee152..c3d0935ebeb 100644
Binary files a/icons/effects/map_effects.dmi and b/icons/effects/map_effects.dmi differ
diff --git a/icons/obj/smooth/full_window.dmi b/icons/obj/smooth/full_window.dmi
new file mode 100644
index 00000000000..1765e652a71
Binary files /dev/null and b/icons/obj/smooth/full_window.dmi differ
diff --git a/icons/obj/smooth/phoron_full_window.dmi b/icons/obj/smooth/phoron_full_window.dmi
new file mode 100644
index 00000000000..81d9fb60250
Binary files /dev/null and b/icons/obj/smooth/phoron_full_window.dmi differ