diff --git a/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm b/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm
index 145248966bc..bd1fb3145b3 100644
--- a/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm
+++ b/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm
@@ -1242,7 +1242,7 @@
"axT" = (/obj/effect/spawner/window/reinforced,/obj/structure/cable/yellow,/obj/structure/cable/yellow{d2 = 4; icon_state = "0-4"},/turf/simulated/floor/plating,/area/maintenance/fore)
"axU" = (/obj/effect/spawner/window/reinforced,/obj/structure/cable/yellow,/obj/structure/cable/yellow{d2 = 8; icon_state = "0-8"},/turf/simulated/floor/plating,/area/maintenance/fore)
"axV" = (/obj/structure/cable/yellow{d1 = 1; d2 = 4; icon_state = "1-4"},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 9},/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{dir = 2; initialize_directions = 11},/turf/simulated/floor/plasteel,/area/crew_quarters/fitness{name = "\improper Recreation Area"})
-"axW" = (/obj/structure/grille,/obj/structure/window/reinforced/tinted{dir = 5; health = 120; icon_state = "twindow"; reinf = 0},/turf/simulated/floor/plating,/area/security/main)
+"axW" = (/obj/structure/grille,/obj/structure/window/reinforced/tinted{dir = 5; max_integrity = 120; reinf = 0},/turf/simulated/floor/plating,/area/security/main)
"axX" = (/obj/machinery/conveyor{dir = 4; id = "QMLoad"},/obj/machinery/door/poddoor{id_tag = "QMLoaddoor"; name = "supply dock loading door"},/turf/simulated/floor/plating,/area/quartermaster/storage)
"axY" = (/obj/machinery/cryopod/right,/turf/simulated/floor/plasteel{icon_state = "dark"},/area/crew_quarters/fitness{name = "\improper Recreation Area"})
"axZ" = (/obj/machinery/door/poddoor/shutters{dir = 2; id_tag = "supplybridge"},/turf/simulated/floor/plating{tag = "icon-warnplate (SOUTHEAST)"; icon_state = "warnplate"; dir = 6},/area/maintenance/fpmaint2{name = "Port Maintenance"})
@@ -1277,7 +1277,7 @@
"ayC" = (/obj/structure/stool/bed/chair{dir = 4},/turf/simulated/floor/plating,/area/hallway/secondary/entry{name = "Arrivals"})
"ayD" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/structure/disposalpipe/segment,/turf/simulated/floor/plating,/area/maintenance/fpmaint2{name = "Port Maintenance"})
"ayE" = (/obj/structure/cable/yellow{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/structure/disposalpipe/segment{dir = 1; icon_state = "pipe-c"},/turf/simulated/floor/plating,/area/maintenance/fpmaint2{name = "Port Maintenance"})
-"ayF" = (/obj/structure/grille,/obj/structure/window/reinforced/tinted{dir = 5; health = 120; icon_state = "twindow"; reinf = 0},/obj/structure/disposalpipe/segment{dir = 4},/turf/simulated/floor/plating,/area/maintenance/fore)
+"ayF" = (/obj/structure/grille,/obj/structure/window/reinforced/tinted{dir = 5; max_integrity = 120; reinf = 0},/obj/structure/disposalpipe/segment{dir = 4},/turf/simulated/floor/plating,/area/maintenance/fore)
"ayG" = (/obj/structure/disposalpipe/segment,/turf/simulated/floor/plating,/area/maintenance/fore)
"ayH" = (/obj/structure/disposalpipe/junction{tag = "icon-pipe-j2 (NORTH)"; icon_state = "pipe-j2"; dir = 1},/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/structure/cable/yellow{d1 = 1; d2 = 2; icon_state = "1-2"},/turf/simulated/floor/plating,/area/maintenance/fore)
"ayI" = (/obj/structure/rack{dir = 8; layer = 2.9},/obj/item/clothing/shoes/magboots,/obj/item/clothing/suit/space/hardsuit/engineering,/obj/item/clothing/mask/breath,/obj/item/clothing/head/helmet/space/hardsuit/engineering,/turf/simulated/floor/plasteel{dir = 8; icon_state = "warning"},/area/engine/engineering)
@@ -1495,9 +1495,9 @@
"aCM" = (/obj/effect/spawner/window/reinforced,/obj/structure/cable/yellow{d2 = 8; icon_state = "0-8"},/turf/simulated/floor/plating,/area/engine/engineering)
"aCN" = (/obj/structure/disposalpipe/segment{dir = 8; icon_state = "pipe-c"},/turf/simulated/floor/plasteel{icon_state = "floorgrime"},/area/quartermaster/sorting{name = "\improper Warehouse"})
"aCO" = (/turf/simulated/wall/r_wall,/area/security/detectives_office)
-"aCP" = (/obj/structure/grille,/obj/structure/cable/yellow{d2 = 2; icon_state = "0-2"},/obj/structure/window/reinforced/tinted{dir = 5; health = 120; icon_state = "twindow"; reinf = 0},/turf/simulated/floor/plating,/area/security/detectives_office)
+"aCP" = (/obj/structure/grille,/obj/structure/cable/yellow{d2 = 2; icon_state = "0-2"},/obj/structure/window/reinforced/tinted{dir = 5; max_integrity = 120; reinf = 0},/turf/simulated/floor/plating,/area/security/detectives_office)
"aCQ" = (/obj/structure/cable/yellow{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/door/firedoor,/obj/machinery/door/airlock/security{name = "Detective's Office"; req_access = null; req_access_txt = "4"},/obj/machinery/atmospherics/pipe/simple/hidden/supply{req_access_txt = 1},/turf/simulated/floor/plasteel,/area/security/detectives_office)
-"aCR" = (/obj/structure/grille,/obj/structure/cable/yellow{d2 = 2; icon_state = "0-2"},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/structure/window/reinforced/tinted{dir = 5; health = 120; icon_state = "twindow"; reinf = 0},/turf/simulated/floor/plating,/area/security/detectives_office)
+"aCR" = (/obj/structure/grille,/obj/structure/cable/yellow{d2 = 2; icon_state = "0-2"},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/structure/window/reinforced/tinted{dir = 5; max_integrity = 120; reinf = 0},/turf/simulated/floor/plating,/area/security/detectives_office)
"aCS" = (/turf/simulated/wall,/area/security/detectives_office)
"aCT" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/structure/disposalpipe/segment{dir = 4},/obj/structure/cable/yellow{d1 = 4; d2 = 8; icon_state = "4-8"},/obj/machinery/light/small,/turf/simulated/floor/plasteel{icon_state = "whitered"},/area/security/brig)
"aCU" = (/obj/machinery/light/small{dir = 1},/obj/machinery/atmospherics/unary/vent_scrubber{dir = 8; on = 1; scrub_N2O = 0; scrub_Toxins = 0},/obj/machinery/alarm{pixel_y = 26},/turf/simulated/floor/plasteel{icon_state = "freezerfloor"},/area/crew_quarters/locker/locker_toilet{name = "\improper Restrooms"})
@@ -2285,7 +2285,7 @@
"aRW" = (/obj/structure/cable/yellow{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 9; pixel_y = 0},/obj/structure/disposalpipe/junction{icon_state = "pipe-j1"; dir = 4},/turf/simulated/floor/plasteel{dir = 1; icon_state = "neutralcorner"},/area/crew_quarters/locker)
"aRX" = (/obj/machinery/atmospherics/unary/vent_scrubber{dir = 2; on = 1; scrub_N2O = 0; scrub_Toxins = 0},/obj/structure/disposalpipe/segment{dir = 8; icon_state = "pipe-c"},/turf/simulated/floor/plasteel,/area/crew_quarters/locker)
"aRY" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/navbeacon{codes_txt = "patrol;next_patrol=14.5-Recreation"; location = "14.3-Lockers-Dorms"},/turf/simulated/floor/plasteel{dir = 4; icon_state = "neutralcorner"},/area/crew_quarters/locker)
-"aRZ" = (/obj/structure/grille,/obj/structure/window/reinforced/tinted{dir = 5; health = 120; icon_state = "twindow"; reinf = 0},/turf/simulated/floor/plating,/area/hallway/secondary/construction{name = "\improper Garden"})
+"aRZ" = (/obj/structure/grille,/obj/structure/window/reinforced/tinted{dir = 5; max_integrity = 120; reinf = 0},/turf/simulated/floor/plating,/area/hallway/secondary/construction{name = "\improper Garden"})
"aSa" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/floor/plasteel{icon_state = "neutral"; dir = 8},/area/hallway/secondary/construction{name = "\improper Garden"})
"aSb" = (/obj/machinery/hydroponics/soil,/turf/simulated/floor/plasteel{icon_state = "bot"},/area/hallway/secondary/construction{name = "\improper Garden"})
"aSc" = (/turf/simulated/floor/plasteel{icon_state = "neutral"; dir = 4},/area/hallway/secondary/construction{name = "\improper Garden"})
@@ -2419,7 +2419,7 @@
"aUA" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 5},/turf/simulated/floor/plasteel{icon_state = "floorgrime"},/area/crew_quarters/locker)
"aUB" = (/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{dir = 4; initialize_directions = 11},/turf/simulated/floor/plasteel,/area/crew_quarters/locker)
"aUC" = (/obj/structure/rack,/obj/item/storage/toolbox/mechanical{pixel_x = -2; pixel_y = -1},/obj/item/storage/toolbox/mechanical{pixel_x = 4; pixel_y = -4},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 6},/turf/simulated/floor/plasteel{dir = 2; icon_state = "neutralcorner"},/area/crew_quarters/locker)
-"aUD" = (/obj/structure/grille,/obj/structure/window/reinforced/tinted{dir = 5; health = 120; icon_state = "twindow"; reinf = 0},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor/plating,/area/hallway/secondary/construction{name = "\improper Garden"})
+"aUD" = (/obj/structure/grille,/obj/structure/window/reinforced/tinted{dir = 5; max_integrity = 120; reinf = 0},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor/plating,/area/hallway/secondary/construction{name = "\improper Garden"})
"aUE" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 10},/turf/simulated/floor/plasteel{icon_state = "neutral"; dir = 8},/area/hallway/secondary/construction{name = "\improper Garden"})
"aUF" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0; tag = ""},/obj/structure/cable{d1 = 1; d2 = 4; icon_state = "1-4"; tag = "90Curve"},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 10},/obj/structure/cable{d1 = 1; d2 = 8; icon_state = "1-8"; tag = ""},/turf/simulated/floor/plasteel{dir = 1; icon_state = "warning"},/area/engine/engineering)
"aUG" = (/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 8},/turf/simulated/floor/grass,/area/hallway/secondary/construction{name = "\improper Garden"})
@@ -2470,7 +2470,7 @@
"aVz" = (/obj/item/radio/intercom{broadcasting = 1; frequency = 1447; name = "Private AI Channel"; pixel_y = -25},/obj/machinery/camera/motion{c_tag = "AI Upload Chamber - Starboard"; dir = 1; network = list("SS13","RD","AIUpload")},/turf/simulated/floor/bluegrid,/area/turret_protected/ai_upload)
"aVA" = (/obj/structure/table,/obj/machinery/light{dir = 4},/obj/machinery/status_display{density = 0; layer = 4; pixel_x = 32; pixel_y = 0},/obj/machinery/flasher{id = "AI"; pixel_x = 0; pixel_y = -24},/obj/item/aiModule/protectStation,/turf/simulated/floor/plasteel{icon_state = "dark"},/area/turret_protected/ai_upload)
"aVB" = (/obj/machinery/light{icon_state = "tube1"; dir = 8},/obj/structure/extinguisher_cabinet{pixel_x = -27; pixel_y = 0},/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{dir = 8; initialize_directions = 11},/turf/simulated/floor/plasteel{dir = 8; icon_state = "redcorner"},/area/hallway/primary/fore)
-"aVC" = (/obj/structure/grille,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/obj/structure/window/reinforced/tinted{dir = 5; health = 120; icon_state = "twindow"; reinf = 0},/turf/simulated/floor/plating,/area/crew_quarters/courtroom)
+"aVC" = (/obj/structure/grille,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/obj/structure/window/reinforced/tinted{dir = 5; max_integrity = 120; reinf = 0},/turf/simulated/floor/plating,/area/crew_quarters/courtroom)
"aVD" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 10},/obj/machinery/vending/cigarette,/turf/simulated/floor/plasteel{icon_state = "dark"},/area/crew_quarters/courtroom)
"aVE" = (/obj/structure/stool/bed/chair{dir = 1},/turf/simulated/floor/plasteel{icon_state = "dark"},/area/crew_quarters/courtroom)
"aVF" = (/obj/structure/stool/bed/chair{dir = 1},/obj/machinery/atmospherics/pipe/simple/hidden/supply{req_access_txt = 1},/turf/simulated/floor/plasteel{icon_state = "dark"},/area/crew_quarters/courtroom)
@@ -2624,7 +2624,7 @@
"aYx" = (/obj/effect/spawner/window/reinforced,/turf/simulated/floor/plating,/area/hallway/primary/central)
"aYy" = (/obj/machinery/door/airlock/highsecurity{icon_state = "door_closed"; locked = 0; name = "AI Upload"; req_access_txt = "16"},/obj/structure/cable/yellow{d1 = 1; d2 = 2; icon_state = "1-2"},/turf/simulated/floor/plasteel{icon_state = "dark"},/area/turret_protected/ai_upload)
"aYz" = (/obj/structure/cable/yellow{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/structure/cable/yellow{d1 = 2; d2 = 8; icon_state = "2-8"},/turf/simulated/floor/plasteel,/area/hallway/primary/fore)
-"aYA" = (/obj/structure/grille,/obj/structure/window/reinforced/tinted{dir = 5; health = 120; icon_state = "twindow"; reinf = 0},/turf/simulated/floor/plating,/area/crew_quarters/courtroom)
+"aYA" = (/obj/structure/grille,/obj/structure/window/reinforced/tinted{dir = 5; max_integrity = 120; reinf = 0},/turf/simulated/floor/plating,/area/crew_quarters/courtroom)
"aYB" = (/obj/machinery/atmospherics/unary/vent_scrubber{dir = 1; on = 1; scrub_N2O = 0; scrub_Toxins = 0},/turf/simulated/floor/plasteel{icon_state = "dark"},/area/crew_quarters/courtroom)
"aYC" = (/obj/structure/extinguisher_cabinet{pixel_x = 5; pixel_y = -32},/turf/simulated/floor/plasteel{icon_state = "dark"},/area/crew_quarters/courtroom)
"aYD" = (/obj/item/radio/intercom{frequency = 1459; name = "Station Intercom (General)"; pixel_x = 0; pixel_y = -26},/turf/simulated/floor/plasteel{icon_state = "dark"},/area/crew_quarters/courtroom)
@@ -2661,8 +2661,8 @@
"aZi" = (/obj/structure/sign/pods,/turf/simulated/wall,/area/hallway/secondary/entry{name = "Arrivals"})
"aZj" = (/obj/machinery/door/airlock/external{name = "Escape Pod One"},/turf/simulated/floor/plating,/area/hallway/secondary/entry{name = "Arrivals"})
"aZk" = (/obj/machinery/door/airlock/engineering{name = "Arrivals Expansion Area"; req_access_txt = "32"},/turf/simulated/floor/plating,/area/hallway/secondary/entry{name = "Arrivals"})
-"aZl" = (/obj/structure/grille,/obj/structure/window/reinforced/tinted{dir = 5; health = 120; icon_state = "twindow"; reinf = 0},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/floor/plating,/area/hallway/secondary/entry{name = "Arrivals"})
-"aZm" = (/obj/structure/grille,/obj/structure/window/reinforced/tinted{dir = 5; health = 120; icon_state = "twindow"; reinf = 0},/turf/simulated/floor/plating,/area/hallway/secondary/entry{name = "Arrivals"})
+"aZl" = (/obj/structure/grille,/obj/structure/window/reinforced/tinted{dir = 5; max_integrity = 120; reinf = 0},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/floor/plating,/area/hallway/secondary/entry{name = "Arrivals"})
+"aZm" = (/obj/structure/grille,/obj/structure/window/reinforced/tinted{dir = 5; max_integrity = 120; reinf = 0},/turf/simulated/floor/plating,/area/hallway/secondary/entry{name = "Arrivals"})
"aZn" = (/obj/structure/cable/yellow{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/door/airlock/engineering{name = "Arrivals Expansion Area"; req_access_txt = "32"},/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/floor/plating,/area/hallway/secondary/entry{name = "Arrivals"})
"aZo" = (/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{dir = 8; initialize_directions = 11},/obj/structure/cable/yellow{d1 = 2; d2 = 8; icon_state = "2-8"},/turf/simulated/floor/plasteel,/area/engine/break_room)
"aZp" = (/turf/space,/turf/simulated/shuttle/wall{tag = "icon-swall_f5"; icon_state = "swall_f5"; dir = 2},/area/shuttle/supply)
@@ -4461,7 +4461,7 @@
"bHO" = (/obj/structure/stool{pixel_y = 8},/turf/simulated/floor/plasteel{icon_state = "bar"},/area/crew_quarters/bar)
"bHP" = (/obj/machinery/hologram/holopad,/turf/simulated/floor/plasteel{icon_state = "bar"},/area/crew_quarters/bar)
"bHQ" = (/obj/structure/stool{pixel_y = 8},/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/effect/landmark/start{name = "Civilian"},/turf/simulated/floor/plasteel{icon_state = "bar"},/area/crew_quarters/bar)
-"bHR" = (/obj/structure/grille,/obj/structure/window/reinforced/tinted{dir = 5; health = 120; icon_state = "twindow"; reinf = 0},/turf/simulated/floor/plating,/area/crew_quarters/bar)
+"bHR" = (/obj/structure/grille,/obj/structure/window/reinforced/tinted{dir = 5; max_integrity = 120; reinf = 0},/turf/simulated/floor/plating,/area/crew_quarters/bar)
"bHS" = (/obj/structure/cable/yellow{d1 = 1; d2 = 2; icon_state = "1-2"},/turf/simulated/floor/wood,/area/crew_quarters/bar)
"bHT" = (/obj/machinery/atmospherics/pipe/manifold/hidden/supply{dir = 2},/turf/simulated/floor/wood,/area/crew_quarters/bar)
"bHU" = (/obj/structure/window/reinforced{dir = 8},/turf/simulated/floor/carpet,/area/crew_quarters/theatre)
@@ -6878,9 +6878,9 @@
"cCn" = (/obj/structure/stool/bed/chair{dir = 1},/obj/machinery/light,/turf/simulated/floor/plasteel{dir = 2; icon_state = "whiteblue"},/area/medical/reception)
"cCo" = (/obj/structure/disposalpipe/trunk{dir = 1},/obj/machinery/disposal,/obj/machinery/firealarm{dir = 1; pixel_y = -24},/turf/simulated/floor/plasteel{dir = 2; icon_state = "whiteblue"},/area/medical/reception)
"cCp" = (/obj/machinery/atmospherics/pipe/manifold/hidden/supply{dir = 8},/obj/item/radio/intercom{frequency = 1459; name = "Station Intercom (General)"; pixel_x = -29},/obj/structure/disposalpipe/segment{dir = 1; icon_state = "pipe-c"},/turf/simulated/floor/plasteel{dir = 8; icon_state = "bluecorner"},/area/hallway/primary/aft)
-"cCq" = (/obj/structure/flora/ausbushes/fernybush,/obj/structure/flora/ausbushes/fullgrass,/obj/structure/flora/ausbushes/ppflowers,/obj/structure/flora/ausbushes/palebush,/obj/structure/window/reinforced{dir = 5; health = 1e+007},/obj/structure/cable/yellow{d1 = 4; d2 = 8; icon_state = "4-8"},/turf/simulated/floor/grass,/area/medical/surgeryobs)
+"cCq" = (/obj/structure/flora/ausbushes/fernybush,/obj/structure/flora/ausbushes/fullgrass,/obj/structure/flora/ausbushes/ppflowers,/obj/structure/flora/ausbushes/palebush,/obj/structure/window/reinforced{dir = 5; max_integrity = 1e+007},/obj/structure/cable/yellow{d1 = 4; d2 = 8; icon_state = "4-8"},/turf/simulated/floor/grass,/area/medical/surgeryobs)
"cCr" = (/obj/machinery/power/apc{dir = 8; name = "west bump"; pixel_x = -24; shock_proof = 0},/obj/structure/cable/yellow{d1 = 4; d2 = 8; icon_state = "4-8"},/turf/simulated/floor/plasteel{dir = 4; icon_state = "warnwhite"; tag = "icon-warnwhite (NORTH)"},/area/medical/surgeryobs)
-"cCs" = (/obj/structure/flora/ausbushes/fernybush,/obj/structure/flora/ausbushes/fullgrass,/obj/structure/flora/ausbushes/brflowers,/obj/structure/flora/ausbushes/sunnybush,/obj/structure/window/reinforced{dir = 5; health = 1e+007},/obj/structure/cable/yellow{d1 = 4; d2 = 8; icon_state = "4-8"},/turf/simulated/floor/grass,/area/medical/surgeryobs)
+"cCs" = (/obj/structure/flora/ausbushes/fernybush,/obj/structure/flora/ausbushes/fullgrass,/obj/structure/flora/ausbushes/brflowers,/obj/structure/flora/ausbushes/sunnybush,/obj/structure/window/reinforced{dir = 5; max_integrity = 1e+007},/obj/structure/cable/yellow{d1 = 4; d2 = 8; icon_state = "4-8"},/turf/simulated/floor/grass,/area/medical/surgeryobs)
"cCt" = (/obj/structure/cable/yellow{d1 = 1; d2 = 4; icon_state = "1-4"},/obj/structure/cable/yellow{d1 = 2; d2 = 4; icon_state = "2-4"},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/structure/cable/yellow{d1 = 4; d2 = 8; icon_state = "4-8"},/obj/machinery/status_display{density = 0; layer = 4; pixel_x = 0; pixel_y = 0},/turf/simulated/wall,/area/medical/surgeryobs)
"cCu" = (/obj/structure/cable/yellow{d1 = 4; d2 = 8; icon_state = "4-8"},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/surgeryobs)
"cCv" = (/obj/structure/cable/yellow{d1 = 4; d2 = 8; icon_state = "4-8"},/obj/machinery/hologram/holopad,/turf/simulated/floor/plasteel{dir = 8; icon_state = "warnwhite"; tag = "icon-warnwhite (NORTH)"},/area/medical/surgeryobs)
@@ -7788,7 +7788,7 @@
"cTO" = (/obj/structure/disposalpipe/segment{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor/plasteel{icon_state = "warningcorner"; dir = 4},/area/hallway/secondary/exit{name = "\improper Departure Lounge"})
"cTP" = (/obj/structure/disposalpipe/segment{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor/plasteel,/area/hallway/secondary/exit{name = "\improper Departure Lounge"})
"cTQ" = (/obj/structure/disposalpipe/segment{dir = 8; icon_state = "pipe-c"},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 9},/turf/simulated/floor/plasteel,/area/hallway/secondary/exit{name = "\improper Departure Lounge"})
-"cTR" = (/obj/structure/flora/ausbushes/fernybush,/obj/structure/flora/ausbushes/fullgrass,/obj/structure/flora/ausbushes/ppflowers,/obj/structure/flora/ausbushes/palebush,/obj/structure/window/reinforced{dir = 5; health = 1e+007},/turf/simulated/floor/grass,/area/hallway/secondary/exit{name = "\improper Departure Lounge"})
+"cTR" = (/obj/structure/flora/ausbushes/fernybush,/obj/structure/flora/ausbushes/fullgrass,/obj/structure/flora/ausbushes/ppflowers,/obj/structure/flora/ausbushes/palebush,/obj/structure/window/reinforced{dir = 5; max_integrity = 1e+007},/turf/simulated/floor/grass,/area/hallway/secondary/exit{name = "\improper Departure Lounge"})
"cTS" = (/obj/effect/spawner/window/reinforced,/obj/structure/cable/yellow{d2 = 8; icon_state = "0-8"},/turf/simulated/floor/plating,/area/hallway/secondary/exit{name = "\improper Departure Lounge"})
"cTT" = (/obj/machinery/computer/secure_data,/obj/structure/cable/yellow{d1 = 2; d2 = 8; icon_state = "2-8"},/turf/simulated/floor/plasteel{icon_state = "red"; dir = 8},/area/hallway/secondary/exit{name = "\improper Departure Lounge"})
"cTU" = (/obj/structure/stool/bed/chair/office/dark{dir = 4},/turf/simulated/floor/plasteel,/area/hallway/secondary/exit{name = "\improper Departure Lounge"})
@@ -7810,7 +7810,7 @@
"cUk" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/structure/disposalpipe/segment,/turf/simulated/floor/plasteel{icon_state = "grimy"},/area/chapel/office)
"cUl" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/structure/cable/yellow{d1 = 1; d2 = 2; icon_state = "1-2"},/turf/simulated/floor/plasteel{icon_state = "grimy"},/area/chapel/office)
"cUm" = (/obj/machinery/light_switch{pixel_x = 28; pixel_y = 0},/obj/machinery/light/small{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 10},/obj/machinery/camera{c_tag = "Chapel Office"; dir = 8; network = list("SS13")},/turf/simulated/floor/plasteel{icon_state = "grimy"},/area/chapel/office)
-"cUn" = (/obj/structure/grille,/obj/structure/window/reinforced/tinted{dir = 5; health = 120; icon_state = "twindow"; reinf = 0},/turf/simulated/floor/plasteel{icon_state = "dark"},/area/chapel/office)
+"cUn" = (/obj/structure/grille,/obj/structure/window/reinforced/tinted{dir = 5; max_integrity = 120; reinf = 0},/turf/simulated/floor/plasteel{icon_state = "dark"},/area/chapel/office)
"cUo" = (/obj/machinery/atmospherics/pipe/manifold4w/hidden/supply,/turf/simulated/floor/plasteel{dir = 8; icon_state = "whiteblue"},/area/medical/medbay3)
"cUp" = (/obj/structure/disposalpipe/segment{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4; level = 1},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/structure/cable/yellow{d1 = 4; d2 = 8; icon_state = "4-8"},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/medbay3)
"cUq" = (/obj/structure/disposalpipe/segment{dir = 4},/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{dir = 8; initialize_directions = 11; level = 1},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/structure/cable/yellow{d1 = 4; d2 = 8; icon_state = "4-8"},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/medbay3)
@@ -7854,7 +7854,7 @@
"cVc" = (/obj/machinery/atmospherics/unary/vent_scrubber{dir = 4; on = 1; scrub_N2O = 0; scrub_Toxins = 0},/turf/simulated/floor/plasteel,/area/hallway/secondary/exit{name = "\improper Departure Lounge"})
"cVd" = (/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{dir = 2; initialize_directions = 11},/turf/simulated/floor/plasteel,/area/hallway/secondary/exit{name = "\improper Departure Lounge"})
"cVe" = (/obj/structure/stool/bed/chair{dir = 8},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor/plasteel{dir = 4; icon_state = "warning"},/area/hallway/secondary/exit{name = "\improper Departure Lounge"})
-"cVf" = (/obj/structure/flora/ausbushes/fernybush,/obj/structure/flora/ausbushes/fullgrass,/obj/structure/flora/ausbushes/brflowers,/obj/structure/flora/ausbushes/sunnybush,/obj/structure/window/reinforced{dir = 5; health = 1e+007},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor/grass,/area/hallway/secondary/exit{name = "\improper Departure Lounge"})
+"cVf" = (/obj/structure/flora/ausbushes/fernybush,/obj/structure/flora/ausbushes/fullgrass,/obj/structure/flora/ausbushes/brflowers,/obj/structure/flora/ausbushes/sunnybush,/obj/structure/window/reinforced{dir = 5; max_integrity = 1e+007},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor/grass,/area/hallway/secondary/exit{name = "\improper Departure Lounge"})
"cVg" = (/obj/structure/stool/bed/chair{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor/plasteel{dir = 8; icon_state = "warning"},/area/hallway/secondary/exit{name = "\improper Departure Lounge"})
"cVh" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor/plasteel,/area/hallway/secondary/exit{name = "\improper Departure Lounge"})
"cVi" = (/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{dir = 4; initialize_directions = 11},/turf/simulated/floor/plasteel,/area/hallway/secondary/exit{name = "\improper Departure Lounge"})
diff --git a/_maps/map_files/RandomZLevels/wildwest.dmm b/_maps/map_files/RandomZLevels/wildwest.dmm
index 52dae9cef94..5f8aa9e293a 100644
--- a/_maps/map_files/RandomZLevels/wildwest.dmm
+++ b/_maps/map_files/RandomZLevels/wildwest.dmm
@@ -156,7 +156,7 @@
"cZ" = (/obj/structure/window/reinforced{tag = "icon-fwindow (EAST)"; icon_state = "fwindow"; dir = 4},/obj/structure/window/reinforced{tag = "icon-fwindow (WEST)"; icon_state = "fwindow"; dir = 8},/obj/structure/grille,/obj/structure/window/reinforced{tag = "icon-fwindow (NORTH)"; icon_state = "fwindow"; dir = 1},/turf/simulated/floor/plating/ironsand{tag = "icon-ironsand1"; icon_state = "ironsand1"},/area/awaymission/wwgov)
"da" = (/obj/effect/landmark/corpse/syndicatecommando{mobname = "Syndicate Commando"},/turf/simulated/floor/carpet,/area/awaymission/wwgov)
"db" = (/obj/machinery/mineral/mint,/turf/simulated/floor/plating,/area/awaymission/wwrefine)
-"dc" = (/obj/structure/window/reinforced{dir = 5; health = 1e+007},/turf/simulated/floor/wood,/area/awaymission/wwmines)
+"dc" = (/obj/structure/window/reinforced{dir = 5; max_integrity = 1e+007},/turf/simulated/floor/wood,/area/awaymission/wwmines)
"dd" = (/obj/structure/mineral_door/wood,/turf/simulated/floor/plating/ironsand{tag = "icon-ironsand1"; icon_state = "ironsand1"},/area/awaymission/wwmines)
"de" = (/obj/structure/mineral_door/wood,/obj/effect/decal/cleanable/blood/tracks,/turf/simulated/floor/plating/ironsand{tag = "icon-ironsand1"; icon_state = "ironsand1"},/area/awaymission/wwmines)
"df" = (/obj/structure/window/reinforced{dir = 4},/turf/space,/area/space)
diff --git a/_maps/map_files/cyberiad/cyberiad.dmm b/_maps/map_files/cyberiad/cyberiad.dmm
index e9974435ba9..618b257bcd7 100644
--- a/_maps/map_files/cyberiad/cyberiad.dmm
+++ b/_maps/map_files/cyberiad/cyberiad.dmm
@@ -7418,8 +7418,8 @@
"cNb" = (/obj/machinery/atmospherics/unary/vent_pump{dir = 1; external_pressure_bound = 101; on = 1; pressure_checks = 1},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/obj/machinery/light{dir = 1},/obj/structure/cable/yellow{d1 = 2; d2 = 4; icon_state = "2-4"},/turf/simulated/floor/plasteel{dir = 1; icon_state = "warning"},/area/engine/engineering)
"cNc" = (/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{dir = 1; initialize_directions = 11; level = 1},/obj/machinery/camera{c_tag = "Engineering Particle Accelerator"; dir = 2; pixel_x = 23; network = list("Singularity","SS13")},/obj/machinery/light{dir = 1},/obj/structure/cable/yellow{d1 = 2; d2 = 8; icon_state = "2-8"},/turf/simulated/floor/plasteel{dir = 1; icon_state = "warning"},/area/engine/engineering)
"cNd" = (/obj/structure/barricade/wooden,/turf/simulated/floor/plating,/area/maintenance/asmaint)
-"cNe" = (/obj/structure/disposalpipe/segment,/obj/structure/grille,/obj/structure/window/reinforced{dir = 5; health = 1e+007},/turf/simulated/floor/plating,/area/maintenance/asmaint)
-"cNf" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 5; health = 1e+007},/turf/simulated/floor/plating,/area/maintenance/asmaint)
+"cNe" = (/obj/structure/disposalpipe/segment,/obj/structure/grille,/obj/structure/window/reinforced{dir = 5; max_integrity = 1e+007},/turf/simulated/floor/plating,/area/maintenance/asmaint)
+"cNf" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 5; max_integrity = 1e+007},/turf/simulated/floor/plating,/area/maintenance/asmaint)
"cNg" = (/obj/structure/sign/barsign,/turf/simulated/wall,/area/maintenance/asmaint)
"cNh" = (/obj/effect/decal/cleanable/vomit,/turf/simulated/floor/plating,/area/maintenance/genetics)
"cNi" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 9; pixel_y = 0},/obj/structure/cable/yellow{d1 = 1; d2 = 2; icon_state = "1-2"},/turf/simulated/floor/plasteel,/area/engine/engineering)
diff --git a/_maps/map_files/cyberiad/z6.dmm b/_maps/map_files/cyberiad/z6.dmm
index ee16cf0c496..5e8b66e6c24 100644
--- a/_maps/map_files/cyberiad/z6.dmm
+++ b/_maps/map_files/cyberiad/z6.dmm
@@ -69,7 +69,7 @@
"bq" = (/obj/structure/sign/securearea{desc = "A warning sign which reads 'EXTERNAL AIRLOCK'"; icon_state = "space"; layer = 4; name = "EXTERNAL AIRLOCK"; pixel_x = 0; pixel_y = -32},/turf/simulated/floor/plasteel{tag = "icon-cafeteria (NORTHEAST)"; icon_state = "cafeteria"; dir = 5},/area/djstation)
"br" = (/obj/machinery/light_switch{pixel_x = 28; pixel_y = 28},/obj/machinery/access_button{command = "cycle_interior"; frequency = 1479; master_tag = "dj_station_airlock"; name = "interior access button"; pixel_x = 25; pixel_y = -25; req_access_txt = "0"},/obj/machinery/atmospherics/pipe/simple/hidden,/turf/simulated/floor/plasteel{tag = "icon-cafeteria (NORTHEAST)"; icon_state = "cafeteria"; dir = 5},/area/djstation)
"bs" = (/obj/structure/lattice,/obj/structure/grille,/turf/space,/area/space)
-"bt" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 5; health = 1e+007},/turf/simulated/floor/plating,/area/derelict/solar_control)
+"bt" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 5; max_integrity = 1e+007},/turf/simulated/floor/plating,/area/derelict/solar_control)
"bu" = (/turf/simulated/floor/plating,/area/derelict/solar_control)
"bv" = (/obj/machinery/door/airlock/external{frequency = 1479; icon_state = "door_locked"; id_tag = "dj_station_inner"; locked = 1; name = "DJ Station Interior Access"; req_access = null; req_access_txt = "0"},/obj/machinery/atmospherics/pipe/simple/hidden,/turf/simulated/floor/plating,/area/djstation)
"bw" = (/obj/machinery/door/airlock/external{name = "Air Bridge Access"},/turf/simulated/floor/plating,/area/derelict/solar_control)
@@ -180,7 +180,7 @@
"dy" = (/obj/machinery/power/emitter{dir = 1; icon_state = "emitter"},/turf/simulated/floor/plating/airless,/area/derelict/singularity_engine)
"dz" = (/obj/machinery/field/generator,/turf/simulated/floor/plating/airless,/area/derelict/singularity_engine)
"dA" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/structure/window/reinforced,/turf/simulated/floor/plasteel,/area/derelict/bridge/access)
-"dB" = (/obj/structure/window/reinforced{dir = 5; health = 1e+007},/turf/simulated/floor/plasteel,/area/derelict/bridge/access)
+"dB" = (/obj/structure/window/reinforced{dir = 5; max_integrity = 1e+007},/turf/simulated/floor/plasteel,/area/derelict/bridge/access)
"dC" = (/obj/structure/window/reinforced{dir = 4},/turf/simulated/floor/plasteel,/area/derelict/bridge)
"dD" = (/obj/item/stack/rods,/turf/simulated/floor/plating/airless,/area/space)
"dE" = (/obj/structure/grille,/obj/structure/window/reinforced,/turf/simulated/floor/plating/airless,/area/derelict/singularity_engine)
@@ -509,7 +509,7 @@
"jQ" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 8},/turf/simulated/floor/plating/airless,/area/space)
"jR" = (/obj/structure/closet/wardrobe/mixed,/turf/simulated/floor/plasteel,/area/derelict/arrival)
"jS" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 8},/turf/simulated/floor/plating/airless,/area/space)
-"jT" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 5; health = 1e+007},/turf/simulated/floor/plating,/area/derelict/arrival)
+"jT" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 5; max_integrity = 1e+007},/turf/simulated/floor/plating,/area/derelict/arrival)
"jU" = (/obj/machinery/door/airlock/external{name = "Escape Airlock"},/turf/simulated/floor/plating,/area/derelict/arrival)
"jV" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/plating/airless,/area/space)
"jW" = (/turf/simulated/wall,/area/derelict/hallway/secondary)
@@ -521,7 +521,7 @@
"kc" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; tag = ""},/turf/simulated/wall/r_wall,/area/derelict/hallway/secondary)
"kd" = (/obj/structure/window/basic{dir = 1},/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"; tag = ""},/turf/simulated/floor/plating/airless,/area/derelict/hallway/secondary)
"ke" = (/obj/structure/grille,/obj/item/shard,/obj/item/shard{icon_state = "medium"},/turf/simulated/floor/plating/airless,/area/space)
-"kf" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 5; health = 1e+007},/turf/simulated/floor/plating/airless,/area/space)
+"kf" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 5; max_integrity = 1e+007},/turf/simulated/floor/plating/airless,/area/space)
"kg" = (/obj/structure/girder,/turf/simulated/floor/plating/airless,/area/derelict/hallway/primary)
"kh" = (/obj/item/stack/rods,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/plasteel/airless,/area/derelict/hallway/secondary)
"ki" = (/obj/item/shard{icon_state = "small"},/turf/space,/area/space)
diff --git a/code/__DEFINES/construction.dm b/code/__DEFINES/construction.dm
index 9d8ca0b3013..fa62fd7af4f 100644
--- a/code/__DEFINES/construction.dm
+++ b/code/__DEFINES/construction.dm
@@ -18,6 +18,11 @@
#define RWALL_SUPPORT_RODS 5
#define RWALL_SHEATH 6
+//window construction states
+#define WINDOW_OUT_OF_FRAME 0
+#define WINDOW_IN_FRAME 1
+#define WINDOW_SCREWED_TO_FRAME 2
+
//airlock assembly construction states
#define AIRLOCK_ASSEMBLY_NEEDS_WIRES 0
#define AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS 1
@@ -32,6 +37,9 @@
//windows affected by nar-sie turn this color.
#define NARSIE_WINDOW_COLOUR "#7D1919"
+//let's just pretend fulltile windows being children of border windows is fine
+#define FULLTILE_WINDOW_DIR NORTHEAST
+
//Material defines, for determining how much of a given material an item contains
#define MAT_METAL "$metal"
#define MAT_GLASS "$glass"
diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm
index d480bb6bbbd..2862010d316 100644
--- a/code/__DEFINES/is_helpers.dm
+++ b/code/__DEFINES/is_helpers.dm
@@ -26,6 +26,16 @@ var/list/static/global/pointed_types = typecacheof(list(
#define is_pointed(W) (is_type_in_typecache(W, pointed_types))
+GLOBAL_LIST_INIT(glass_sheet_types, typecacheof(list(
+ /obj/item/stack/sheet/glass,
+ /obj/item/stack/sheet/rglass,
+ /obj/item/stack/sheet/plasmaglass,
+ /obj/item/stack/sheet/plasmarglass,
+ /obj/item/stack/sheet/titaniumglass,
+ /obj/item/stack/sheet/plastitaniumglass)))
+
+#define is_glass_sheet(O) (is_type_in_typecache(O, GLOB.glass_sheet_types))
+
//Turfs
#define issimulatedturf(A) istype(A, /turf/simulated)
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index 20c707b38f7..8fe3c3ba7fa 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -170,9 +170,12 @@ Turf and target are seperate in case you want to teleport some distance from a t
// Checks if doors are open
/proc/DirBlocked(turf/loc,var/dir)
for(var/obj/structure/window/D in loc)
- if(!D.density) continue
- if(D.is_fulltile()) return 1
- if(D.dir == dir) return 1
+ if(!D.density)
+ continue
+ if(D.fulltile)
+ return 1
+ if(D.dir == dir)
+ return 1
for(var/obj/machinery/door/D in loc)
if(!D.density)//if the door is open
@@ -1500,6 +1503,22 @@ var/mob/dview/dview_mob = new
return TRUE
return FALSE
+//can a window be here, or is there a window blocking it?
+/proc/valid_window_location(turf/T, dir_to_check)
+ if(!T)
+ return FALSE
+ for(var/obj/O in T)
+ if(istype(O, /obj/machinery/door/window) && (O.dir == dir_to_check || dir_to_check == FULLTILE_WINDOW_DIR))
+ return FALSE
+ if(istype(O, /obj/structure/windoor_assembly))
+ var/obj/structure/windoor_assembly/W = O
+ if(W.ini_dir == dir_to_check || dir_to_check == FULLTILE_WINDOW_DIR)
+ return FALSE
+ if(istype(O, /obj/structure/window))
+ var/obj/structure/window/W = O
+ if(W.ini_dir == dir_to_check || W.ini_dir == FULLTILE_WINDOW_DIR || dir_to_check == FULLTILE_WINDOW_DIR)
+ return FALSE
+ return TRUE
//Get the dir to the RIGHT of dir if they were on a clock
//NORTH --> NORTHEAST
diff --git a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm
index baea323518e..5a7825c0cfe 100644
--- a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm
+++ b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm
@@ -263,8 +263,8 @@
new/obj/effect/temp_visual/revenant(T)
T.ChangeTurf(/turf/simulated/wall/r_wall/rust)
for(var/obj/structure/window/window in T.contents)
- window.hit(rand(30,80))
- if(window && window.is_fulltile())
+ window.take_damage(rand(30,80))
+ if(window && window.fulltile)
new/obj/effect/temp_visual/revenant/cracks(window.loc)
for(var/obj/structure/closet/closet in T.contents)
closet.open()
diff --git a/code/game/gamemodes/shadowling/shadowling_abilities.dm b/code/game/gamemodes/shadowling/shadowling_abilities.dm
index 6e9d5f7da8c..89aee290422 100644
--- a/code/game/gamemodes/shadowling/shadowling_abilities.dm
+++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm
@@ -540,9 +540,7 @@
sp.start()
S.Weaken(6)
for(var/obj/structure/window/W in T.contents)
- W.hit(rand(80, 100))
-
-
+ W.take_damage(rand(80, 100))
/obj/effect/proc_holder/spell/aoe_turf/drainLife
name = "Drain Life"
diff --git a/code/game/gamemodes/vampire/vampire_powers.dm b/code/game/gamemodes/vampire/vampire_powers.dm
index a2e8c2bf70d..c9dad5c510d 100644
--- a/code/game/gamemodes/vampire/vampire_powers.dm
+++ b/code/game/gamemodes/vampire/vampire_powers.dm
@@ -270,7 +270,7 @@
C.Stun(4)
C.Jitter(150)
for(var/obj/structure/window/W in view(4))
- W.destroy()
+ W.deconstruct(FALSE)
playsound(user.loc, 'sound/effects/creepyshriek.ogg', 100, 1)
diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm
index 181e273dd43..1ab22f341b6 100644
--- a/code/game/machinery/doors/windowdoor.dm
+++ b/code/game/machinery/doors/windowdoor.dm
@@ -16,17 +16,20 @@
var/obj/item/airlock_electronics/electronics
var/base_state = "left"
var/reinf = 0
+ var/cancolor = TRUE
var/shards = 2
var/rods = 2
var/cable = 1
var/list/debris = list()
-/obj/machinery/door/window/New()
+/obj/machinery/door/window/New(loc, set_dir)
..()
+ if(set_dir)
+ setDir(set_dir)
if(req_access && req_access.len)
icon_state = "[icon_state]"
base_state = icon_state
- if(!color)
+ if(!color && cancolor)
color = color_windows(src)
for(var/i in 1 to shards)
debris += new /obj/item/shard(src)
@@ -97,6 +100,16 @@
return 1
if(get_dir(loc, target) == dir) //Make sure looking at appropriate border
return !density
+ if(istype(mover, /obj/structure/window))
+ var/obj/structure/window/W = mover
+ if(!valid_window_location(loc, W.ini_dir))
+ return FALSE
+ else if(istype(mover, /obj/structure/windoor_assembly))
+ var/obj/structure/windoor_assembly/W = mover
+ if(!valid_window_location(loc, W.ini_dir))
+ return FALSE
+ else if(istype(mover, /obj/machinery/door/window) && !valid_window_location(loc, mover.dir))
+ return FALSE
else
return 1
@@ -128,7 +141,7 @@
if(emagged)
return 0
if(!operating) //in case of emag
- operating = 1
+ operating = TRUE
do_animate("opening")
playsound(loc, 'sound/machines/windowdoor.ogg', 100, 1)
icon_state ="[base_state]open"
@@ -152,7 +165,7 @@
if(forced < 2)
if(emagged)
return 0
- operating = 1
+ operating = TRUE
do_animate("closing")
playsound(loc, 'sound/machines/windowdoor.ogg', 100, 1)
icon_state = base_state
@@ -186,6 +199,11 @@
/obj/machinery/door/window/narsie_act()
color = NARSIE_WINDOW_COLOUR
+/obj/machinery/door/window/ratvar_act()
+ var/obj/machinery/door/window/clockwork/C = new(loc, dir)
+ C.name = name
+ qdel(src)
+
/obj/machinery/door/window/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > T0C + (reinf ? 1600 : 800))
take_damage(round(exposed_volume / 200), BURN, 0, 0)
@@ -204,7 +222,7 @@
/obj/machinery/door/window/emag_act(mob/user, obj/weapon)
if(!operating && density && !emagged)
emagged = TRUE
- operating = 1
+ operating = TRUE
flick("[base_state]spark", src)
playsound(src, "sparks", 75, 1)
sleep(6)
@@ -314,6 +332,45 @@
desc = "For keeping in criminal scum."
req_access = list(access_brig)
+/obj/machinery/door/window/clockwork
+ name = "brass windoor"
+ desc = "A thin door with translucent brass paneling."
+ icon_state = "clockwork"
+ base_state = "clockwork"
+ shards = 0
+ rods = 0
+ burn_state = FIRE_PROOF
+ cancolor = FALSE
+ var/made_glow = FALSE
+
+/obj/machinery/door/window/clockwork/New(loc, set_dir)
+ ..()
+ debris += new/obj/item/stack/tile/brass(src, 2)
+
+/obj/machinery/door/window/clockwork/setDir(direct)
+ if(!made_glow)
+ var/obj/effect/E = new /obj/effect/temp_visual/ratvar/door/window(get_turf(src))
+ E.setDir(direct)
+ made_glow = TRUE
+ ..()
+
+/obj/machinery/door/window/clockwork/emp_act(severity)
+ if(prob(80/severity))
+ open()
+
+/obj/machinery/door/window/clockwork/ratvar_act()
+ obj_integrity = max_integrity
+
+/obj/machinery/door/window/clockwork/hasPower()
+ return TRUE //yup that's power all right
+
+/obj/machinery/door/window/clockwork/narsie_act()
+ take_damage(rand(30, 60), BRUTE)
+ if(src)
+ var/previouscolor = color
+ color = "#960000"
+ animate(src, color = previouscolor, time = 8)
+
/obj/machinery/door/window/northleft
dir = NORTH
diff --git a/code/game/objects/effects/temporary_visuals/clockcult.dm b/code/game/objects/effects/temporary_visuals/clockcult.dm
index 4a70c73c9c3..f6b654ccbbe 100644
--- a/code/game/objects/effects/temporary_visuals/clockcult.dm
+++ b/code/game/objects/effects/temporary_visuals/clockcult.dm
@@ -6,6 +6,10 @@
randomdir = 0
layer = ABOVE_NORMAL_TURF_LAYER
+/obj/effect/temp_visual/ratvar/door/window
+ icon_state = "ratvarwindoorglow"
+ layer = ABOVE_WINDOW_LAYER
+
/obj/effect/temp_visual/ratvar/beam
icon_state = "ratvarbeamglow"
@@ -15,6 +19,13 @@
/obj/effect/temp_visual/ratvar/floor
icon_state = "ratvarfloorglow"
+/obj/effect/temp_visual/ratvar/window
+ icon_state = "ratvarwindowglow"
+ layer = ABOVE_OBJ_LAYER
+
+/obj/effect/temp_visual/ratvar/window/single
+ icon_state = "ratvarwindowglow_s"
+
/obj/effect/temp_visual/ratvar/grille
icon_state = "ratvargrilleglow"
layer = BELOW_OBJ_LAYER
diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm
index a30c3e1b716..ebc89cdca7a 100644
--- a/code/game/objects/items/stacks/sheets/glass.dm
+++ b/code/game/objects/items/stacks/sheets/glass.dm
@@ -13,6 +13,15 @@
/*
* Glass sheets
*/
+
+GLOBAL_LIST_INIT(glass_recipes, list ( \
+ new/datum/stack_recipe/window("directional window", /obj/structure/window/basic, time = 0, on_floor = TRUE, window_checks = TRUE), \
+ new/datum/stack_recipe/window("fulltile window", /obj/structure/window/full/basic, 2, time = 0, on_floor = TRUE, window_checks = TRUE), \
+ new/datum/stack_recipe("fishbowl", /obj/machinery/fishtank/bowl, 1, time = 0), \
+ new/datum/stack_recipe("fish tank", /obj/machinery/fishtank/tank, 3, time = 0, on_floor = TRUE), \
+ new/datum/stack_recipe("wall aquariam", /obj/machinery/fishtank/wall, 4, time = 0, on_floor = TRUE) \
+))
+
/obj/item/stack/sheet/glass
name = "glass"
desc = "HOLY SHEET! That is a lot of glass."
@@ -30,8 +39,9 @@
/obj/item/stack/sheet/glass/cyborg
materials = list()
-/obj/item/stack/sheet/glass/attack_self(mob/user as mob)
- construct_window(user)
+/obj/item/stack/sheet/glass/New(loc, amount)
+ recipes = GLOB.glass_recipes
+ ..()
/obj/item/stack/sheet/glass/attackby(obj/item/W, mob/user, params)
..()
@@ -59,94 +69,18 @@
else
return ..()
-/obj/item/stack/sheet/glass/proc/construct_window(mob/user as mob)
- if(!user || !src) return 0
- if(!istype(user.loc,/turf)) return 0
- if(!user.IsAdvancedToolUser())
- to_chat(user, "You don't have the dexterity to do this!")
- return 0
- var/title = "Sheet-Glass"
- title += " ([src.amount] sheet\s left)"
- switch(input(title, "What would you like to construct?") in list("One Direction Window", "Full Window", "Fishbowl", "Fish Tank", "Wall Aquarium", "Cancel"))
- if("One Direction Window")
- if(!src) return 1
- if(src.loc != user) return 1
-
- var/list/directions = new/list(cardinal)
- var/i = 0
- for(var/obj/structure/window/win in user.loc)
- i++
- if(i >= 4)
- to_chat(user, "There are too many windows in this location.")
- return 1
- directions-=win.dir
- if(win.is_fulltile())
- to_chat(user, "Can't let you do that.")
- return 1
-
- //Determine the direction. It will first check in the direction the person making the window is facing, if it finds an already made window it will try looking at the next cardinal direction, etc.
- var/dir_to_set = 2
- for(var/direction in list( user.dir, turn(user.dir,90), turn(user.dir,180), turn(user.dir,270) ))
- var/found = 0
- for(var/obj/structure/window/WT in user.loc)
- if(WT.dir == direction)
- found = 1
- if(!found)
- dir_to_set = direction
- break
-
- var/obj/structure/window/W
- W = new /obj/structure/window/basic( user.loc, 0 )
- W.dir = dir_to_set
- W.ini_dir = W.dir
- W.state = 0
- W.anchored = 0
- W.air_update_turf(1)
- src.use(1)
- if("Full Window")
- if(!src) return 1
- if(src.loc != user) return 1
- if(src.amount < 2)
- to_chat(user, "You need more glass to do that.")
- return 1
- if(locate(/obj/structure/window/full) in user.loc)
- to_chat(user, "There is a full window in the way.")
- return 1
- var/obj/structure/window/W = new full_window( user.loc, 0 )
- W.state = 0
- W.anchored = 0
- W.air_update_turf(1)
- src.use(2)
- if("Fishbowl")
- if(!src) return 1
- if(src.loc != user) return 1
- var/obj/machinery/fishtank/F = new /obj/machinery/fishtank/bowl(user.loc, 0)
- F.air_update_turf(1)
- src.use(1)
- if("Fish Tank")
- if(!src) return 1
- if(src.loc != user) return 1
- if(src.amount < 3)
- to_chat(user, "You need more glass to do that.")
- return 1
- var/obj/machinery/fishtank/F = new /obj/machinery/fishtank/tank(user.loc, 0)
- F.air_update_turf(1)
- src.use(3)
- if("Wall Aquarium")
- if(!src) return 1
- if(src.loc != user) return 1
- if(src.amount < 4)
- to_chat(user, "You need more glass to do that.")
- return 1
- var/obj/machinery/fishtank/F = new /obj/machinery/fishtank/wall(user.loc, 0)
- F.air_update_turf(1)
- src.use(4)
- return 0
-
/*
* Reinforced glass sheets
*/
+
+GLOBAL_LIST_INIT(reinforced_glass_recipes, list ( \
+ new/datum/stack_recipe/window("windoor frame", /obj/structure/windoor_assembly, 5, time = 0, on_floor = TRUE, window_checks = TRUE), \
+ null, \
+ new/datum/stack_recipe/window("directional reinforced window", /obj/structure/window/reinforced, time = 0, on_floor = TRUE, window_checks = TRUE), \
+ new/datum/stack_recipe/window("fulltile reinforced window", /obj/structure/window/full/reinforced, 2, time = 0, on_floor = TRUE, window_checks = TRUE) \
+))
+
/obj/item/stack/sheet/rglass
name = "reinforced glass"
desc = "Glass which seems to have rods or something stuck in them."
@@ -161,105 +95,14 @@
/obj/item/stack/sheet/rglass/cyborg
materials = list()
-/obj/item/stack/sheet/rglass/attack_self(mob/user as mob)
- construct_window(user)
-
-/obj/item/stack/sheet/rglass/proc/construct_window(mob/user as mob)
- if(!user || !src) return 0
- if(!istype(user.loc,/turf)) return 0
- if(!user.IsAdvancedToolUser())
- to_chat(user, "You don't have the dexterity to do this!")
- return 0
- var/title = "Sheet Reinf. Glass"
- title += " ([src.amount] sheet\s left)"
- switch(input(title, "Would you like full tile glass a one direction glass pane or a windoor?") in list("One Direction", "Full Window", "Windoor", "Cancel"))
- if("One Direction")
- if(!src) return 1
- if(src.loc != user) return 1
- var/list/directions = new/list(cardinal)
- var/i = 0
- for(var/obj/structure/window/win in user.loc)
- i++
- if(i >= 4)
- to_chat(user, "There are too many windows in this location.")
- return 1
- directions-=win.dir
- if(win.is_fulltile())
- to_chat(user, "Can't let you do that.")
- return 1
-
- //Determine the direction. It will first check in the direction the person making the window is facing, if it finds an already made window it will try looking at the next cardinal direction, etc.
- var/dir_to_set = 2
- for(var/direction in list( user.dir, turn(user.dir,90), turn(user.dir,180), turn(user.dir,270) ))
- var/found = 0
- for(var/obj/structure/window/WT in user.loc)
- if(WT.dir == direction)
- found = 1
- if(!found)
- dir_to_set = direction
- break
-
- var/obj/structure/window/W
- W = new /obj/structure/window/reinforced( user.loc, 1 )
- W.state = 0
- W.dir = dir_to_set
- W.ini_dir = W.dir
- W.anchored = 0
- src.use(1)
-
- if("Full Window")
- if(!src) return 1
- if(src.loc != user) return 1
- if(src.amount < 2)
- to_chat(user, "You need more glass to do that.")
- return 1
- if(locate(/obj/structure/window/full) in user.loc)
- to_chat(user, "There is a window in the way.")
- return 1
- var/obj/structure/window/W = new full_window( user.loc, 0 )
- W.state = 0
- W.anchored = 0
- src.use(2)
-
- if("Windoor")
- if(!src || src.loc != user) return 1
-
- if(isturf(user.loc) && locate(/obj/structure/windoor_assembly/, user.loc))
- to_chat(user, "There is already a windoor assembly in that location.")
- return 1
-
- if(isturf(user.loc) && locate(/obj/machinery/door/window/, user.loc))
- to_chat(user, "There is already a windoor in that location.")
- return 1
-
- if(src.amount < 5)
- to_chat(user, "You need more glass to do that.")
- return 1
-
- var/obj/structure/windoor_assembly/WD
- WD = new /obj/structure/windoor_assembly(user.loc)
- WD.state = "01"
- WD.anchored = 0
- src.use(5)
- switch(user.dir)
- if(SOUTH)
- WD.dir = SOUTH
- WD.ini_dir = SOUTH
- if(EAST)
- WD.dir = EAST
- WD.ini_dir = EAST
- if(WEST)
- WD.dir = WEST
- WD.ini_dir = WEST
- else//If the user is facing northeast. northwest, southeast, southwest or north, default to north
- WD.dir = NORTH
- WD.ini_dir = NORTH
- else
- return 1
-
-
- return 0
+/obj/item/stack/sheet/rglass/New(loc, amount)
+ recipes = GLOB.reinforced_glass_recipes
+ ..()
+GLOBAL_LIST_INIT(pglass_recipes, list ( \
+ new/datum/stack_recipe/window("directional window", /obj/structure/window/plasmabasic, time = 0, on_floor = TRUE, window_checks = TRUE), \
+ new/datum/stack_recipe/window("fulltile window", /obj/structure/window/full/plasmabasic, 2, time = 0, on_floor = TRUE, window_checks = TRUE) \
+))
/obj/item/stack/sheet/plasmaglass
name = "plasma glass"
@@ -271,8 +114,9 @@
created_window = /obj/structure/window/plasmabasic
full_window = /obj/structure/window/full/plasmabasic
-/obj/item/stack/sheet/plasmaglass/attack_self(mob/user as mob)
- construct_window(user)
+/obj/item/stack/sheet/plasmaglass/New(loc, amount)
+ recipes = GLOB.pglass_recipes
+ ..()
/obj/item/stack/sheet/plasmaglass/attackby(obj/item/W, mob/user, params)
..()
@@ -291,64 +135,15 @@
else
return ..()
-/obj/item/stack/sheet/plasmaglass/proc/construct_window(mob/user as mob)
- if(!user || !src) return 0
- if(!istype(user.loc,/turf)) return 0
- if(!user.IsAdvancedToolUser())
- to_chat(user, " You don't have the dexterity to do this!")
- return 0
- var/title = "Plasma-glass alloy"
- title += " ([src.amount] sheet\s left)"
- switch(alert(title, "Would you like full tile glass or one direction?", "One Direction", "Full Window", "Cancel", null))
- if("One Direction")
- if(!src) return 1
- if(src.loc != user) return 1
- var/list/directions = new/list(cardinal)
- var/i = 0
- for(var/obj/structure/window/win in user.loc)
- i++
- if(i >= 4)
- to_chat(user, "There are too many windows in this location.")
- return 1
- directions-=win.dir
- if(!(win.ini_dir in cardinal))
- to_chat(user, "Can't let you do that.")
- return 1
- //Determine the direction. It will first check in the direction the person making the window is facing, if it finds an already made window it will try looking at the next cardinal direction, etc.
- var/dir_to_set = 2
- for(var/direction in list( user.dir, turn(user.dir,90), turn(user.dir,180), turn(user.dir,270) ))
- var/found = 0
- for(var/obj/structure/window/WT in user.loc)
- if(WT.dir == direction)
- found = 1
- if(!found)
- dir_to_set = direction
- break
- var/obj/structure/window/W
- W = new /obj/structure/window/plasmabasic( user.loc, 0 )
- W.dir = dir_to_set
- W.ini_dir = W.dir
- W.state = 0
- W.anchored = 0
- src.use(1)
- if("Full Window")
- if(!src) return 1
- if(src.loc != user) return 1
- if(src.amount < 2)
- to_chat(user, "You need more glass to do that.")
- return 1
- if(locate(/obj/structure/window) in user.loc)
- to_chat(user, "There is a window in the way.")
- return 1
- var/obj/structure/window/W = new full_window( user.loc, 0 )
- W.state = 0
- W.anchored = 0
- src.use(2)
- return 0
-
/*
* Reinforced plasma glass sheets
*/
+
+GLOBAL_LIST_INIT(prglass_recipes, list ( \
+ new/datum/stack_recipe/window("directional reinforced window", /obj/structure/window/plasmareinforced, time = 0, on_floor = TRUE, window_checks = TRUE), \
+ new/datum/stack_recipe/window("fulltile reinforced window", /obj/structure/window/full/plasmareinforced, 2, time = 0, on_floor = TRUE, window_checks = TRUE) \
+))
+
/obj/item/stack/sheet/plasmarglass
name = "reinforced plasma glass"
desc = "Plasma glass which seems to have rods or something stuck in them."
@@ -360,60 +155,42 @@
full_window = /obj/structure/window/full/plasmareinforced
armor = list("melee" = 20, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0)
-/obj/item/stack/sheet/plasmarglass/attack_self(mob/user as mob)
- construct_window(user)
+/obj/item/stack/sheet/plasmarglass/New(loc, amount)
+ recipes = GLOB.prglass_recipes
+ ..()
-/obj/item/stack/sheet/plasmarglass/proc/construct_window(mob/user as mob)
- if(!user || !src) return 0
- if(!istype(user.loc,/turf)) return 0
- if(!user.IsAdvancedToolUser())
- to_chat(user, "You don't have the dexterity to do this!")
- return 0
- var/title = "Reinforced plasma-glass alloy"
- title += " ([src.amount] sheet\s left)"
- switch(alert(title, "Would you like full tile glass or one direction?", "One Direction", "Full Window", "Cancel", null))
- if("One Direction")
- if(!src) return 1
- if(src.loc != user) return 1
- var/list/directions = new/list(cardinal)
- var/i = 0
- for(var/obj/structure/window/win in user.loc)
- i++
- if(i >= 4)
- to_chat(user, "There are too many windows in this location.")
- return 1
- directions-=win.dir
- if(!(win.ini_dir in cardinal))
- to_chat(user, "Can't let you do that.")
- return 1
- //Determine the direction. It will first check in the direction the person making the window is facing, if it finds an already made window it will try looking at the next cardinal direction, etc.
- var/dir_to_set = 2
- for(var/direction in list( user.dir, turn(user.dir,90), turn(user.dir,180), turn(user.dir,270) ))
- var/found = 0
- for(var/obj/structure/window/WT in user.loc)
- if(WT.dir == direction)
- found = 1
- if(!found)
- dir_to_set = direction
- break
- var/obj/structure/window/W
- W = new /obj/structure/window/plasmareinforced( user.loc, 0 )
- W.dir = dir_to_set
- W.ini_dir = W.dir
- W.state = 0
- W.anchored = 0
- src.use(1)
- if("Full Window")
- if(!src) return 1
- if(src.loc != user) return 1
- if(src.amount < 2)
- to_chat(user, "You need more glass to do that.")
- return 1
- if(locate(/obj/structure/window) in user.loc)
- to_chat(user, "There is a window in the way.")
- return 1
- var/obj/structure/window/W = new full_window( user.loc, 0 )
- W.state = 0
- W.anchored = 0
- src.use(2)
- return 0
+GLOBAL_LIST_INIT(titaniumglass_recipes, list(
+ new/datum/stack_recipe/window("shuttle window", /obj/structure/window/full/shuttle, 2, time = 0, on_floor = TRUE, window_checks = TRUE)
+ ))
+
+/obj/item/stack/sheet/titaniumglass
+ name = "titanium glass"
+ desc = "A glass sheet made out of a titanium-silicate alloy."
+ singular_name = "titanium glass sheet"
+ icon_state = "sheet-titaniumglass"
+ item_state = "sheet-titaniumglass"
+ materials = list(MAT_TITANIUM=MINERAL_MATERIAL_AMOUNT, MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
+ merge_type = /obj/item/stack/sheet/titaniumglass
+ full_window = /obj/structure/window/full/shuttle
+
+/obj/item/stack/sheet/titaniumglass/New(loc, amount)
+ recipes = GLOB.titaniumglass_recipes
+ ..()
+
+GLOBAL_LIST_INIT(plastitaniumglass_recipes, list(
+ new/datum/stack_recipe/window("plastitanium window", /obj/structure/window/plastitanium, 2, time = 0, on_floor = TRUE, window_checks = TRUE)
+ ))
+
+/obj/item/stack/sheet/plastitaniumglass
+ name = "plastitanium glass"
+ desc = "A glass sheet made out of a plasma-titanium-silicate alloy."
+ singular_name = "plastitanium glass sheet"
+ icon_state = "sheet-plastitaniumglass"
+ item_state = "sheet-plastitaniumglass"
+ materials = list(MAT_TITANIUM=MINERAL_MATERIAL_AMOUNT, MAT_PLASMA=MINERAL_MATERIAL_AMOUNT, MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
+ merge_type = /obj/item/stack/sheet/plastitaniumglass
+ full_window = /obj/structure/window/plastitanium
+
+/obj/item/stack/sheet/plastitaniumglass/New(loc, amount)
+ recipes = GLOB.plastitaniumglass_recipes
+ ..()
diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm
index 4412b547b19..5ef40ee25e8 100644
--- a/code/game/objects/items/stacks/sheets/sheet_types.dm
+++ b/code/game/objects/items/stacks/sheets/sheet_types.dm
@@ -318,7 +318,11 @@ var/global/list/datum/stack_recipe/cult = list ( \
/*
* Brass
*/
-var/global/list/datum/stack_recipe/brass_recipes = list ( \
+var/global/list/datum/stack_recipe/brass_recipes = list (\
+ new/datum/stack_recipe/window("brass windoor", /obj/machinery/door/window/clockwork, 2, time = 30, on_floor = TRUE, window_checks = TRUE), \
+ null,
+ new/datum/stack_recipe/window("directional brass window", /obj/structure/window/reinforced/clockwork, time = 0, on_floor = TRUE, window_checks = TRUE), \
+ new/datum/stack_recipe/window("fulltile brass window", /obj/structure/window/reinforced/clockwork/fulltile, 2, time = 0, on_floor = TRUE, window_checks = TRUE), \
new/datum/stack_recipe("brass table frame", /obj/structure/table_frame/brass, 1, time = 5, one_per_turf = TRUE, on_floor = TRUE), \
)
diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm
index 4dd6ca365bf..e55569b23e8 100644
--- a/code/game/objects/items/stacks/stack.dm
+++ b/code/game/objects/items/stacks/stack.dm
@@ -149,6 +149,10 @@
to_chat(usr, "You haven't got enough [src] to build \the [R.title]!")
return 0
+ if(R.window_checks && !valid_window_location(usr.loc, usr.dir))
+ to_chat(usr, "The [R.title] won't fit here!")
+ return FALSE
+
if(R.one_per_turf && (locate(R.result_type) in creation_loc))
to_chat(usr, "There is another [R.title] here!")
return 0
@@ -166,7 +170,7 @@
return
var/atom/O = new R.result_type(creation_loc)
- O.dir = usr.dir
+ O.setDir(usr.dir)
if(R.max_res_amount > 1)
var/obj/item/stack/new_item = O
new_item.amount = R.res_amount * multiplier
diff --git a/code/game/objects/items/stacks/stack_recipe.dm b/code/game/objects/items/stacks/stack_recipe.dm
index 67ddd964d0d..10d06e9741d 100644
--- a/code/game/objects/items/stacks/stack_recipe.dm
+++ b/code/game/objects/items/stacks/stack_recipe.dm
@@ -11,8 +11,9 @@
var/time = 0
var/one_per_turf = 0
var/on_floor = 0
+ var/window_checks = FALSE
-/datum/stack_recipe/New(title, result_type, req_amount = 1, res_amount = 1, max_res_amount = 1, time = 0, one_per_turf = 0, on_floor = 0)
+/datum/stack_recipe/New(title, result_type, req_amount = 1, res_amount = 1, max_res_amount = 1, time = 0, one_per_turf = 0, on_floor = 0, window_checks = FALSE)
src.title = title
src.result_type = result_type
src.req_amount = req_amount
@@ -21,6 +22,7 @@
src.time = time
src.one_per_turf = one_per_turf
src.on_floor = on_floor
+ src.window_checks = window_checks
/datum/stack_recipe/proc/post_build(var/obj/item/stack/S, var/obj/result)
return
@@ -40,6 +42,17 @@
R.update_icon()
..()
+/datum/stack_recipe/window
+/datum/stack_recipe/window/post_build(obj/item/stack/S, obj/result)
+ if(istype(result, /obj/structure/windoor_assembly))
+ var/obj/structure/windoor_assembly/W = result
+ W.ini_dir = W.dir
+ else if(istype(result, /obj/structure/window))
+ var/obj/structure/window/W = result
+ W.ini_dir = W.dir
+ W.anchored = FALSE
+ W.state = WINDOW_OUT_OF_FRAME
+
/*
* Recipe list datum
*/
diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm
index fe132c107b0..5cc7ee684af 100644
--- a/code/game/objects/items/weapons/RCD.dm
+++ b/code/game/objects/items/weapons/RCD.dm
@@ -9,10 +9,10 @@ RCD
icon_state = "rcd"
opacity = 0
density = 0
- anchored = 0.0
- flags = CONDUCT
- force = 10.0
- throwforce = 10.0
+ anchored = 0
+ flags = CONDUCT | NOBLUDGEON
+ force = 0
+ throwforce = 10
throw_speed = 3
throw_range = 5
w_class = WEIGHT_CLASS_NORMAL
@@ -296,8 +296,6 @@ RCD
var/turf/T1 = get_turf(A)
QDEL_NULL(A)
for(var/obj/structure/window/W in T1.contents)
- W.disassembled = 1
- W.density = 0
qdel(W)
for(var/cdir in cardinal)
var/turf/T2 = get_step(T1, cdir)
@@ -307,8 +305,6 @@ RCD
continue
for(var/obj/structure/window/W in T2.contents)
if(W.dir == turn(cdir, 180))
- W.disassembled = 1
- W.density = 0
qdel(W)
var/obj/structure/window/reinforced/W = new(T2)
W.dir = turn(cdir, 180)
@@ -331,16 +327,12 @@ RCD
activate()
new /obj/structure/grille(A)
for(var/obj/structure/window/W in contents)
- W.disassembled = 1 // Prevent that annoying glass breaking sound
- W.density = 0
qdel(W)
for(var/cdir in cardinal)
var/turf/T = get_step(A, cdir)
if(locate(/obj/structure/grille) in T.contents)
for(var/obj/structure/window/W in T.contents)
if(W.dir == turn(cdir, 180))
- W.disassembled = 1
- W.density = 0
qdel(W)
else // Build a window!
var/obj/structure/window/reinforced/W = new(A)
diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm
index 9dbec23de49..75de2e018e1 100644
--- a/code/game/objects/items/weapons/twohanded.dm
+++ b/code/game/objects/items/weapons/twohanded.dm
@@ -176,16 +176,16 @@
icon_state = "fireaxe[wielded]"
return
-/obj/item/twohanded/fireaxe/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity)
- if(!proximity) return
- ..()
- if(A && wielded && (istype(A,/obj/structure/window) || istype(A,/obj/structure/grille))) //destroys windows and grilles in one hit
-
- if(istype(A,/obj/structure/window))
+/obj/item/twohanded/fireaxe/afterattack(atom/A, mob/user, proximity)
+ if(!proximity)
+ return
+ if(wielded)
+ if(istype(A, /obj/structure/window))
var/obj/structure/window/W = A
- W.destroy()
- else
- qdel(A)
+ W.take_damage(200, BRUTE, "melee", 0)
+ else if(istype(A, /obj/structure/grille))
+ var/obj/structure/grille/G = A
+ G.take_damage(40, BRUTE, "melee", 0)
/*
* Double-Bladed Energy Swords - Cheridan
@@ -751,7 +751,7 @@
if(A && wielded && (istype(A, /obj/structure/window) || istype(A, /obj/structure/grille)))
if(istype(A, /obj/structure/window))
var/obj/structure/window/W = A
- W.destroy()
+ W.deconstruct(FALSE)
if(prob(4))
charged++
user.visible_message("The axe starts to emit an electric buzz!")
diff --git a/code/game/objects/structures/fullwindow.dm b/code/game/objects/structures/fullwindow.dm
deleted file mode 100644
index eec957c2d52..00000000000
--- a/code/game/objects/structures/fullwindow.dm
+++ /dev/null
@@ -1,116 +0,0 @@
-/obj/structure/window/full
- sheets = 2
- dir=SOUTHWEST
- level = 3
-
-/obj/structure/window/full/CheckExit(atom/movable/O as mob|obj, target as turf)
- return 1
-
-/obj/structure/window/full/CanPass(atom/movable/mover, turf/target, height=0)
- if(istype(mover) && mover.checkpass(PASSGLASS))
- return 1
- return 0
-
-/obj/structure/window/full/is_fulltile()
- return 1
-
-//merges adjacent full-tile windows into one (blatant ripoff from game/smoothwall.dm)
-/obj/structure/window/full/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
- //This spawn is here so windows get properly updated when one gets deleted.
- spawn(2)
- if(!src) return
- if(!is_fulltile())
- return
- var/junction = 0 //will be used to determine from which side the window is connected to other windows
- if(anchored)
- for(var/obj/structure/window/full/W in orange(src,1))
- if(W.anchored && W.density) //Only counts anchored, not-destroyed full-tile windows.
- if(abs(x-W.x)-abs(y-W.y) ) //doesn't count windows, placed diagonally to src
- junction |= get_dir(src,W)
- icon_state = "[basestate][junction]"
- return
-
-/obj/structure/window/full/basic
- desc = "It looks thin and flimsy. A few knocks with... anything, really should shatter it."
- icon_state = "window"
- basestate = "window"
-
-/obj/structure/window/full/plasmabasic
- name = "plasma window"
- desc = "A plasma-glass alloy window. It looks insanely tough to break. It appears it's also insanely tough to burn through."
- basestate = "plasmawindow"
- icon_state = "plasmawindow"
- shardtype = /obj/item/shard/plasma
- glasstype = /obj/item/stack/sheet/plasmaglass
- health = 240
-
-/obj/structure/window/full/plasmabasic/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
- if(exposed_temperature > T0C + 32000)
- hit(round(exposed_volume / 1000), 0)
- ..()
-
-/obj/structure/window/full/plasmareinforced
- name = "reinforced plasma window"
- desc = "A plasma-glass alloy window, with rods supporting it. It looks hopelessly tough to break. It also looks completely fireproof, considering how basic plasma windows are insanely fireproof."
- basestate = "plasmarwindow"
- icon_state = "plasmarwindow"
- shardtype = /obj/item/shard/plasma
- glasstype = /obj/item/stack/sheet/plasmaglass
- reinf = 1
- health = 320
-
-/obj/structure/window/full/plasmareinforced/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
- return
-
-/obj/structure/window/full/reinforced
- name = "reinforced window"
- desc = "It looks rather strong. Might take a few good hits to shatter it."
- icon_state = "rwindow"
- basestate = "rwindow"
- health = 80
- reinf = 1
-
-/obj/structure/window/full/reinforced/tinted
- name = "tinted window"
- 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/full/reinforced/tinted/frosted
- name = "frosted window"
- 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"
- health = 60
-
-/obj/structure/window/full/shuttle
- name = "shuttle window"
- desc = "It looks rather strong. Might take a few good hits to shatter it."
- icon = 'icons/obj/podwindows.dmi'
- icon_state = "window"
- basestate = "window"
- health = 160
- reinf = 1
- explosion_block = 3
- armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 50, "bio" = 100, "rad" = 100)
-
-/obj/structure/window/full/shuttle/New()
- ..()
- color = null
-
-/obj/structure/window/full/shuttle/update_icon() //icon_state has to be set manually
- return
-
-/obj/structure/window/full/shuttle/shuttleRotate(rotation)
- ..()
- var/matrix/M = transform
- M.Turn(rotation)
- transform = M
-
-/obj/structure/window/full/shuttle/dark
- icon = 'icons/turf/shuttle.dmi'
- icon_state = "window5"
- basestate = "window5"
\ No newline at end of file
diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm
index 0c0c3c1aa0c..6e373292d5b 100644
--- a/code/game/objects/structures/grille.dm
+++ b/code/game/objects/structures/grille.dm
@@ -137,7 +137,7 @@
return
//window placing begin
- else if(istype(W,/obj/item/stack/sheet/rglass) || istype(W,/obj/item/stack/sheet/glass) || istype(W,/obj/item/stack/sheet/plasmaglass) || istype(W,/obj/item/stack/sheet/plasmarglass))
+ else if(is_glass_sheet(W))
build_window(W, user)
return
//window placing end
@@ -190,10 +190,10 @@
S.use(1)
W.setDir(dir_to_set)
W.ini_dir = dir_to_set
- W.anchored = 0
- W.state = 0
+ W.anchored = FALSE
+ W.state = WINDOW_OUT_OF_FRAME
to_chat(user, "You place the [W] on [src].")
- W.update_icon()
+ W.update_nearby_icons()
return
/obj/structure/grille/attacked_by(obj/item/I, mob/living/user)
diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm
index dcf89008416..72469e2ebfb 100644
--- a/code/game/objects/structures/windoor_assembly.dm
+++ b/code/game/objects/structures/windoor_assembly.dm
@@ -27,6 +27,10 @@
var/secure = FALSE //Whether or not this creates a secure windoor
var/state = "01" //How far the door assembly has progressed
+/obj/structure/windoor_assembly/examine(mob/user)
+ ..()
+ to_chat(user, "Alt-click to rotate it clockwise.")
+
obj/structure/windoor_assembly/New(loc, set_dir)
..()
if(set_dir)
@@ -42,7 +46,7 @@ obj/structure/windoor_assembly/Destroy()
/obj/structure/windoor_assembly/Move()
var/turf/T = loc
- . = ..()
+ ..()
setDir(ini_dir)
move_update_air(T)
@@ -54,8 +58,17 @@ obj/structure/windoor_assembly/Destroy()
return 1
if(get_dir(loc, target) == dir) //Make sure looking at appropriate border
return !density
- else
- return 1
+ if(istype(mover, /obj/structure/window))
+ var/obj/structure/window/W = mover
+ if(!valid_window_location(loc, W.ini_dir))
+ return FALSE
+ else if(istype(mover, /obj/structure/windoor_assembly))
+ var/obj/structure/windoor_assembly/W = mover
+ if(!valid_window_location(loc, W.ini_dir))
+ return FALSE
+ else if(istype(mover, /obj/machinery/door/window) && !valid_window_location(loc, mover.dir))
+ return FALSE
+ return 1
/obj/structure/windoor_assembly/CanAtmosPass(turf/T)
if(get_dir(loc, T) == dir)
@@ -317,9 +330,16 @@ obj/structure/windoor_assembly/Destroy()
if(usr.stat || !usr.canmove || usr.restrained())
return
if(anchored)
- to_chat(usr, "It is fastened to the floor; therefore, you can't rotate it!")
- return 0
- setDir(turn(dir, 270))
+ to_chat(usr, "[src] cannot be rotated while it is fastened to the floor!")
+ return FALSE
+ var/target_dir = turn(dir, 270)
+
+ if(!valid_window_location(loc, target_dir))
+ to_chat(usr, "[src] cannot be rotated in that direction!")
+ return FALSE
+
+ setDir(target_dir)
+
ini_dir = dir
update_icon()
return TRUE
diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm
index aebd111ad26..fa856b1336f 100644
--- a/code/game/objects/structures/window.dm
+++ b/code/game/objects/structures/window.dm
@@ -2,13 +2,14 @@ var/global/wcBar = pick(list("#0d8395", "#58b5c3", "#58c366", "#90d79a", "#fffff
var/global/wcBrig = pick(list("#aa0808", "#7f0606", "#ff0000"))
var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8fcf44", "#ffffff"))
-/obj/proc/color_windows(var/obj/W as obj)
+/obj/proc/color_windows(obj/W)
var/list/wcBarAreas = list(/area/crew_quarters/bar)
var/list/wcBrigAreas = list(/area/security,/area/prison,/area/shuttle/gamma)
var/newcolor
var/turf/T = get_turf(W)
- if(!istype(T)) return
+ if(!istype(T))
+ return
var/area/A = T.loc
if(is_type_in_list(A,wcBarAreas))
@@ -23,168 +24,206 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
/obj/structure/window
name = "window"
desc = "A window."
- icon = 'icons/obj/structures.dmi'
- density = 1
- layer = 3.2//Just above doors
+ icon_state = "window"
+ density = TRUE
+ layer = ABOVE_OBJ_LAYER //Just above doors
pressure_resistance = 4*ONE_ATMOSPHERE
- anchored = 1.0
+ anchored = TRUE
flags = ON_BORDER
- var/health = 14.0
+ can_be_unanchored = TRUE
+ max_integrity = 25
var/ini_dir = null
- var/state = 2
- var/reinf = 0
- var/basestate
+ var/state = WINDOW_OUT_OF_FRAME
+ var/reinf = FALSE
+ var/heat_resistance = 800
+ var/decon_speed = null
+ var/fulltile = FALSE
var/shardtype = /obj/item/shard
- var/glasstype = /obj/item/stack/sheet/glass
- var/disassembled = 0
- var/sheets = 1 // Number of sheets needed to build this window (determines how much shit is spawned by destroy())
-// var/silicate = 0 // number of units of silicate
-// var/icon/silicateIcon = null // the silicated icon
+ var/glass_type = /obj/item/stack/sheet/glass
+ var/glass_amount = 1
+ var/cancolor = FALSE
+ var/image/crack_overlay
+ var/list/debris = list()
+ var/real_explosion_block //ignore this, just use explosion_block
+ var/breaksound = "shatter"
+ var/hitsound = 'sound/effects/Glasshit.ogg'
-/obj/structure/window/bullet_act(var/obj/item/projectile/Proj)
- if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
- health -= Proj.damage
- air_update_turf(1)
+/obj/structure/window/examine(mob/user)
..()
- if(health <= 0)
- destroy()
- return
+ if(reinf)
+ if(anchored && state == WINDOW_SCREWED_TO_FRAME)
+ to_chat(user, "The window is screwed to the frame.")
+ else if(anchored && state == WINDOW_IN_FRAME)
+ to_chat(user, "The window is unscrewed but pried into the frame.")
+ else if(anchored && state == WINDOW_OUT_OF_FRAME)
+ to_chat(user, "The window is out of the frame, but could be pried in. It is screwed to the floor.")
+ else if(!anchored)
+ to_chat(user, "The window is unscrewed from the floor, and could be deconstructed by wrenching.")
+ else
+ if(anchored)
+ to_chat(user, "The window is screwed to the floor.")
+ else
+ to_chat(user, "The window is unscrewed from the floor, and could be deconstructed by wrenching.")
+ if(!anchored && !fulltile)
+ to_chat(user, "Alt-click to rotate it clockwise.")
-// This should result in the same materials used to make the window.
-/obj/structure/window/proc/destroy()
- for(var/i=0;i= STAGE_FIVE)
- destroy()
+ deconstruct(FALSE)
-/obj/structure/window/CheckExit(var/atom/movable/O, var/turf/target)
- if(istype(O) && O.checkpass(PASSGLASS))
- return 1
- if(get_dir(O.loc, target) == dir)
- return !density
- return 1
+/obj/structure/window/setDir(direct)
+ if(!fulltile)
+ ..()
+ else
+ ..(FULLTILE_WINDOW_DIR)
/obj/structure/window/CanPass(atom/movable/mover, turf/target, height=0)
if(istype(mover) && mover.checkpass(PASSGLASS))
return 1
- if(dir == SOUTHWEST || dir == SOUTHEAST || dir == NORTHWEST || dir == NORTHEAST)
+ if(dir == FULLTILE_WINDOW_DIR)
return 0 //full tile window, you can't move into it!
if(get_dir(loc, target) == dir)
return !density
- else
+ if(istype(mover, /obj/structure/window))
+ var/obj/structure/window/W = mover
+ if(!valid_window_location(loc, W.ini_dir))
+ return FALSE
+ else if(istype(mover, /obj/structure/windoor_assembly))
+ var/obj/structure/windoor_assembly/W = mover
+ if(!valid_window_location(loc, W.ini_dir))
+ return FALSE
+ else if(istype(mover, /obj/machinery/door/window) && !valid_window_location(loc, mover.dir))
+ return FALSE
+ return 1
+
+/obj/structure/window/CheckExit(atom/movable/O, target)
+ if(istype(O) && O.checkpass(PASSGLASS))
return 1
+ if(get_dir(O.loc, target) == dir)
+ return 0
+ return 1
/obj/structure/window/CanAStarPass(ID, to_dir)
if(!density)
return 1
- if((dir == SOUTHWEST) || (dir == to_dir))
+ if((dir == FULLTILE_WINDOW_DIR) || (dir == to_dir))
return 0
return 1
-/obj/structure/window/hitby(atom/movable/AM)
- ..()
- var/tforce = 0
- if(ismob(AM))
- tforce = 10
- else if(isobj(AM))
- var/obj/O = AM
- tforce = O.throwforce
- if(reinf)
- tforce *= 0.25
- playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1)
- health = max(0, health - tforce)
- if(health <= 7 && !reinf)
- anchored = 0
- update_nearby_icons()
- step(src, get_dir(AM, src))
- if(health <= 0)
- destroy()
+/obj/structure/window/attack_tk(mob/user)
+ user.changeNext_move(CLICK_CD_MELEE)
+ user.visible_message("Something knocks on [src].")
+ add_fingerprint(user)
+ playsound(src, 'sound/effects/Glassknock.ogg', 50, 1)
-
-/obj/structure/window/attack_hand(mob/user as mob)
+/obj/structure/window/attack_hand(mob/user)
+ if(!can_be_reached(user))
+ return
if(HULK in user.mutations)
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!"))
user.visible_message("[user] smashes through [src]!")
- destroy()
+ deconstruct(FALSE)
else if(user.a_intent == INTENT_HARM)
user.changeNext_move(CLICK_CD_MELEE)
- playsound(get_turf(src), 'sound/effects/glassknock.ogg', 80, 1)
- user.visible_message("[user.name] bangs against the [src.name]!", \
- "You bang against the [src.name]!", \
+ playsound(src, 'sound/effects/glassknock.ogg', 80, 1)
+ user.visible_message("[user] bangs against [src]!", \
+ "You bang against [src]!", \
"You hear a banging sound.")
+ add_fingerprint(user)
else
user.changeNext_move(CLICK_CD_MELEE)
- playsound(src.loc, 'sound/effects/glassknock.ogg', 80, 1)
- user.visible_message("[user.name] knocks on the [src.name].", \
- "You knock on the [src.name].", \
+ playsound(src, 'sound/effects/glassknock.ogg', 80, 1)
+ user.visible_message("[user] knocks on [src].", \
+ "You knock on [src].", \
"You hear a knocking sound.")
- return
+ add_fingerprint(user)
-
-/obj/structure/window/attack_generic(mob/living/user, damage = 0) //used by attack_alien, attack_animal, and attack_slime
- user.changeNext_move(CLICK_CD_MELEE)
- user.do_attack_animation(src)
- health -= damage
- if(health <= 0)
- user.visible_message("[user] smashes through [src]!")
- destroy()
- else //for nicer text~
- user.visible_message("[user] smashes into [src]!")
- playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1)
-
-
-/obj/structure/window/attack_alien(mob/living/user as mob)
- if(islarva(user)) return
- attack_generic(user, 15)
-
-/obj/structure/window/attack_animal(mob/living/user as mob)
- if(!isanimal(user)) return
- var/mob/living/simple_animal/M = user
- if(M.melee_damage_upper <= 0 || (M.melee_damage_type != BRUTE && M.melee_damage_type != BURN))
+/obj/structure/window/attack_generic(mob/user, damage_amount = 0, damage_type = BRUTE, damage_flag = 0, sound_effect = 1) //used by attack_alien, attack_animal, and attack_slime
+ if(!can_be_reached(user))
return
- attack_generic(M, M.melee_damage_upper)
+ ..()
+/obj/structure/window/attackby(obj/item/I, mob/living/user, params)
+ if(!can_be_reached(user))
+ return 1 //skip the afterattack
-/obj/structure/window/attack_slime(mob/living/user as mob)
- var/mob/living/carbon/slime/S = user
- if(!S.is_adult)
+ add_fingerprint(user)
+
+ if(iswelder(I) && user.a_intent == INTENT_HELP)
+ var/obj/item/weldingtool/WT = I
+ if(obj_integrity < max_integrity)
+ if(WT.remove_fuel(0,user))
+ to_chat(user, "You begin repairing [src]...")
+ playsound(src, WT.usesound, 40, 1)
+ if(do_after(user, 40*I.toolspeed, target = src))
+ obj_integrity = max_integrity
+ playsound(src, 'sound/items/Welder2.ogg', 50, 1)
+ update_nearby_icons()
+ to_chat(user, "You repair [src].")
+ else
+ to_chat(user, "[src] is already in good condition!")
return
- attack_generic(user, rand(10, 15))
-
-/obj/structure/window/attackby(obj/item/I as obj, mob/living/user as mob, params)
- if(!istype(I))
- return//I really wish I did not need this
- if(istype(I, /obj/item/grab) && get_dist(src,user)<2)
+ if(istype(I, /obj/item/grab) && get_dist(src, user) < 2)
var/obj/item/grab/G = I
- if(istype(G.affecting,/mob/living))
+ if(isliving(G.affecting))
var/mob/living/M = G.affecting
var/state = G.state
qdel(I) //gotta delete it here because if window breaks, it won't get deleted
@@ -192,129 +231,120 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
if(1)
M.visible_message("[user] slams [M] against \the [src]!")
M.apply_damage(7)
- hit(10)
+ take_damage(10)
if(2)
M.visible_message("[user] bashes [M] against \the [src]!")
if(prob(50))
M.Weaken(1)
M.apply_damage(10)
- hit(25)
+ take_damage(25)
if(3)
M.visible_message("[user] crushes [M] against \the [src]!")
M.Weaken(5)
M.apply_damage(20)
- hit(50)
+ take_damage(50)
if(4)
visible_message("[user] smashes [M] against \the [src]!")
M.Weaken(5)
M.apply_damage(30)
- hit(75)
+ take_damage(75)
return
- if(I.flags & NOBLUDGEON)
- return
-
- if(handle_decon(I, user, is_fulltile()))
- return
-
- if(I.damtype == BRUTE || I.damtype == BURN)
- user.changeNext_move(CLICK_CD_MELEE)
- hit(I.force)
- if(health <= 7)
- anchored = 0
- update_nearby_icons()
- step(src, get_dir(user, src))
- else
- playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
- ..()
-
-/obj/structure/window/proc/handle_decon(obj/item/W, mob/user, var/takes_time = FALSE)
- //screwdriver
- if(isscrewdriver(W))
- playsound(loc, W.usesound, 75, 1)
- if(reinf)
- if(state == 0)
- if(takes_time)
- to_chat(user, "You begin to [anchored ? "unfasten the frame from" : "fasten the frame to"] the floor.")
- if(!do_after(user, 20 * W.toolspeed, target = src))
- return 1
- anchored = !anchored
- to_chat(user, "You have [anchored? "fastened the frame to" : "unfastened the frame from"] the floor.")
- if(state >= 1)
- if(takes_time)
- to_chat(user, "You begin to [(state == 1) ? "fasten the window to" : "unfasten the window from"] the frame.")
- if(!do_after(user, 20 * W.toolspeed, target = src))
- return 1
- state = 3 - state
- to_chat(user, "You have [(state == 1) ? "unfastened the window from" : "fastened the window to"] the frame.")
- else
- if(takes_time)
- to_chat(user, "You begin to [anchored ? "unfasten the frame from" : "fasten the frame to"] the floor.")
- if(!do_after(user, 20 * W.toolspeed, target = src))
- return 1
- anchored = !anchored
- update_nearby_icons()
- to_chat(user, "You have [anchored ? "fastened the window to" : "unfastened the window from"] the floor.")
- return 1
- //crowbar
- if(iscrowbar(W))
- if(!reinf || state > 1)
- return 0
- playsound(loc, W.usesound, 75, 1)
- if(takes_time)
- to_chat(user, "You begin to pry the window [state ? "out of" : "in to"] the frame.")
- if(!do_after(user, 20 * W.toolspeed, target = src))
- return 1
- state = 1 - state
- to_chat(user, "You have pried the window [state ? "into" : "out of"] the frame.")
- return 1
- //wrench
- if(iswrench(W))
- if(anchored)
- return 0
- playsound(loc, W.usesound, 50, 1)
- if(takes_time)
- to_chat(user, "You begin to disassemble [src]...")
- if(!do_after(user, 20 * W.toolspeed, target = src))
- return 1
- for(var/i=0; i= S.max_amount)
- continue
- S.attackby(NS, user)
+ if(can_deconstruct)
+ if(isscrewdriver(I))
+ playsound(src, I.usesound, 75, 1)
if(reinf)
- var/obj/item/stack/rods/NR = new (get_turf(src))
- for(var/obj/item/stack/rods/R in loc)
- if(R == NR)
- continue
- if(R.amount >= R.max_amount)
- continue
- R.attackby(NR, user)
+ if(state == WINDOW_SCREWED_TO_FRAME || state == WINDOW_IN_FRAME)
+ to_chat(user, "You begin to [state == WINDOW_SCREWED_TO_FRAME ? "unscrew the window from":"screw the window to"] the frame...")
+ if(do_after(user, decon_speed*I.toolspeed, target = src, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored)))
+ state = (state == WINDOW_IN_FRAME ? WINDOW_SCREWED_TO_FRAME : WINDOW_IN_FRAME)
+ to_chat(user, "You [state == WINDOW_IN_FRAME ? "unfasten the window from":"fasten the window to"] the frame.")
+ else if(state == WINDOW_OUT_OF_FRAME)
+ to_chat(user, "You begin to [anchored ? "unscrew the frame from":"screw the frame to"] the floor...")
+ if(do_after(user, decon_speed*I.toolspeed, target = src, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored)))
+ anchored = !anchored
+ update_nearby_icons()
+ to_chat(user, "You [anchored ? "fasten the frame to":"unfasten the frame from"] the floor.")
+ else //if we're not reinforced, we don't need to check or update state
+ to_chat(user, "You begin to [anchored ? "unscrew the window from":"screw the window to"] the floor...")
+ if(do_after(user, decon_speed*I.toolspeed, target = src, extra_checks = CALLBACK(src, .proc/check_anchored, anchored)))
+ anchored = !anchored
+ air_update_turf(TRUE)
+ update_nearby_icons()
+ to_chat(user, "You [anchored ? "fasten the window to":"unfasten the window from"] the floor.")
+ return
- to_chat(user, "You have disassembled [src].")
- disassembled = 1
- density = 0
- air_update_turf(1)
- update_nearby_icons()
- qdel(src)
- return 1
+ else if(iscrowbar(I) && reinf && (state == WINDOW_OUT_OF_FRAME || state == WINDOW_IN_FRAME))
+ to_chat(user, "You begin to lever the window [state == WINDOW_OUT_OF_FRAME ? "into":"out of"] the frame...")
+ playsound(src, I.usesound, 75, 1)
+ if(do_after(user, decon_speed*I.toolspeed, target = src, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored)))
+ state = (state == WINDOW_OUT_OF_FRAME ? WINDOW_IN_FRAME : WINDOW_OUT_OF_FRAME)
+ to_chat(user, "You pry the window [state == WINDOW_IN_FRAME ? "into":"out of"] the frame.")
+ return
+
+ else if(iswrench(I) && !anchored)
+ playsound(src, I.usesound, 75, 1)
+ to_chat(user, " You begin to disassemble [src]...")
+ if(do_after(user, decon_speed*I.toolspeed, target = src, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored)))
+ var/obj/item/stack/sheet/G = new glass_type(user.loc, glass_amount)
+ G.add_fingerprint(user)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
+ to_chat(user, "You successfully disassemble [src].")
+ qdel(src)
+ return
+ return ..()
+
+/obj/structure/window/proc/check_state(checked_state)
+ if(state == checked_state)
+ return TRUE
+
+/obj/structure/window/proc/check_anchored(checked_anchored)
+ if(anchored == checked_anchored)
+ return TRUE
+
+/obj/structure/window/proc/check_state_and_anchored(checked_state, checked_anchored)
+ return check_state(checked_state) && check_anchored(checked_anchored)
/obj/structure/window/mech_melee_attack(obj/mecha/M)
- if(..())
- hit(M.force, 1)
-
-/obj/structure/window/proc/hit(var/damage, var/sound_effect = 1)
- if(reinf) damage *= 0.5
- health = max(0, health - damage)
- if(sound_effect)
- playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
- if(health <= 0)
- destroy()
+ if(!can_be_reached())
return
+ ..()
+/obj/structure/window/proc/can_be_reached(mob/user)
+ if(!fulltile)
+ if(get_dir(user, src) & dir)
+ for(var/obj/O in loc)
+ if(!O.CanPass(user, user.loc, 1))
+ return 0
+ return 1
+
+/obj/structure/window/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1)
+ . = ..()
+ if(.) //received damage
+ update_nearby_icons()
+
+/obj/structure/window/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
+ switch(damage_type)
+ if(BRUTE)
+ if(damage_amount)
+ playsound(src, hitsound, 75, 1)
+ else
+ playsound(src, 'sound/weapons/tap.ogg', 50, 1)
+ if(BURN)
+ playsound(src, 'sound/items/Welder.ogg', 100, 1)
+
+/obj/structure/window/deconstruct(disassembled = TRUE)
+ if(QDELETED(src))
+ return
+ if(!disassembled)
+ playsound(src, breaksound, 70, 1)
+ if(can_deconstruct)
+ for(var/i in debris)
+ var/obj/item/I = i
+ I.forceMove(loc)
+ transfer_fingerprints_to(I)
+ qdel(src)
+ update_nearby_icons()
/obj/structure/window/verb/rotate()
set name = "Rotate Window Counter-Clockwise"
@@ -325,15 +355,19 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
return
if(anchored)
- to_chat(usr, "It is fastened to the floor therefore you can't rotate it!")
- return 0
+ to_chat(usr, "[src] cannot be rotated while it is fastened to the floor!")
+ return FALSE
- dir = turn(dir, 90)
-// updateSilicate()
+ var/target_dir = turn(dir, 90)
+ if(!valid_window_location(loc, target_dir))
+ to_chat(usr, "[src] cannot be rotated in that direction!")
+ return FALSE
+
+ setDir(target_dir)
air_update_turf(1)
ini_dir = dir
add_fingerprint(usr)
- return
+ return TRUE
/obj/structure/window/verb/revrotate()
set name = "Rotate Window Clockwise"
@@ -344,16 +378,19 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
return
if(anchored)
- to_chat(usr, "It is fastened to the floor therefore you can't rotate it!")
- return 0
+ to_chat(usr, "[src] cannot be rotated while it is fastened to the floor!")
+ return FALSE
- dir = turn(dir, 270)
-// updateSilicate()
- air_update_turf(1)
+ var/target_dir = turn(dir, 270)
+
+ if(!valid_window_location(loc, target_dir))
+ to_chat(usr, "[src] cannot be rotated in that direction!")
+ return FALSE
+
+ setDir(target_dir)
ini_dir = dir
add_fingerprint(usr)
- return
-
+ return TRUE
/obj/structure/window/AltClick(mob/user)
if(user.incapacitated())
@@ -363,158 +400,77 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
return
revrotate()
-/*
-/obj/structure/window/proc/updateSilicate()
- if(silicateIcon && silicate)
- icon = initial(icon)
-
- var/icon/I = icon(icon,icon_state,dir)
-
- var/r = (silicate / 100) + 1
- var/g = (silicate / 70) + 1
- var/b = (silicate / 50) + 1
- I.SetIntensity(r,g,b)
- icon = I
- silicateIcon = I
-*/
-
-/obj/structure/window/New(Loc,re=0)
- ..()
- ini_dir = dir
- if(!color && !istype(src,/obj/structure/window/plasmabasic) && !istype(src,/obj/structure/window/plasmareinforced))
- color = color_windows(src)
- update_nearby_icons()
- return
-
-/obj/structure/window/Initialize()
- air_update_turf(1)
- return ..()
-
/obj/structure/window/Destroy()
- density = 0
+ density = FALSE
air_update_turf(1)
- if(loc && !disassembled)
- playsound(get_turf(src), "shatter", 70, 1)
+ update_nearby_icons()
return ..()
-
/obj/structure/window/Move()
var/turf/T = loc
..()
- dir = ini_dir
+ setDir(ini_dir)
move_update_air(T)
-//checks if this window is full-tile one
-/obj/structure/window/proc/is_fulltile()
- if(dir & (dir - 1))
- return 1
- return 0
-
/obj/structure/window/CanAtmosPass(turf/T)
- if(get_dir(loc, T) == dir)
- return !density
- if(dir == SOUTHWEST || dir == SOUTHEAST || dir == NORTHWEST || dir == NORTHEAST)
- return !density
- return 1
+ if(!anchored || !density)
+ return TRUE
+ return !(FULLTILE_WINDOW_DIR == dir || dir == get_dir(loc, T))
//This proc is used to update the icons of nearby windows.
/obj/structure/window/proc/update_nearby_icons()
- if(!loc) return 0
update_icon()
- for(var/direction in cardinal)
- for(var/obj/structure/window/W in get_step(src,direction) )
- W.update_icon()
+ if(smooth)
+ smooth_icon_neighbors(src)
/obj/structure/window/update_icon()
- return
+ if(!QDELETED(src))
+ if(!fulltile)
+ return
+ var/ratio = obj_integrity / max_integrity
+ ratio = CEILING(ratio*4, 1) * 25
+ if(smooth)
+ smooth_icon(src)
+ overlays -= crack_overlay
+ if(ratio > 75)
+ return
+ crack_overlay = image('icons/obj/structures.dmi',"damage[ratio]",-(layer+0.1))
+ overlays += crack_overlay
/obj/structure/window/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
- if(exposed_temperature > T0C + 800)
- hit(round(exposed_volume / 100), 0)
+ if(exposed_temperature > (T0C + heat_resistance))
+ take_damage(round(exposed_volume / 100), BURN, 0, 0)
..()
+/obj/structure/window/GetExplosionBlock()
+ return reinf && fulltile ? real_explosion_block : 0
+
/obj/structure/window/basic
- icon_state = "window"
desc = "It looks thin and flimsy. A few knocks with... anything, really should shatter it."
- basestate = "window"
-
-/obj/structure/window/plasmabasic
- name = "plasma window"
- desc = "A plasma-glass alloy window. It looks insanely tough to break. It appears it's also insanely tough to burn through."
- basestate = "plasmawindow"
- icon_state = "plasmawindow"
- shardtype = /obj/item/shard/plasma
- glasstype = /obj/item/stack/sheet/plasmaglass
- health = 120
- armor = list("melee" = 75, "bullet" = 5, "laser" = 0, "energy" = 0, "bomb" = 45, "bio" = 100, "rad" = 100)
-
-/obj/structure/window/plasmabasic/New(Loc,re=0)
- ..()
- ini_dir = dir
- update_nearby_icons()
- return
-
-/obj/structure/window/plasmabasic/Initialize()
- ..()
- air_update_turf(1)
-
-/obj/structure/window/plasmabasic/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
- if(exposed_temperature > T0C + 32000)
- hit(round(exposed_volume / 1000), 0)
- ..()
-
-/obj/structure/window/plasmabasic/BlockSuperconductivity()
- return 1
-
-/obj/structure/window/plasmareinforced
- name = "reinforced plasma window"
- desc = "A plasma-glass alloy window, with rods supporting it. It looks hopelessly tough to break. It also looks completely fireproof, considering how basic plasma windows are insanely fireproof."
- basestate = "plasmarwindow"
- icon_state = "plasmarwindow"
- shardtype = /obj/item/shard/plasma
- glasstype = /obj/item/stack/sheet/plasmaglass
- reinf = 1
- health = 160
- armor = list("melee" = 85, "bullet" = 20, "laser" = 0, "energy" = 0, "bomb" = 60, "bio" = 100, "rad" = 100)
-
-/obj/structure/window/plasmareinforced/New(Loc,re=0)
- ..()
- ini_dir = dir
- update_nearby_icons()
- return
-
-/obj/structure/window/plasmareinforced/Initialize()
- ..()
- air_update_turf(1)
-
-/obj/structure/window/plasmareinforced/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
- return
-
-/obj/structure/window/plasmareinforced/BlockSuperconductivity()
- return 1 //okay this SHOULD MAKE THE TOXINS CHAMBER WORK
/obj/structure/window/reinforced
name = "reinforced window"
desc = "It looks rather strong. Might take a few good hits to shatter it."
icon_state = "rwindow"
- reinf = 1
- basestate = "rwindow"
- health = 40
+ reinf = TRUE
+ cancolor = TRUE
+ heat_resistance = 1600
armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 25, "bio" = 100, "rad" = 100)
+ max_integrity = 50
+ explosion_block = 1
+ glass_type = /obj/item/stack/sheet/rglass
/obj/structure/window/reinforced/tinted
name = "tinted window"
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"
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"
- health = 30
+ max_integrity = 30
/obj/structure/window/reinforced/polarized
name = "electrochromic window"
@@ -529,8 +485,6 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
animate(src, color="#222222", time=5)
set_opacity(1)
-
-
/obj/machinery/button/windowtint
name = "window tint control"
icon = 'icons/obj/power.dmi'
@@ -540,7 +494,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
var/id = 0
var/active = 0
-/obj/machinery/button/windowtint/attack_hand(mob/user as mob)
+/obj/machinery/button/windowtint/attack_hand(mob/user)
if(..())
return 1
@@ -565,3 +519,195 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
/obj/machinery/button/windowtint/update_icon()
icon_state = "light[active]"
+
+/obj/structure/window/plasmabasic
+ name = "plasma window"
+ desc = "A window made out of a plasma-silicate alloy. It looks insanely tough to break and burn through."
+ icon_state = "plasmawindow"
+ shardtype = /obj/item/shard/plasma
+ glass_type = /obj/item/stack/sheet/plasmaglass
+ heat_resistance = 32000
+ max_integrity = 120
+ explosion_block = 1
+ armor = list("melee" = 75, "bullet" = 5, "laser" = 0, "energy" = 0, "bomb" = 45, "bio" = 100, "rad" = 100)
+
+/obj/structure/window/plasmabasic/BlockSuperconductivity()
+ return 1
+
+/obj/structure/window/plasmareinforced
+ name = "reinforced plasma window"
+ desc = "A plasma-glass alloy window, with rods supporting it. It looks hopelessly tough to break. It also looks completely fireproof, considering how basic plasma windows are insanely fireproof."
+ icon_state = "plasmarwindow"
+ shardtype = /obj/item/shard/plasma
+ glass_type = /obj/item/stack/sheet/plasmaglass
+ reinf = TRUE
+ max_integrity = 160
+ explosion_block = 2
+ armor = list("melee" = 85, "bullet" = 20, "laser" = 0, "energy" = 0, "bomb" = 60, "bio" = 100, "rad" = 100)
+
+/obj/structure/window/plasmareinforced/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
+ return
+
+/obj/structure/window/plasmareinforced/BlockSuperconductivity()
+ return 1 //okay this SHOULD MAKE THE TOXINS CHAMBER WORK
+
+/obj/structure/window/full
+ glass_amount = 2
+ dir = FULLTILE_WINDOW_DIR
+ level = 3
+ fulltile = TRUE
+
+/obj/structure/window/full/basic
+ desc = "It looks thin and flimsy. A few knocks with... anything, really should shatter it."
+ icon = 'icons/obj/smooth_structures/window.dmi'
+ icon_state = "window"
+ 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)
+
+/obj/structure/window/full/plasmabasic
+ name = "plasma window"
+ desc = "A plasma-glass alloy window. It looks insanely tough to break. It appears it's also insanely tough to burn through."
+ icon = 'icons/obj/smooth_structures/plasma_window.dmi'
+ icon_state = "plasmawindow"
+ shardtype = /obj/item/shard/plasma
+ glass_type = /obj/item/stack/sheet/plasmaglass
+ heat_resistance = 32000
+ max_integrity = 240
+ 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)
+
+/obj/structure/window/full/plasmareinforced
+ name = "reinforced plasma window"
+ desc = "A plasma-glass alloy window, with rods supporting it. It looks hopelessly tough to break. It also looks completely fireproof, considering how basic plasma windows are insanely fireproof."
+ icon = 'icons/obj/smooth_structures/rplasma_window.dmi'
+ icon_state = "rplasmawindow"
+ shardtype = /obj/item/shard/plasma
+ glass_type = /obj/item/stack/sheet/plasmaglass
+ smooth = SMOOTH_TRUE
+ reinf = TRUE
+ max_integrity = 320
+
+/obj/structure/window/full/plasmareinforced/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
+ return
+
+/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_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)
+ max_integrity = 100
+ reinf = TRUE
+ heat_resistance = 1600
+ armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 25, "bio" = 100, "rad" = 100)
+ explosion_block = 1
+ glass_type = /obj/item/stack/sheet/rglass
+ cancolor = TRUE
+
+/obj/structure/window/full/reinforced/tinted
+ name = "tinted window"
+ desc = "It looks rather strong and opaque. Might take a few good hits to shatter it."
+ icon = 'icons/obj/smooth_structures/tinted_window.dmi'
+ icon_state = "tinted_window"
+ opacity = 1
+
+obj/structure/window/full/reinforced/ice
+ icon = 'icons/obj/smooth_structures/rice_window.dmi'
+ icon_state = "ice_window"
+ max_integrity = 150
+ cancolor = FALSE
+
+/obj/structure/window/full/shuttle
+ name = "shuttle window"
+ desc = "A reinforced, air-locked pod window."
+ icon = 'icons/obj/smooth_structures/shuttle_window.dmi'
+ icon_state = "shuttle_window"
+ max_integrity = 160
+ reinf = TRUE
+ heat_resistance = 1600
+ explosion_block = 3
+ armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 50, "bio" = 100, "rad" = 100)
+ smooth = SMOOTH_TRUE
+ canSmoothWith = null
+ glass_type = /obj/item/stack/sheet/titaniumglass
+
+/obj/structure/window/full/shuttle/narsie_act()
+ color = "#3C3434"
+
+/obj/structure/window/full/shuttle/tinted
+ opacity = TRUE
+
+/obj/structure/window/plastitanium
+ name = "plastitanium window"
+ desc = "An evil looking window of plasma and titanium."
+ icon = 'icons/obj/smooth_structures/plastitanium_window.dmi'
+ icon_state = "plastitanium_window"
+ dir = FULLTILE_WINDOW_DIR
+ max_integrity = 100
+ fulltile = TRUE
+ reinf = TRUE
+ heat_resistance = 1600
+ armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 50, "bio" = 100, "rad" = 100)
+ smooth = SMOOTH_TRUE
+ canSmoothWith = null
+ explosion_block = 3
+ level = 3
+ glass_type = /obj/item/stack/sheet/plastitaniumglass
+ glass_amount = 2
+
+/obj/structure/window/reinforced/clockwork
+ name = "brass window"
+ desc = "A paper-thin pane of translucent yet reinforced brass."
+ icon = 'icons/obj/smooth_structures/clockwork_window.dmi'
+ icon_state = "clockwork_window_single"
+ burn_state = FIRE_PROOF
+ unacidable = 1
+ max_integrity = 80
+ armor = list("melee" = 60, "bullet" = 25, "laser" = 0, "energy" = 0, "bomb" = 25, "bio" = 100, "rad" = 100)
+ explosion_block = 2 //fancy AND hard to destroy. the most useful combination.
+ glass_type = /obj/item/stack/tile/brass
+ reinf = FALSE
+ cancolor = FALSE
+ var/made_glow = FALSE
+
+/obj/structure/window/reinforced/clockwork/New(loc, direct)
+ if(fulltile)
+ made_glow = TRUE
+ ..()
+ QDEL_LIST(debris)
+ if(fulltile)
+ new /obj/effect/temp_visual/ratvar/window(get_turf(src))
+ debris += new/obj/item/stack/tile/brass(src, 2)
+ else
+ debris += new/obj/item/stack/tile/brass(src, 1)
+
+/obj/structure/window/reinforced/clockwork/setDir(direct)
+ if(!made_glow)
+ var/obj/effect/E = new /obj/effect/temp_visual/ratvar/window/single(get_turf(src))
+ E.setDir(direct)
+ made_glow = TRUE
+ ..()
+
+/obj/structure/window/reinforced/clockwork/ratvar_act()
+ obj_integrity = max_integrity
+ update_icon()
+
+/obj/structure/window/reinforced/clockwork/narsie_act()
+ take_damage(rand(25, 75), BRUTE)
+ if(src)
+ var/previouscolor = color
+ color = "#960000"
+ animate(src, color = previouscolor, time = 8)
+
+/obj/structure/window/reinforced/clockwork/fulltile
+ icon_state = "clockwork_window"
+ smooth = SMOOTH_TRUE
+ canSmoothWith = null
+ fulltile = TRUE
+ dir = FULLTILE_WINDOW_DIR
+ max_integrity = 120
+ level = 3
+ glass_amount = 2
\ No newline at end of file
diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm
index 9b6c4363008..a87308bb9b1 100644
--- a/code/modules/admin/verbs/mapping.dm
+++ b/code/modules/admin/verbs/mapping.dm
@@ -92,7 +92,7 @@ var/intercom_range_display_status = 0
if(!(locate(/obj/structure/grille,T)))
var/window_check = 0
for(var/obj/structure/window/W in T)
- if(W.dir == turn(C1.dir,180) || W.is_fulltile() )
+ if(W.dir == turn(C1.dir,180) || W.fulltile)
window_check = 1
break
if(!window_check)
diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm
index 1ef887c2527..0a151babe67 100644
--- a/code/modules/mining/mine_items.dm
+++ b/code/modules/mining/mine_items.dm
@@ -341,20 +341,28 @@
//Pod turfs and objects
//Window
+/obj/structure/window/shuttle/survival_pod
+ name = "pod window"
+ icon = 'icons/obj/smooth_structures/pod_window.dmi'
+ icon_state = "smooth"
+ dir = FULLTILE_WINDOW_DIR
+ max_integrity = 100
+ fulltile = TRUE
+ reinf = TRUE
+ heat_resistance = 1600
+ armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 50, "bio" = 100, "rad" = 100)
+ smooth = SMOOTH_MORE
+ canSmoothWith = list(/turf/simulated/wall/mineral/titanium/survival, /obj/machinery/door/airlock/survival_pod, /obj/structure/window/shuttle/survival_pod)
+ explosion_block = 3
+ level = 3
+ glass_type = /obj/item/stack/sheet/titaniumglass
+ glass_amount = 2
+
/obj/structure/window/reinforced/survival_pod
name = "pod window"
icon = 'icons/obj/lavaland/survival_pod.dmi'
icon_state = "pwindow"
-// This override can be removed whenever we get rid of the stupid fucking `dir = 9` = full tile!!!! shit
-/obj/structure/window/reinforced/survival_pod/CanPass(atom/movable/mover, turf/target, height=0)
- if(istype(mover) && mover.checkpass(PASSGLASS))
- return 1
- if(get_dir(loc, target) == dir)
- return !density
- else
- return 1
-
//Floors
/turf/simulated/floor/pod
name = "pod floor"
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 2f0d341f697..d008bf060c4 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -137,10 +137,12 @@
if(!AM.anchored)
now_pushing = 1
var/t = get_dir(src, AM)
- if(istype(AM, /obj/structure/window/full))
- for(var/obj/structure/window/win in get_step(AM, t))
- now_pushing = 0
- return
+ if(istype(AM, /obj/structure/window))
+ var/obj/structure/window/W = AM
+ if(W.fulltile)
+ for(var/obj/structure/window/win in get_step(W, t))
+ now_pushing = 0
+ return
if(pulling == AM)
stop_pulling()
var/current_dir
diff --git a/code/modules/research/designs/smelting_designs.dm b/code/modules/research/designs/smelting_designs.dm
index fe45e8dacad..a043d90fb19 100644
--- a/code/modules/research/designs/smelting_designs.dm
+++ b/code/modules/research/designs/smelting_designs.dm
@@ -25,6 +25,22 @@
build_path = /obj/item/stack/sheet/plasmaglass
category = list("initial")
+/datum/design/titaniumglass_alloy
+ name = "Titanium + Glass alloy"
+ id = "titaniumglass"
+ build_type = SMELTER
+ materials = list(MAT_TITANIUM = MINERAL_MATERIAL_AMOUNT, MAT_GLASS = MINERAL_MATERIAL_AMOUNT)
+ build_path = /obj/item/stack/sheet/titaniumglass
+ category = list("initial")
+
+/datum/design/plastitaniumglass_alloy
+ name = "Plasma + Titanium + Glass alloy"
+ id = "plastitaniumglass"
+ build_type = SMELTER
+ materials = list(MAT_PLASMA = MINERAL_MATERIAL_AMOUNT, MAT_TITANIUM = MINERAL_MATERIAL_AMOUNT, MAT_GLASS = MINERAL_MATERIAL_AMOUNT)
+ build_path = /obj/item/stack/sheet/plastitaniumglass
+ category = list("initial")
+
/datum/design/alienalloy
name = "Alien Alloy"
desc = "A sheet of reverse-engineered alien alloy."
diff --git a/icons/obj/doors/windoor.dmi b/icons/obj/doors/windoor.dmi
index 8104686b483..9bf105faaf6 100644
Binary files a/icons/obj/doors/windoor.dmi and b/icons/obj/doors/windoor.dmi differ
diff --git a/icons/obj/items.dmi b/icons/obj/items.dmi
index d828f2ee9de..5714fcf4c9f 100644
Binary files a/icons/obj/items.dmi and b/icons/obj/items.dmi differ
diff --git a/icons/obj/smooth_structures/clockwork_window.dmi b/icons/obj/smooth_structures/clockwork_window.dmi
new file mode 100644
index 00000000000..90309ac3d52
Binary files /dev/null and b/icons/obj/smooth_structures/clockwork_window.dmi differ
diff --git a/icons/obj/smooth_structures/plasma_window.dmi b/icons/obj/smooth_structures/plasma_window.dmi
new file mode 100644
index 00000000000..3d57d156f01
Binary files /dev/null and b/icons/obj/smooth_structures/plasma_window.dmi differ
diff --git a/icons/obj/smooth_structures/plastitanium_window.dmi b/icons/obj/smooth_structures/plastitanium_window.dmi
new file mode 100644
index 00000000000..82ac0306159
Binary files /dev/null and b/icons/obj/smooth_structures/plastitanium_window.dmi differ
diff --git a/icons/obj/smooth_structures/pod_window.dmi b/icons/obj/smooth_structures/pod_window.dmi
new file mode 100644
index 00000000000..0fe7501225c
Binary files /dev/null and b/icons/obj/smooth_structures/pod_window.dmi differ
diff --git a/icons/obj/smooth_structures/reinforced_window.dmi b/icons/obj/smooth_structures/reinforced_window.dmi
index b5f24ebbd30..ed9a2a143e6 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/rice_window.dmi b/icons/obj/smooth_structures/rice_window.dmi
index e3a82935cf2..f5e7a6dd57a 100644
Binary files a/icons/obj/smooth_structures/rice_window.dmi and b/icons/obj/smooth_structures/rice_window.dmi differ
diff --git a/icons/obj/smooth_structures/rplasma_window.dmi b/icons/obj/smooth_structures/rplasma_window.dmi
new file mode 100644
index 00000000000..c64f42c7f5a
Binary files /dev/null and b/icons/obj/smooth_structures/rplasma_window.dmi differ
diff --git a/icons/obj/smooth_structures/shuttle_window.dmi b/icons/obj/smooth_structures/shuttle_window.dmi
index 3db34cf1ba1..85924dc449b 100644
Binary files a/icons/obj/smooth_structures/shuttle_window.dmi and b/icons/obj/smooth_structures/shuttle_window.dmi differ
diff --git a/icons/obj/smooth_structures/tinted_window.dmi b/icons/obj/smooth_structures/tinted_window.dmi
index ab992353275..be9affafeea 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 0197f5b20a7..670713bcfe0 100644
Binary files a/icons/obj/smooth_structures/window.dmi and b/icons/obj/smooth_structures/window.dmi differ
diff --git a/icons/obj/structures.dmi b/icons/obj/structures.dmi
index 0b17038ade5..838503bbda1 100644
Binary files a/icons/obj/structures.dmi and b/icons/obj/structures.dmi differ
diff --git a/paradise.dme b/paradise.dme
index 62908577586..aa34fb03b85 100644
--- a/paradise.dme
+++ b/paradise.dme
@@ -960,7 +960,6 @@
#include "code\game\objects\structures\false_walls.dm"
#include "code\game\objects\structures\flora.dm"
#include "code\game\objects\structures\foodcart.dm"
-#include "code\game\objects\structures\fullwindow.dm"
#include "code\game\objects\structures\girders.dm"
#include "code\game\objects\structures\grille.dm"
#include "code\game\objects\structures\guillotine.dm"