Window Rework (#13805)

This commit is contained in:
SleepyGemmy
2022-07-05 14:27:29 +02:00
committed by GitHub
parent 6121af6954
commit 005f30b76f
55 changed files with 2636 additions and 2732 deletions

View File

@@ -4,7 +4,7 @@
#define MATERIAL_PLASTEEL "plasteel"
#define MATERIAL_STEEL "steel"
#define MATERIAL_GLASS "glass"
#define MATERIAL_GLASS_REINFORCED "rglass"
#define MATERIAL_GLASS_REINFORCED "reinforced glass"
#define MATERIAL_GLASS_WIRED "wired glass"
#define MATERIAL_GLASS_PHORON "borosilicate glass"
#define MATERIAL_GLASS_REINFORCED_PHORON "reinforced borosilicate glass"

View File

@@ -152,7 +152,7 @@
name = "phoron glass"
singular_name = "phoron glass sheet"
icon_state = "sheet-phoronglass"
created_window = /obj/structure/window/phoronbasic
created_window = /obj/structure/window/borosilicate
default_type = "phoron glass"
icon_has_variants = FALSE
@@ -164,6 +164,6 @@
singular_name = "reinforced phoron glass sheet"
icon_state = "sheet-phoronrglass"
default_type = "reinforced phoron glass"
created_window = /obj/structure/window/phoronreinforced
created_window = /obj/structure/window/borosilicate/reinforced
is_reinforced = 1
icon_has_variants = FALSE

View File

@@ -191,9 +191,9 @@
*/
/obj/item/stack/tile/floor
name = "floor tile"
singular_name = "floor tile"
desc = "Used to cover up your horrible art."
name = "steel tiles"
singular_name = "steel tile"
desc = "A set of steel floor tiles."
icon_state = "tile"
force = 6
matter = list(DEFAULT_WALL_MATERIAL = TILE_MATERIAL_AMOUNT)
@@ -207,6 +207,12 @@
amount = max_amount
update_icon()
/obj/item/stack/tile/floor/full
name = "full steel tiles"
desc = "A set of full steel floor tiles."
singular_name = "full steel tile"
icon_state = "tile_full"
/obj/item/stack/tile/floor_red
name = "red floor tile"
singular_name = "red floor tile"
@@ -232,11 +238,19 @@
icon_state = "tile_white"
/obj/item/stack/tile/floor_dark
name = "dark floor tile"
singular_name = "dark floor tile"
name = "plasteel tiles"
desc = "A set of plasteel floor tiles."
singular_name = "plasteel tile"
icon_state = "fr_tile"
matter = list(MATERIAL_PLASTEEL = TILE_MATERIAL_AMOUNT)
/obj/item/stack/tile/floor_dark/full
name = "full plasteel tiles"
desc = "A set of full plasteel floor tiles."
singular_name = "full plasteel tile"
icon_state = "fr_tile_full"
matter = list(MATERIAL_PLASTEEL = TILE_MATERIAL_AMOUNT)
/obj/item/stack/tile/floor_freezer
name = "freezer floor tile"
singular_name = "freezer floor tile"

View File

@@ -219,8 +219,8 @@ RFD Construction-Class
if(istype(T, /turf/simulated/floor))
build_cost = 3
build_delay = 20
build_type = "window and grille section"
build_atom = /obj/effect/map_effect/wingrille_spawn/reinforced
build_type = "window"
build_atom = /obj/effect/map_effect/window_spawner/full/reinforced
else if(mode == RFD_AIRLOCK)
if(istype(T, /turf/simulated/floor))
build_cost = 3

View File

@@ -1,52 +1,166 @@
/obj/structure/window_frame
name = "window frame"
desc = "An empty window frame."
icon = 'icons/obj/smooth/full_window.dmi'
name = "steel window frame"
desc = "A steel window frame."
icon = 'icons/obj/smooth/full_window_frame.dmi'
icon_state = "window_frame"
build_amt = 4
anchored = FALSE
/obj/structure/window_frame/anchored
anchored = TRUE
density = TRUE
climbable = TRUE
smooth = SMOOTH_TRUE
can_be_unanchored = TRUE
canSmoothWith = list(
/turf/simulated/wall,
/turf/simulated/wall/r_wall,
/obj/structure/window_frame,
/obj/structure/window_frame/unanchored,
/obj/structure/window_frame/empty
)
var/should_check_mapload = TRUE
var/has_glass_installed = FALSE
var/glass_needed = 4
/obj/structure/window_frame/cardinal_smooth(adjacencies, var/list/dir_mods)
LAZYINITLIST(dir_mods)
var/north_wall = FALSE
var/east_wall = FALSE
var/south_wall = FALSE
var/west_wall = FALSE
if(adjacencies & N_NORTH)
var/turf/T = get_step(src, NORTH)
if(iswall(T))
dir_mods["[N_NORTH]"] = "-wall"
north_wall = TRUE
if(adjacencies & N_EAST)
var/turf/T = get_step(src, EAST)
if(iswall(T))
dir_mods["[N_EAST]"] = "-wall"
east_wall = TRUE
if(adjacencies & N_SOUTH)
var/turf/T = get_step(src, SOUTH)
if(iswall(T))
dir_mods["[N_SOUTH]"] = "-wall"
south_wall = TRUE
if(adjacencies & N_WEST)
var/turf/T = get_step(src, WEST)
if(iswall(T))
dir_mods["[N_WEST]"] = "-wall"
west_wall = TRUE
if(((adjacencies & N_NORTH) && (adjacencies & N_WEST)) && (north_wall || west_wall))
dir_mods["[N_NORTH][N_WEST]"] = "-n[north_wall ? "wall" : "win"]-w[west_wall ? "wall" : "win"]"
if(((adjacencies & N_NORTH) && (adjacencies & N_EAST)) && (north_wall || east_wall))
dir_mods["[N_NORTH][N_EAST]"] = "-n[north_wall ? "wall" : "win"]-e[east_wall ? "wall" : "win"]"
if(((adjacencies & N_SOUTH) && (adjacencies & N_WEST)) && (south_wall || west_wall))
dir_mods["[N_SOUTH][N_WEST]"] = "-s[south_wall ? "wall" : "win"]-w[west_wall ? "wall" : "win"]"
if((adjacencies & N_SOUTH) && (adjacencies & N_EAST) && (south_wall || east_wall))
dir_mods["[N_SOUTH][N_EAST]"] = "-s[south_wall ? "wall" : "win"]-e[east_wall ? "wall" : "win"]"
return ..(adjacencies, dir_mods)
/obj/structure/window_frame/proc/update_nearby_icons()
queue_smooth_neighbors(src)
/obj/structure/window_frame/update_icon()
queue_smooth(src)
/obj/structure/window_frame/Initialize(mapload) // If the window frame is mapped in, it should be considered to have glass spawned in it by a window spawner.
. = ..()
if(mapload && should_check_mapload)
has_glass_installed = TRUE
/obj/structure/window_frame/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group || (height == 0))
return TRUE
if(istype(mover, /obj/structure/closet/crate))
return TRUE
if(istype(mover) && mover.checkpass(PASSTABLE))
return TRUE
if(locate(/obj/structure/window_frame) in get_turf(mover))
return TRUE
return FALSE
/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("<span class='notice'>[user] [anchored ? "fastens" : "unfastens"] \the [src].</span>", \
"<span class='notice'>You have [anchored ? "fastened the grille to" : "unfastened the grill from"] the floor.</span>")
return
if(has_glass_installed)
to_chat(user, SPAN_NOTICE("You can't unfasten \the [src] if it has glass installed."))
return
if(anchored)
if(W.use_tool(src, user, 2 SECONDS, volume = 50))
anchored = FALSE
to_chat(user, SPAN_NOTICE("You unfasten \the [src]."))
update_icon()
update_nearby_icons()
return
else
if(W.use_tool(src, user, 2 SECONDS, volume = 50))
anchored = TRUE
to_chat(user, SPAN_NOTICE("You fasten \the [src]."))
dir = 2
update_icon()
update_nearby_icons()
return
else if(W.iswelder())
if(has_glass_installed)
to_chat(user, SPAN_NOTICE("You can't disassemble \the [src] if it has glass installed."))
return
if(anchored)
to_chat(user, SPAN_NOTICE("\The [src] needs to be unanchored to be able to be welded apart."))
return
var/obj/item/weldingtool/WT = W
if(!WT.isOn())
to_chat(user, SPAN_WARNING("\The [WT] isn't turned on."))
return
if(WT.use(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)
to_chat(user, SPAN_NOTICE("\The [WT] isn't turned on."))
return
playsound(src, 'sound/items/welder.ogg', 50, TRUE)
user.visible_message(
SPAN_WARNING("\The [user] starts welding \the [src] apart!"),
SPAN_NOTICE("You start welding \the [src] apart..."),
"You hear deconstruction."
)
if(W.use_tool(src, user, 2 SECONDS, volume = 50))
if(!src || !WT.isOn())
return
if(WT.use(0, user))
to_chat(user, SPAN_NOTICE("You use \the [WT] to weld apart \the [src]."))
playsound(src, WT.usesound, 50, 1)
new /obj/item/stack/material/steel(get_turf(src), 4)
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)
if(has_glass_installed)
to_chat(user, SPAN_NOTICE("\The [src] already has glass installed."))
return
var/obj/item/stack/material/G = W
if(do_after(user, 2 SECONDS))
if(G.use(glass_needed))
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, SPAN_NOTICE("You place the [MATERIAL_GLASS_REINFORCED] in the window frame."))
new /obj/structure/window/full/reinforced(get_turf(src), constructed = TRUE)
desc = "A steel window frame."
has_glass_installed = TRUE
return
else
to_chat(user, SPAN_WARNING ("You need at least four sheets of reinforced glass to finished the window."))
to_chat(user, SPAN_NOTICE("You need at least [glass_needed] sheets of [MATERIAL_GLASS_REINFORCED] to install a window in \the [src]."))
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)
if(has_glass_installed)
to_chat(user, SPAN_NOTICE("\The [src] already has glass installed."))
return
var/obj/item/stack/material/G = W
if(do_after(user, 2 SECONDS))
if(G.use(glass_needed))
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, SPAN_WARNING("You place the [MATERIAL_GLASS_REINFORCED_PHORON] in the window frame."))
new /obj/structure/window/full/phoron/reinforced(get_turf(src), constructed = TRUE)
desc = "A steel window frame."
has_glass_installed = TRUE
return
else
to_chat(user, SPAN_WARNING ("You need at least four sheets of reinforced borosilicate glass to finished the window."))
to_chat(user, SPAN_WARNING("You need at least [glass_needed] sheets of [MATERIAL_GLASS_REINFORCED_PHORON] to finished the window."))
/obj/structure/window_frame/unanchored // Used during in-game construction.
should_check_mapload = FALSE // No glass.
anchored = FALSE
/obj/structure/window_frame/empty
should_check_mapload = FALSE // No glass.

View File

@@ -1,20 +1,23 @@
//
// Glass
//
/obj/structure/window
name = "window"
desc = "A window."
name = "glass pane"
desc = "A glass pane."
icon = 'icons/obj/structures.dmi'
density = 1
density = TRUE
w_class = ITEMSIZE_NORMAL
layer = 3.2//Just above doors
anchored = 1.0
layer = 3.2 // Just above doors.
anchored = TRUE
flags = ON_BORDER
obj_flags = OBJ_FLAG_ROTATABLE
var/maxhealth = 14.0
var/maximal_heat = T0C + 100 // Maximal heat before this window begins taking damage from fire
var/damage_per_fire_tick = 2.0 // Amount of damage per fire tick. Regular windows are not fireproof so they might as well break quickly.
var/maxhealth = 14
var/maximal_heat = T0C + 100 // Maximal heat before this window begins taking damage from fire
var/damage_per_fire_tick = 2 // Amount of damage per fire tick. Regular windows are not fireproof so they might as well break quickly.
var/health
var/ini_dir = null
var/state = 2
var/reinf = 0
var/reinf = FALSE
var/basestate
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.
@@ -80,11 +83,11 @@
return
/obj/structure/window/proc/apply_silicate(var/amount)
if(health < maxhealth) // Mend the damage
if(health < maxhealth) // Mend the damage.
health = min(health + amount * 3, maxhealth)
if(health == maxhealth)
visible_message("[src] looks fully repaired." )
else // Reinforce
else // Reinforce.
silicate = min(silicate + amount, 100)
updateSilicate()
@@ -104,12 +107,12 @@
var/index = null
index = 0
while(index < 2)
new shardtype(loc) //todo pooling?
new shardtype(loc)
if(reinf)
new /obj/item/stack/rods(loc)
index++
else
new shardtype(loc) //todo pooling?
new shardtype(loc)
if(reinf)
new /obj/item/stack/rods(loc)
@@ -124,7 +127,6 @@
return
/obj/structure/window/bullet_act(var/obj/item/projectile/Proj)
var/proj_damage = Proj.get_structure_damage()
if(!proj_damage) return
@@ -132,25 +134,22 @@
take_damage(proj_damage)
return
/obj/structure/window/ex_act(severity)
switch(severity)
if(1.0)
if(1)
qdel(src)
return
if(2.0)
if(2)
shatter(0)
return
if(3.0)
if(3)
if(prob(50))
shatter(0)
return
else
take_damage(rand(10,30), TRUE, FALSE)
//TODO: Make full windows a separate type of window.
//Once a full window, it will always be a full window, so there's no point
//having the same type for both.
// This and relevant verbs/procs can probably be removed since full windows are a thing now. -Gem
/obj/structure/window/proc/is_full_window()
return (dir == SOUTHWEST || dir == SOUTHEAST || dir == NORTHWEST || dir == NORTHEAST)
@@ -164,7 +163,6 @@
else
return 1
/obj/structure/window/CheckExit(atom/movable/O, turf/target)
if(istype(O) && O.checkpass(PASSGLASS))
return 1
@@ -172,7 +170,6 @@
return 0
return 1
/obj/structure/window/hitby(AM as mob|obj)
..()
visible_message(SPAN_DANGER("[src] was hit by [AM]."))
@@ -324,13 +321,15 @@
new glasstype(loc)
qdel(src)
/obj/structure/window/Initialize(mapload, start_dir = null, constructed=0)
/obj/structure/window/Initialize(mapload, start_dir = null, constructed = 0)
. = ..()
//player-constructed windows
if (constructed)
anchored = 0
if (!mapload && constructed)
state = 0
if (start_dir)
set_dir(start_dir)
@@ -341,7 +340,6 @@
update_nearby_tiles(need_rebuild=1)
update_nearby_icons()
/obj/structure/window/Destroy()
density = 0
update_nearby_tiles()
@@ -360,8 +358,7 @@
set_dir(ini_dir)
update_nearby_tiles(need_rebuild=1)
//checks if this window is full-tile one
/obj/structure/window/proc/is_fulltile()
/obj/structure/window/proc/is_fulltile() // Checks if this window is a full-tile one.
if(dir & (dir - 1))
return 1
return 0
@@ -371,147 +368,52 @@
hit(damage_per_fire_tick, 0)
..()
/********** Glass and Glass Panes **********/
/obj/structure/window/basic
desc = "It looks thin and flimsy. A few knocks with... anything, really should shatter it."
name = "glass pane"
desc = "It looks thin and flimsy. A few hits with anything will shatter it."
icon_state = "window"
basestate = "window"
glasstype = /obj/item/stack/material/glass
maximal_heat = T0C + 100
damage_per_fire_tick = 2.0
maxhealth = 12.0
damage_per_fire_tick = 2
maxhealth = 12
/obj/structure/window/phoronbasic
name = "phoron window"
desc = "A borosilicate alloy window. It seems to be quite strong."
basestate = "phoronwindow"
icon_state = "phoronwindow"
shardtype = /obj/item/material/shard/phoron
glasstype = /obj/item/stack/material/glass/phoronglass
maximal_heat = T0C + 2000
damage_per_fire_tick = 1.0
maxhealth = 40.0
/obj/structure/window/phoronreinforced
name = "reinforced borosilicate window"
desc = "A borosilicate alloy window, with rods supporting it. It seems to be very strong."
basestate = "phoronrwindow"
icon_state = "phoronrwindow"
shardtype = /obj/item/material/shard/phoron
glasstype = /obj/item/stack/material/glass/phoronrglass
reinf = 1
maximal_heat = T0C + 4000
damage_per_fire_tick = 1.0 // This should last for 80 fire ticks if the window is not damaged at all. The idea is that borosilicate windows have something like ablative layer that protects them for a while.
maxhealth = 80.0
/obj/structure/window/phoronreinforced/skrell
name = "advanced borosilicate-alloy window"
desc = "A window made out of a higly advanced borosilicate alloy. It seems to be extremely strong."
basestate = "phoronwindow"
icon_state = "phoronwindow"
maxhealth = 250
/obj/structure/window/basic/full
name = "glass"
icon_state = "window"
dir = 5
/obj/structure/window/reinforced
name = "reinforced window"
name = "reinforced glass pane"
desc = "It looks rather strong. Might take a few good hits to shatter it."
icon_state = "rwindow"
basestate = "rwindow"
maxhealth = 40.0
reinf = 1
maxhealth = 40
reinf = TRUE
maximal_heat = T0C + 750
damage_per_fire_tick = 2.0
damage_per_fire_tick = 2
glasstype = /obj/item/stack/material/glass/reinforced
/obj/structure/window/Initialize(mapload, constructed = 0)
. = ..()
//player-constructed windows
if (!mapload && constructed)
state = 0
/obj/structure/window/reinforced/full
dir = 5
icon_state = "fwindow"
name = "reinforced glass"
icon_state = "rwindow"
dir = 5
/obj/structure/window/reinforced/tinted
name = "tinted window"
name = "reinforced tinted glass pane"
desc = "It looks rather strong and opaque. Might take a few good hits to shatter it."
icon_state = "twindow"
basestate = "twindow"
opacity = 1
/obj/structure/window/reinforced/tinted/frosted
name = "frosted window"
name = "reinforced frosted glass pane"
desc = "It looks rather strong and frosted over. Looks like it might take a few less hits then a normal reinforced window."
icon_state = "fwindow"
basestate = "fwindow"
maxhealth = 30
/obj/structure/window/shuttle
name = "shuttle window"
desc = "It looks rather strong. Might take a few good hits to shatter it."
icon = 'icons/obj/smooth/shuttle_window.dmi'
icon_state = "shuttle_window"
basestate = "window"
maxhealth = 40
reinf = 1
basestate = "w"
dir = 5
smooth = SMOOTH_TRUE
can_be_unanchored = TRUE
layer = 2.99
/obj/structure/window/shuttle/legion
name = "cockpit window"
icon = 'icons/obj/smooth/shuttle_window_legion.dmi'
health = 160
maxhealth = 160
/obj/structure/window/shuttle/palepurple
icon = 'icons/obj/smooth/shuttle_window_palepurple.dmi'
/obj/structure/window/shuttle/skrell
name = "advanced borosilicate alloy window"
desc = "It looks extremely strong. Might take many good hits to crack it."
icon = 'icons/obj/smooth/skrell_window_purple.dmi'
health = 500
maxhealth = 500
smooth = SMOOTH_MORE|SMOOTH_DIAGONAL
canSmoothWith = list(
/turf/simulated/wall/shuttle/skrell,
/obj/structure/window/shuttle/skrell
)
/obj/structure/window/shuttle/scc_space_ship
name = "window"
desc = "It looks extremely strong. Might take many good hits to crack it."
icon = 'icons/obj/smooth/scc_space_ship.dmi'
icon_state = "scc_space_ship"
health = 500
maxhealth = 500
smooth = SMOOTH_MORE|SMOOTH_DIAGONAL
canSmoothWith = list(
/obj/structure/window/shuttle/scc_space_ship
)
/obj/structure/window/shuttle/scc_space_ship/cardinal
smooth = SMOOTH_MORE
/obj/structure/window/shuttle/scc
icon = 'icons/obj/smooth/scc_shuttle_window.dmi'
health = 160
maxhealth = 160
/obj/structure/window/shuttle/crescent
desc = "It looks rather strong."
/obj/structure/window/shuttle/crescent/take_damage()
return
/obj/structure/window/reinforced/polarized
name = "electrochromic window"
name = "reinforced electrochromic glass pane"
desc = "Adjusts its tint with voltage. Might take a few good hits to shatter it."
var/id
@@ -529,7 +431,7 @@
/obj/structure/window/reinforced/crescent/attackby()
return
/obj/structure/window/reinforced/crescent/ex_act(var/severity = 2.0)
/obj/structure/window/reinforced/crescent/ex_act(var/severity = 2)
return
/obj/structure/window/reinforced/crescent/hitby()
@@ -546,9 +448,12 @@
desc = "A remote control switch for polarized windows."
var/range = 16
/obj/machinery/button/switch/windowtint/update_icon()
icon_state = "light[active]"
/obj/machinery/button/switch/windowtint/attack_hand(mob/user as mob)
if(..())
return 1
return TRUE
toggle_tint()
@@ -558,42 +463,129 @@
active = !active
update_icon()
for(var/obj/structure/window/reinforced/polarized/W in range(src,range))
if (W.id == src.id || !W.id)
spawn(0)
W.toggle()
return
for(var/obj/structure/window/reinforced/polarized/W in range(src, range))
if(W.id == src.id || !W.id)
W.toggle()
for(var/obj/structure/window/full/reinforced/polarized/W in range(src, range))
if(W.id == src.id || !W.id)
W.toggle()
/obj/machinery/button/switch/windowtint/power_change()
..()
if(active && !powered(power_channel))
toggle_tint()
/obj/machinery/button/switch/windowtint/update_icon()
icon_state = "light[active]"
/obj/structure/window/borosilicate
name = "borosilicate glass pane"
desc = "A borosilicate alloy window. It seems to be quite strong."
basestate = "phoronwindow"
icon_state = "phoronwindow"
shardtype = /obj/item/material/shard/phoron
glasstype = /obj/item/stack/material/glass/phoronglass
maximal_heat = T0C + 2000
damage_per_fire_tick = 1 // This should last for 80 fire ticks if the window is not damaged at all. The idea is that borosilicate windows have something like ablative layer that protects them for a while.
maxhealth = 40
/obj/structure/window/full
name = "reinforced window"
/obj/structure/window/borosilicate/reinforced
name = "reinforced borosilicate glass pane"
desc = "A borosilicate alloy window, with rods supporting it. It seems to be very strong."
basestate = "phoronrwindow"
icon_state = "phoronrwindow"
glasstype = /obj/item/stack/material/glass/phoronrglass
reinf = TRUE
maximal_heat = T0C + 4000
maxhealth = 80
/obj/structure/window/borosilicate/reinforced/skrell
name = "advanced borosilicate alloy window"
desc = "A window made out of a higly advanced borosilicate alloy. It seems to be extremely strong."
basestate = "phoronwindow"
icon_state = "phoronwindow"
maxhealth = 250
/********** Shuttle Windows **********/
/obj/structure/window/shuttle
name = "reinforced shuttle 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"
icon = 'icons/obj/smooth/shuttle_window.dmi'
icon_state = "shuttle_window"
basestate = "window"
maxhealth = 40
reinf = TRUE
maximal_heat = T0C + 750
basestate = "w"
dir = 5
damage_per_fire_tick = 2.0
smooth = SMOOTH_TRUE
can_be_unanchored = TRUE
glasstype = /obj/item/stack/material/glass/reinforced
layer = 2.99
/obj/structure/window/shuttle/legion
name = "reinforced cockpit window"
icon = 'icons/obj/smooth/shuttle_window_legion.dmi'
health = 160
maxhealth = 160
/obj/structure/window/shuttle/palepurple
icon = 'icons/obj/smooth/shuttle_window_palepurple.dmi'
/obj/structure/window/shuttle/skrell
name = "advanced borosilicate alloy window"
desc = "It looks extremely strong. Might take many good hits to crack it."
icon = 'icons/obj/smooth/skrell_window_purple.dmi'
health = 500
maxhealth = 500
smooth = SMOOTH_MORE | SMOOTH_DIAGONAL
canSmoothWith = list(
/turf/simulated/wall/shuttle/skrell,
/obj/structure/window/shuttle/skrell
)
/obj/structure/window/shuttle/scc_space_ship
name = "advanced borosilicate alloy window"
desc = "It looks extremely strong. Might take many good hits to crack it."
icon = 'icons/obj/smooth/scc_space_ship.dmi'
icon_state = "scc_space_ship"
health = 500
maxhealth = 500
smooth = SMOOTH_MORE | SMOOTH_DIAGONAL
canSmoothWith = list(
/obj/structure/window/shuttle/scc_space_ship,
/turf/simulated/wall/shuttle/scc_space_ship
)
/obj/structure/window/shuttle/scc_space_ship/cardinal
smooth = SMOOTH_MORE
/obj/structure/window/shuttle/scc
icon = 'icons/obj/smooth/scc_shuttle_window.dmi'
health = 160
maxhealth = 160
/obj/structure/window/shuttle/crescent
desc = "It looks rather strong."
/obj/structure/window/shuttle/crescent/take_damage()
return
//
// Full Windows
//
/obj/structure/window/full
name = "window"
desc = "You aren't supposed to see this."
obj_flags = null
dir = 5
maxhealth = 28 // Two glass panes worth of health, since that's the minimum you need to break through to get to the other side.
glasstype = /obj/item/stack/material/glass
shardtype = /obj/item/material/shard
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)
smooth = SMOOTH_TRUE
canSmoothWith = list(
/obj/structure/window/full/reinforced,
/obj/structure/window/full/reinforced/polarized,
/obj/structure/window/full/phoron/reinforced
)
/obj/structure/window/full/cardinal_smooth(adjacencies, var/list/dir_mods)
LAZYINITLIST(dir_mods)
@@ -631,34 +623,222 @@
dir_mods["[N_SOUTH][N_EAST]"] = "-s[south_wall ? "wall" : "win"]-e[east_wall ? "wall" : "win"]"
return ..(adjacencies, dir_mods)
/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/full/Initialize(mapload, start_dir = null, constructed = 0)
if (!mapload && constructed)
state = 0
/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."
if (start_dir)
set_dir(start_dir)
health = maxhealth
ini_dir = dir
update_nearby_tiles(need_rebuild=1)
update_icon()
update_nearby_icons()
/obj/structure/window/full/Destroy()
var/obj/structure/window_frame/WF = locate(/obj/structure/window_frame) in get_turf(src)
WF.has_glass_installed = FALSE
return ..()
/obj/structure/window/full/attackby(obj/item/W, mob/user)
if(!istype(W) || istype(W, /obj/item/flag))
return
if(istype(W, /obj/item/grab) && get_dist(src,user)<2)
var/obj/item/grab/G = W
if(istype(G.affecting,/mob/living))
grab_smash_attack(G, BRUTE)
return
if(W.flags & NOBLUDGEON)
return
if(W.isscrewdriver())
if(state == 2)
if(W.use_tool(src, user, 2 SECONDS, volume = 50))
to_chat(user, SPAN_NOTICE("You have unfastened the glass from the window frame."))
state--
update_nearby_icons()
else if(state == 1)
if(W.use_tool(src, user, 2 SECONDS, volume = 50))
to_chat(user, SPAN_NOTICE("You have fastened the glass to the window frame."))
state++
update_nearby_icons()
else if(W.iscrowbar())
if(state == 1)
if(W.use_tool(src, user, 2 SECONDS, volume = 50))
to_chat(user, SPAN_NOTICE("You pry the glass out of the window frame."))
state--
update_nearby_icons()
else if(state == 0)
if(W.use_tool(src, user, 2 SECONDS, volume = 50))
to_chat(user, SPAN_NOTICE("You pry the glass into the window frame."))
state++
update_nearby_icons()
else if(W.iswrench())
if(state == 0)
visible_message(SPAN_WARNING("\The [user] is dismantling \the [src]!"))
if(W.use_tool(src, user, 2 SECONDS, volume = 50))
to_chat(user, SPAN_NOTICE("You undo the safety bolts and remove the glass from \the [src]."))
dismantle_window()
else
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
if(W.damtype == BRUTE || W.damtype == BURN)
user.do_attack_animation(src)
hit(W.force)
else
playsound(loc, 'sound/effects/glass_hit.ogg', 75, 1)
return
/obj/structure/window/full/shatter(var/display_message = 1)
playsound(src, /decl/sound_category/glass_break_sound, 70, 1)
if(display_message)
visible_message(SPAN_WARNING("\The [src] shatters!"))
if(dir == SOUTHWEST)
var/index = null
index = 0
while(index < 2)
new shardtype(loc)
if(reinf)
new /obj/item/stack/rods(loc)
index++
else
new shardtype(loc)
if(reinf)
new /obj/item/stack/rods(loc)
qdel(src)
return
/obj/structure/window/full/take_damage(var/damage = 0, var/sound_effect = 1)
var/initialhealth = health
if(silicate)
damage = damage * (1 - silicate / 200)
health = max(0, health - damage)
if(health <= 0)
shatter()
else
if(sound_effect)
playsound(loc, 'sound/effects/glass_hit.ogg', 100, 1)
if(health < maxhealth / 4 && initialhealth >= maxhealth / 4)
visible_message(SPAN_DANGER("[src] looks like it's about to shatter!"))
playsound(loc, /decl/sound_category/glasscrack_sound, 100, 1)
else if(health < maxhealth / 2 && initialhealth >= maxhealth / 2)
visible_message(SPAN_WARNING("[src] looks seriously damaged!"))
playsound(loc, /decl/sound_category/glasscrack_sound, 100, 1)
else if(health < maxhealth * 3/4 && initialhealth >= maxhealth * 3/4)
visible_message(SPAN_WARNING("Cracks begin to appear in [src]!"))
playsound(loc, /decl/sound_category/glasscrack_sound, 100, 1)
return
/obj/structure/window/full/dismantle_window()
var/obj/item/stack/material/mats = new glasstype(loc)
mats.amount = 4
var/obj/structure/window_frame/WF = locate(/obj/structure/window_frame) in get_turf(src)
if(istype(WF))
WF.has_glass_installed = FALSE
WF.desc = "An empty steel window frame."
qdel(src)
update_nearby_icons()
/********** Full Windows **********/
// Reinforced Window
/obj/structure/window/full/reinforced
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"
dir = 5
smooth = SMOOTH_TRUE
maxhealth = 80 // Two reinforced panes worth of health, since that's the minimum you need to break through to get to the other side.
reinf = TRUE
maximal_heat = T0C + 750
glasstype = /obj/item/stack/material/glass/reinforced
layer = 2.99
base_frame = /obj/structure/window_frame
smooth = SMOOTH_TRUE
canSmoothWith = list(
/turf/simulated/wall,
/turf/simulated/wall/r_wall,
/obj/structure/window/full/reinforced,
/obj/structure/window/full/reinforced/polarized,
/obj/structure/window/full/phoron/reinforced
)
/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)
// Indestructible Reinforced Window
/obj/structure/window/full/reinforced/indestructible/attack_hand()
return
/obj/structure/window/full/reinforced/indestructible/attackby()
return
/obj/structure/window/full/reinforced/indestructible/ex_act(var/severity = 2)
return
/obj/structure/window/full/reinforced/indestructible/hitby()
return
/obj/structure/window/full/reinforced/indestructible/take_damage()
return
/obj/structure/window/full/reinforced/indestructible/shatter()
return
// Reinforced Polarized Window
/obj/structure/window/full/reinforced/polarized
name = "reinforced electrochromic window"
desc = "Adjusts its tint with voltage. Might take a few good hits to shatter it."
var/id
/obj/structure/window/full/reinforced/polarized/proc/toggle()
if(opacity)
animate(src, color="#FFFFFF", time = 1 SECOND)
set_opacity(FALSE)
else
animate(src, color="#606060", time = 1 SECOND)
set_opacity(TRUE)
// Indestructible Reinforced Polarized Window
/obj/structure/window/full/reinforced/polarized/indestructible/attack_hand()
return
/obj/structure/window/full/reinforced/polarized/indestructible/attackby()
return
/obj/structure/window/full/reinforced/polarized/indestructible/ex_act(var/severity = 2)
return
/obj/structure/window/full/reinforced/polarized/indestructible/hitby()
return
/obj/structure/window/full/reinforced/polarized/indestructible/take_damage()
return
/obj/structure/window/full/reinforced/polarized/indestructible/shatter()
return
// Borosilicate Window (I.e. Phoron Window)
/obj/structure/window/full/phoron
name = "borosilicate window"
desc = "You aren't supposed to see this."
icon = 'icons/obj/smooth/full_window_phoron.dmi'
icon_state = "window_glass"
basestate = "window_glass"
glasstype = /obj/item/stack/material/glass/phoronglass
shardtype = /obj/item/material/shard/phoron
maxhealth = 80 // Two borosilicate glass panes worth of health, since that's the minimum you need to break through to get to the other side.
maximal_heat = T0C + 2000
damage_per_fire_tick = 1
// Reinforced Borosilicate Window (I.e. Reinforced Phoron Window)
/obj/structure/window/full/phoron/reinforced
name = "reinforced borosilicate window"
desc = "A borosilicate alloy window, with rods supporting it. It seems to be very strong."
glasstype = /obj/item/stack/material/glass/phoronrglass
maxhealth = 160 // Two reinforced borosilicate glass panes worth of health, since that's the minimum you need to break through to get to the other side.
reinf = TRUE
maximal_heat = T0C + 4000

View File

@@ -85,8 +85,8 @@
build_type = /obj/item/stack/tile/carpet_art
/decl/flooring/tiling
name = "floor"
desc = "Scuffed from the passage of countless greyshirts."
name = "steel tiles"
desc = "A set of steel floor tiles."
icon = 'icons/turf/flooring/tiles.dmi'
icon_base = "steel"
has_damage_range = 4
@@ -96,6 +96,12 @@
can_paint = 1
footstep_sound = /decl/sound_category/tiles_footstep
/decl/flooring/tiling/full
name = "full steel tiles"
desc = "A full steel floor tile."
icon_base = "steel_full"
build_type = /obj/item/stack/tile/floor/full
/decl/flooring/tiling/asteroid
name = "floor"
icon = 'icons/turf/total_floors.dmi'
@@ -179,13 +185,19 @@
build_type = /obj/item/stack/tile/floor_yellow
/decl/flooring/tiling/dark
name = "floor"
desc = "How ominous."
name = "plasteel tiles"
desc = "A set of plasteel floor tiles."
icon_base = "dark"
has_damage_range = null
flags = TURF_REMOVE_CROWBAR
build_type = /obj/item/stack/tile/floor_dark
/decl/flooring/tiling/dark/full
name = "full plasteel tile"
desc = "A full plasteel floor tile."
icon_base = "dark_full"
build_type = /obj/item/stack/tile/floor_dark/full
/decl/flooring/tiling/freezer
name = "floor"
desc = "Don't slip."

View File

@@ -59,11 +59,16 @@
initial_flooring = /decl/flooring/grass/alt
/turf/simulated/floor/tiled
name = "floor"
name = "steel tiles"
icon = 'icons/turf/flooring/tiles.dmi'
icon_state = "steel"
initial_flooring = /decl/flooring/tiling
/turf/simulated/floor/tiled/full
name = "full steel tile"
icon_state = "steel_full"
initial_flooring = /decl/flooring/tiling/full
/turf/simulated/floor/reinforced
name = "reinforced floor"
icon = 'icons/turf/flooring/tiles.dmi'
@@ -128,7 +133,7 @@
return
/turf/simulated/floor/tiled/dark
name = "dark floor"
name = "plasteel tiles"
icon_state = "dark"
initial_flooring = /decl/flooring/tiling/dark
@@ -136,6 +141,11 @@
oxygen = 0
nitrogen = 0
/turf/simulated/floor/tiled/dark/full
name = "full plasteel tile"
icon_state = "dark_full"
initial_flooring = /decl/flooring/tiling/dark/full
/turf/simulated/floor/tiled/red
name = "red floor"
color = COLOR_RED_GRAY

View File

@@ -124,7 +124,8 @@
/turf/simulated/wall/shuttle/scc_space_ship/cardinal
smooth = SMOOTH_MORE
canSmoothWith = list(
/turf/simulated/wall/shuttle/scc_space_ship
/turf/simulated/wall/shuttle/scc_space_ship,
/obj/structure/window/shuttle/scc_space_ship
)
/obj/structure/shuttle_part/scc_space_ship

View File

@@ -10,7 +10,16 @@
blocks_air = TRUE
thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT
heat_capacity = 312500 //a little over 5 cm thick , 312500 for 1 m by 2.5 m by 0.25 m plasteel wall
canSmoothWith = list(/turf/simulated/wall, /turf/simulated/wall/r_wall, /obj/structure/window/full, /obj/structure/window/full/phoron)
canSmoothWith = list(
/turf/simulated/wall,
/turf/simulated/wall/r_wall,
/obj/structure/window/full/reinforced,
/obj/structure/window/full/phoron/reinforced,
/obj/structure/window/full/reinforced/polarized,
/obj/structure/window_frame,
/obj/structure/window_frame/unanchored,
/obj/structure/window_frame/empty
)
var/damage = 0
var/damage_overlay = 0
@@ -255,4 +264,4 @@
D.ignite(temperature/4)
/turf/simulated/wall/is_wall()
return TRUE
return TRUE

View File

@@ -1,27 +1,33 @@
/obj/effect/map_effect/wingrille_spawn
name = "window grille spawner"
icon_state = "wingrille"
var/win_path = /obj/structure/window/basic
var/grill_path = /obj/structure/grille
//
// Window Spawner
//
/obj/effect/map_effect/window_spawner
name = "window spawner"
icon = 'icons/effects/map_effects.dmi'
var/window_path = /obj/structure/window/basic
var/frame_path = /obj/structure/window_frame
var/grille_path = /obj/structure/grille
var/firedoor_path = /obj/machinery/door/firedoor
var/single_window = FALSE // For full window panes and full windows.
var/spawn_frame = FALSE // For full windows.
var/spawn_grille = FALSE // For electrified windows.
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()
return 0
/obj/effect/map_effect/window_spawner/CanPass() // Stops ZAS expanding zones past us, the windows will block the zone anyway.
return FALSE
/obj/effect/map_effect/wingrille_spawn/attack_hand()
/obj/effect/map_effect/window_spawner/attack_hand()
attack_generic()
/obj/effect/map_effect/wingrille_spawn/attack_ghost()
/obj/effect/map_effect/window_spawner/attack_ghost()
attack_generic()
/obj/effect/map_effect/wingrille_spawn/attack_generic()
/obj/effect/map_effect/window_spawner/attack_generic()
activate()
/obj/effect/map_effect/wingrille_spawn/Initialize(mapload)
if (!win_path)
/obj/effect/map_effect/window_spawner/Initialize(mapload)
if (!window_path)
return INITIALIZE_HINT_QDEL
..()
@@ -30,94 +36,174 @@
return INITIALIZE_HINT_LATEQDEL
/obj/effect/map_effect/wingrille_spawn/proc/activate()
/obj/effect/map_effect/window_spawner/proc/activate()
if(activated)
return
if(spawn_frame)
new frame_path(loc)
if(spawn_grille)
new grille_path(loc)
if(spawn_firedoor)
new /obj/machinery/door/firedoor(loc)
if (!locate(grill_path) in get_turf(src))
var/obj/structure/grille/G = new grill_path(src.loc)
handle_grille_spawn(G)
new firedoor_path(loc)
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
var/obj/effect/map_effect/window_spawner/other = locate(/obj/effect/map_effect/window_spawner) in T
if(!other)
var/found_connection
if(locate(grill_path) in T)
if(locate(grille_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
if(W.type == window_path && W.dir == get_dir(T,src))
found_connection = TRUE
qdel(W)
if(!found_connection)
var/obj/structure/window/new_win = new win_path(src.loc)
var/obj/structure/window/new_win = new window_path(src.loc)
new_win.set_dir(dir)
handle_window_spawn(new_win)
else
neighbours |= other
else
new win_path(loc)
activated = 1
var/obj/structure/window/W = new window_path(loc)
handle_full_window_spawn(W)
activated = TRUE
/obj/effect/map_effect/wingrille_spawn/proc/handle_window_spawn(var/obj/structure/window/W)
/obj/effect/map_effect/window_spawner/proc/handle_window_spawn(var/obj/structure/window/W)
return
// Currently unused, could be useful for pre-wired electrified windows.
/obj/effect/map_effect/wingrille_spawn/proc/handle_grille_spawn(var/obj/structure/grille/G)
/obj/effect/map_effect/window_spawner/proc/handle_full_window_spawn(var/obj/structure/window/full/W)
return
/obj/effect/map_effect/wingrille_spawn/reinforced
/obj/effect/map_effect/window_spawner/proc/handle_grille_spawn(var/obj/structure/grille/G)
return
/********** Quarter Windows **********/
/obj/effect/map_effect/window_spawner/basic
name = "window grille spawner"
icon_state = "window-g"
window_path = /obj/structure/window/basic
spawn_grille = TRUE
/obj/effect/map_effect/window_spawner/reinforced
name = "reinforced window grille spawner"
icon_state = "r-wingrille"
win_path = /obj/structure/window/reinforced
icon_state = "rwindow-g"
window_path = /obj/structure/window/reinforced
spawn_grille = TRUE
/obj/effect/map_effect/wingrille_spawn/reinforced/firedoor
/obj/effect/map_effect/window_spawner/reinforced/firedoor
name = "reinforced window grille spawner with firedoor"
icon_state = "rwindow-gf"
spawn_firedoor = TRUE
/obj/effect/map_effect/wingrille_spawn/reinforced/crescent
name = "Crescent window grille spawner"
win_path = /obj/structure/window/reinforced/crescent
grill_path = /obj/structure/grille/crescent
/obj/effect/map_effect/window_spawner/reinforced/crescent
name = "crescent window grille spawner"
window_path = /obj/structure/window/reinforced/crescent
grille_path = /obj/structure/grille/crescent
/obj/effect/map_effect/wingrille_spawn/phoron
name = "phoron window grille spawner"
icon_state = "p-wingrille"
win_path = /obj/structure/window/phoronbasic
/obj/effect/map_effect/window_spawner/borosilicate
name = "borosilicate window grille spawner"
icon_state = "pwindow-g"
window_path = /obj/structure/window/borosilicate
spawn_grille = TRUE
/obj/effect/map_effect/wingrille_spawn/reinforced_phoron
name = "reinforced phoron window grille spawner"
icon_state = "pr-wingrille"
win_path = /obj/structure/window/phoronreinforced
/obj/effect/map_effect/window_spawner/borosilicate/reinforced
name = "reinforced borosilicate window grille spawner"
icon_state = "prwindow-g"
window_path = /obj/structure/window/borosilicate/reinforced
spawn_grille = TRUE
/obj/effect/map_effect/wingrille_spawn/reinforced_phoron/firedoor
/obj/effect/map_effect/window_spawner/borosilicate/reinforced/firedoor
name = "reinforced borosilicate window grille spawner with firedoor"
icon_state = "prwindow-gf"
spawn_firedoor = TRUE
/obj/effect/map_effect/wingrille_spawn/reinforced/polarized
name = "polarized window grille spawner"
color = "#444444"
win_path = /obj/structure/window/reinforced/polarized
/obj/effect/map_effect/window_spawner/reinforced/polarized
name = "polarized reinforced window grille spawner"
color = "#222222"
window_path = /obj/structure/window/reinforced/polarized
var/id
/obj/effect/map_effect/wingrille_spawn/reinforced/polarized/handle_window_spawn(var/obj/structure/window/reinforced/polarized/P)
/obj/effect/map_effect/window_spawner/reinforced/polarized/handle_window_spawn(var/obj/structure/window/reinforced/polarized/W)
if(id)
P.id = id
W.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
/********** Full Windows **********/
// Window
/obj/effect/map_effect/window_spawner/full // Unused.
name = "unused"
icon_state = null
single_window = TRUE
spawn_frame = TRUE
// Reinforced Window
/obj/effect/map_effect/window_spawner/full/reinforced
name = "full reinforced window spawner"
icon_state = "full_rwindow"
window_path = /obj/structure/window/full/reinforced
/obj/effect/map_effect/window_spawner/full/reinforced/grille
name = "full reinforced window spawner with grille"
icon_state = "full_rwindow-g"
spawn_grille = TRUE
/obj/effect/map_effect/window_spawner/full/reinforced/firedoor
name = "full reinforced window spawner with firedoor"
icon_state = "full_rwindow-f"
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/window_spawner/full/reinforced/grille/firedoor
name = "full reinforced window spawner with grille and firedoor"
icon_state = "full_rwindow-gf"
spawn_firedoor = 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
/obj/effect/map_effect/window_spawner/full/reinforced/indestructible
name = "indestructible reinforced window spawner"
icon_state = "full_i_rwindow"
window_path = /obj/structure/window/full/reinforced/indestructible
// Reinforced Polarized Window
/obj/effect/map_effect/window_spawner/full/reinforced/polarized
name = "full reinforced polarized window spawner"
icon_state = "full_p_rwindow"
window_path = /obj/structure/window/full/reinforced/polarized
var/id
/obj/effect/map_effect/window_spawner/full/reinforced/polarized/handle_full_window_spawn(var/obj/structure/window/full/reinforced/polarized/W)
if(id)
W.id = id
/obj/effect/map_effect/window_spawner/full/reinforced/polarized/grille
name = "full reinforced polarized window spawner with grille"
icon_state = "full_p_rwindow-g"
spawn_grille = TRUE
/obj/effect/map_effect/window_spawner/full/reinforced/polarized/firedoor
name = "full reinforced polarized window spawner with firedoor"
icon_state = "full_p_rwindow-f"
spawn_firedoor = TRUE
/obj/effect/map_effect/window_spawner/full/reinforced/polarized/grille/firedoor
name = "full reinforced polarized window spawner with grille and firedoor"
icon_state = "full_p_rwindow-gf"
spawn_firedoor = TRUE
/obj/effect/map_effect/window_spawner/full/reinforced/polarized/indestructible
name = "indestructible reinforced polarized window spawner"
icon_state = "full_ip_rwindow"
window_path = /obj/structure/window/full/reinforced/polarized/indestructible
// Borosilicate Window
/obj/effect/map_effect/window_spawner/full/borosilicate // Unused.
name = "unused"
icon_state = null
// Reinforced Borosilicate Window
/obj/effect/map_effect/window_spawner/full/borosilicate/reinforced
name = "full reinforced borosilicate window spawner"
icon_state = "full_brwindow"
window_path = /obj/structure/window/full/phoron/reinforced
/obj/effect/map_effect/window_spawner/full/borosilicate/reinforced/firedoor
name = "full reinforced borosilicate window spawner with firedoor"
icon_state = "full_brwindow-f"
spawn_firedoor = TRUE

View File

@@ -49,10 +49,11 @@
recipes += new /datum/stack_recipe_list("construction recipes",
list(
new /datum/stack_recipe("regular floor tile", /obj/item/stack/tile/floor, 1, 4, 20),
new /datum/stack_recipe("full regular floor tile", /obj/item/stack/tile/floor/full, 1, 4, 20),
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("steel window frame", /obj/structure/window_frame/unanchored, BUILD_AMT, time = 25, 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),
@@ -66,7 +67,7 @@
list(
new /datum/stack_recipe("key", /obj/item/key, 1, time = 10, one_per_turf = 0, on_floor = 1),
new /datum/stack_recipe("custodial cart", /obj/structure/janitorialcart, BUILD_AMT, time = 120, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("closet", /obj/structure/closet, BUILD_AMT, time = 15, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("steel closet", /obj/structure/closet, BUILD_AMT, time = 15, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 10, time = 15, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("target stake", /obj/structure/target_stake, BUILD_AMT, time = 15, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("shooting target", /obj/item/target, 5, time = 10, one_per_turf = 0, on_floor = 1),
@@ -76,7 +77,8 @@
new /datum/stack_recipe("sofa (middle)", /obj/structure/bed/stool/chair/sofa, BUILD_AMT, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("sofa (left)", /obj/structure/bed/stool/chair/sofa/left, BUILD_AMT, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("sofa (right)", /obj/structure/bed/stool/chair/sofa/right, BUILD_AMT, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("sofa (corner)", /obj/structure/bed/stool/chair/sofa/corner, BUILD_AMT, one_per_turf = 1, on_floor = 1)
new /datum/stack_recipe("sofa (corner)", /obj/structure/bed/stool/chair/sofa/corner, BUILD_AMT, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("steel crate", /obj/structure/closet/crate, BUILD_AMT, time = 50, one_per_turf = 1)
))
recipes += new /datum/stack_recipe_list("airlock assemblies",
@@ -129,16 +131,16 @@
recipes += new /datum/stack_recipe_list("[display_name] recipes",
list(
new /datum/stack_recipe("AI core", /obj/structure/AIcore, BUILD_AMT, time = 50, one_per_turf = 1),
new /datum/stack_recipe("Metal crate", /obj/structure/closet/crate, BUILD_AMT, time = 50, one_per_turf = 1),,,
new /datum/stack_recipe("knife grip", /obj/item/material/butterflyhandle, 4, time = 20, one_per_turf = 0, on_floor = 1, supplied_material = "[name]"),
new /datum/stack_recipe("dark floor tile", /obj/item/stack/tile/floor_dark, 1, 4, 20)
new /datum/stack_recipe("dark floor tile", /obj/item/stack/tile/floor_dark, 1, 4, 20),
new /datum/stack_recipe("full dark floor tile", /obj/item/stack/tile/floor_dark/full, 1, 4, 20)
))
/material/plastic/generate_recipes()
..()
recipes += new /datum/stack_recipe_list("[display_name] recipes",
list(
new /datum/stack_recipe("rack", /obj/structure/table/rack, BUILD_AMT, time = 5, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("plastic rack", /obj/structure/table/rack, BUILD_AMT, time = 5, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("plastic crate", /obj/structure/closet/crate/plastic, BUILD_AMT, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("plastic bag", /obj/item/storage/bag/plasticbag, 3, on_floor = 1),
new /datum/stack_recipe("blood pack", /obj/item/reagent_containers/blood/empty, 4, on_floor = 0),
@@ -294,4 +296,4 @@
list(
new /datum/stack_recipe("leather briefcase", /obj/item/storage/briefcase/real, 4, 1, time = 20),
new /datum/stack_recipe("leather whip", /obj/item/melee/whip, 15, 1, time = 20)
))
))

View File

@@ -418,7 +418,7 @@
melting_point = 6000
icon_base = "solid"
icon_reinf = "reinf_over"
icon_colour = "#777777"
icon_colour = "#666666"
explosion_resistance = 25
hardness = 80
weight = 23
@@ -585,7 +585,7 @@
integrity = 100
icon_colour = "#FC2BC5"
stack_origin_tech = list(TECH_MATERIAL = 4)
created_window = /obj/structure/window/phoronbasic
created_window = /obj/structure/window/borosilicate
wire_product = null
rod_product = /obj/item/stack/material/glass/phoronrglass
golem = SPECIES_GOLEM_PHORON
@@ -596,7 +596,7 @@
stack_type = /obj/item/stack/material/glass/phoronrglass
stack_origin_tech = list(TECH_MATERIAL = 5)
composite_material = list() //todo
created_window = /obj/structure/window/phoronreinforced
created_window = /obj/structure/window/borosilicate/reinforced
hardness = 40
weight = 30
stack_origin_tech = list(TECH_MATERIAL = 2)

View File

@@ -433,7 +433,7 @@
move_delay = 1 + world.time
var/turf/T = get_step(use_mob, direct)
for(var/obj/structure/window/W in T)
if(istype(W, /obj/structure/window/phoronbasic) || istype(W, /obj/structure/window/phoronreinforced))
if(istype(W, /obj/structure/window/borosilicate) || istype(W, /obj/structure/window/borosilicate/reinforced))
if(W.is_full_window())
to_chat(src, SPAN_WARNING("\The [W] obstructs your movement!"))
return

View File

@@ -1,5 +1,5 @@
/obj/structure/window/New()
..()
/obj/structure/window/New(loc, start_dir = null, constructed = 0)
..(loc, start_dir, constructed)
for(var/obj/structure/table/T in view(src, 1))
T.update_connections()
T.update_icon()
@@ -19,4 +19,4 @@
if(loc != oldloc)
for(var/obj/structure/table/T in view(oldloc, 1) | view(loc, 1))
T.update_connections()
T.update_icon()
T.update_icon()