diff --git a/code/__DEFINES/icon_smoothing.dm b/code/__DEFINES/icon_smoothing.dm index 9711198b3b2..14ae3addcd8 100644 --- a/code/__DEFINES/icon_smoothing.dm +++ b/code/__DEFINES/icon_smoothing.dm @@ -95,7 +95,8 @@ DEFINE_BITFIELD(smoothing_flags, list( #define SMOOTH_GROUP_SURVIVAL_TIANIUM_POD S_OBJ(14) ///turf/simulated/wall/mineral/titanium/survival/pod, /obj/machinery/door/airlock/survival_pod, /obj/structure/window/shuttle/survival_pod #define SMOOTH_GROUP_HIERO_WALL S_OBJ(15) ///obj/effect/temp_visual/elite_tumor_wall, /obj/effect/temp_visual/hierophant/wall #define SMOOTH_GROUP_BRASS_WALL S_OBJ(16) ///turf/simulated/wall/mineral/brass, /obj/structure/falsewall/brass - +#define SMOOTH_GROUP_REGULAR_WALLS S_OBJ(17) ///turf/simulated/wall, /obj/structure/falsewall +#define SMOOTH_GROUP_REINFORCED_WALLS S_OBJ(18) ///turf/simulated/wall/r_wall, /obj/structure/falsewall/reinforced #define SMOOTH_GROUP_WINDOW_FULLTILE S_OBJ(21) ///turf/simulated/indestructible/fakeglass, /obj/structure/window/full/basic, /obj/structure/window/full/plasmabasic, /obj/structure/window/full/plasmareinforced, /obj/structure/window/full/reinforced #define SMOOTH_GROUP_WINDOW_FULLTILE_BRASS S_OBJ(22) ///obj/structure/window/brass/fulltile diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm index 34f8d68f912..16098d157cf 100644 --- a/code/game/machinery/computer/HolodeckControl.dm +++ b/code/game/machinery/computer/HolodeckControl.dm @@ -408,7 +408,7 @@ /obj/structure/holowindow name = "reinforced window" - icon = 'icons/obj/smooth_structures/reinforced_window.dmi' + icon = 'icons/obj/smooth_structures/windows/reinforced_window.dmi' icon_state = "reinforced_window-0" desc = "A window." density = TRUE diff --git a/code/game/objects/effects/spawners/windowspawner.dm b/code/game/objects/effects/spawners/windowspawner.dm index 8d8654957cc..48451e10f1d 100644 --- a/code/game/objects/effects/spawners/windowspawner.dm +++ b/code/game/objects/effects/spawners/windowspawner.dm @@ -89,8 +89,3 @@ name = "plastitanium window spawner" icon_state = "plastitaniumwindow_spawner" window_to_spawn_full = /obj/structure/window/full/plastitanium - -/obj/effect/spawner/window/ice - name = "ice window spawner" - icon_state = "icewindow_spawner" - window_to_spawn_full = /obj/structure/window/full/reinforced/ice diff --git a/code/game/objects/structures/false_walls.dm b/code/game/objects/structures/false_walls.dm index a317cbb75eb..de3e2696860 100644 --- a/code/game/objects/structures/false_walls.dm +++ b/code/game/objects/structures/false_walls.dm @@ -27,8 +27,8 @@ max_integrity = 100 smoothing_flags = SMOOTH_BITMASK - smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS) - canSmoothWith = list(SMOOTH_GROUP_WALLS) + smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_REGULAR_WALLS) + canSmoothWith = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_REGULAR_WALLS, SMOOTH_GROUP_REINFORCED_WALLS) /obj/structure/falsewall/Initialize(mapload) . = ..() @@ -170,6 +170,8 @@ walltype = /turf/simulated/wall/r_wall mineral = /obj/item/stack/sheet/plasteel smoothing_flags = SMOOTH_BITMASK + smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_REINFORCED_WALLS) + canSmoothWith = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_REGULAR_WALLS, SMOOTH_GROUP_REINFORCED_WALLS) /obj/structure/falsewall/reinforced/examine_status(mob/user) . = ..() diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 9a4e8d5442f..9a047c4c69f 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -29,6 +29,10 @@ var/hitsound = 'sound/effects/Glasshit.ogg' /// Used to restore colours from polarised glass var/old_color + /// Used to define what file the edging sprite is contained within + var/edge_overlay_file + /// Tracks the edging appearence sprite + var/mutable_appearance/edge_overlay /obj/structure/window/examine(mob/user) . = ..() @@ -452,26 +456,39 @@ //This proc is used to update the icons of nearby windows. /obj/structure/window/proc/update_nearby_icons() - update_icon() + update_icon(UPDATE_ICON_STATE) if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK)) QUEUE_SMOOTH_NEIGHBORS(src) +/obj/structure/window/update_icon_state() + . = ..() + if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK)) + QUEUE_SMOOTH(src) + /obj/structure/window/update_overlays() . = ..() - if(!QDELETED(src)) - if(!fulltile) - return - var/ratio = obj_integrity / max_integrity - ratio = CEILING(ratio * 4, 1) * 25 + if(QDELETED(src)) + return - if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK)) - QUEUE_SMOOTH(src) + if(!fulltile) + return - if(ratio > 75) - return - crack_overlay = mutable_appearance('icons/obj/structures.dmi', "damage[ratio]", -(layer+0.1)) + var/ratio = obj_integrity / max_integrity + ratio = CEILING(ratio * 4, 1) * 25 + if(ratio <= 75) + crack_overlay = mutable_appearance('icons/obj/structures.dmi', "damage[ratio]", -(layer + 0.01), appearance_flags = RESET_COLOR) . += crack_overlay + if(!edge_overlay_file) + return + + edge_overlay = mutable_appearance(edge_overlay_file, "[smoothing_junction]", layer + 0.1, appearance_flags = RESET_COLOR) + . += edge_overlay + +/obj/structure/window/smooth_icon() + ..() + update_icon(UPDATE_OVERLAYS) + /obj/structure/window/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) ..() if(exposed_temperature > (T0C + heat_resistance)) @@ -541,6 +558,10 @@ toggle_tint() +/obj/machinery/button/windowtint/attack_ghost(mob/user) + if(user.can_advanced_admin_interact()) + return attack_hand(user) + /obj/machinery/button/windowtint/wrench_act(mob/user, obj/item/I) . = TRUE if(!I.tool_use_check(user, 0)) @@ -624,20 +645,21 @@ fulltile = TRUE flags = PREVENT_CLICK_UNDER smoothing_flags = SMOOTH_BITMASK - smoothing_groups = list(SMOOTH_GROUP_WINDOW_FULLTILE) - canSmoothWith = list(SMOOTH_GROUP_WINDOW_FULLTILE) + smoothing_groups = list(SMOOTH_GROUP_WINDOW_FULLTILE, SMOOTH_GROUP_REGULAR_WALLS, SMOOTH_GROUP_REINFORCED_WALLS) //they are not walls but this lets walls smooth with them + canSmoothWith = list(SMOOTH_GROUP_WINDOW_FULLTILE, SMOOTH_GROUP_WALLS) /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 = 'icons/obj/smooth_structures/windows/window.dmi' icon_state = "window-0" base_icon_state = "window" max_integrity = 50 + edge_overlay_file = 'icons/obj/smooth_structures/windows/window_edges.dmi' /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 = 'icons/obj/smooth_structures/windows/plasma_window.dmi' icon_state = "plasma_window-0" base_icon_state = "plasma_window" glass_decal = /obj/effect/decal/cleanable/glass/plasma @@ -648,11 +670,12 @@ explosion_block = 1 armor = list(MELEE = 75, BULLET = 5, LASER = 0, ENERGY = 0, BOMB = 45, BIO = 100, RAD = 100, FIRE = 99, ACID = 100) rad_insulation = RAD_NO_INSULATION + edge_overlay_file = 'icons/obj/smooth_structures/windows/window_edges.dmi' /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 = 'icons/obj/smooth_structures/windows/rplasma_window.dmi' icon_state = "rplasma_window-0" base_icon_state = "rplasma_window" glass_decal = /obj/effect/decal/cleanable/glass/plasma @@ -664,6 +687,7 @@ explosion_block = 2 armor = list(MELEE = 85, BULLET = 20, LASER = 0, ENERGY = 0, BOMB = 60, BIO = 100, RAD = 100, FIRE = 99, ACID = 100) rad_insulation = RAD_NO_INSULATION + edge_overlay_file = 'icons/obj/smooth_structures/windows/reinforced_window_edges.dmi' /obj/structure/window/full/plasmareinforced/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) return @@ -671,7 +695,7 @@ /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 = 'icons/obj/smooth_structures/windows/reinforced_window.dmi' icon_state = "reinforced_window-0" base_icon_state = "reinforced_window" max_integrity = 100 @@ -681,6 +705,7 @@ rad_insulation = RAD_HEAVY_INSULATION explosion_block = 1 glass_type = /obj/item/stack/sheet/rglass + edge_overlay_file = 'icons/obj/smooth_structures/windows/reinforced_window_edges.dmi' /obj/structure/window/full/reinforced/polarized name = "electrochromic window" @@ -691,21 +716,15 @@ /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 = 'icons/obj/smooth_structures/windows/tinted_window.dmi' icon_state = "tinted_window-0" base_icon_state = "tinted_window" opacity = TRUE -/obj/structure/window/full/reinforced/ice - icon = 'icons/obj/smooth_structures/rice_window.dmi' - icon_state = "rice_window-0" //Welcome to the rice fields, motherfucker. - base_icon_state = "rice_window" - max_integrity = 150 - /obj/structure/window/full/shuttle name = "shuttle window" desc = "A reinforced, air-locked pod window." - icon = 'icons/obj/smooth_structures/shuttle_window.dmi' + icon = 'icons/obj/smooth_structures/windows/shuttle_window.dmi' icon_state = "shuttle_window-0" base_icon_state = "shuttle_window" max_integrity = 200 @@ -726,7 +745,7 @@ /obj/structure/window/full/plastitanium name = "plastitanium window" desc = "An evil looking window of plasma and titanium." - icon = 'icons/obj/smooth_structures/plastitanium_window.dmi' + icon = 'icons/obj/smooth_structures/windows/plastitanium_window.dmi' icon_state = "plastitanium_window-0" base_icon_state = "plastitanium_window" max_integrity = 1200 @@ -742,7 +761,7 @@ /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 = 'icons/obj/smooth_structures/windows/clockwork_window.dmi' icon_state = "clockwork_window_single" resistance_flags = FIRE_PROOF | ACID_PROOF max_integrity = 80 diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 58bec0c3e19..9a110d499ad 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -9,8 +9,8 @@ icon_state = "wall-0" base_icon_state = "wall" smoothing_flags = SMOOTH_BITMASK - smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS) - canSmoothWith = list(SMOOTH_GROUP_WALLS) + smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_REGULAR_WALLS) + canSmoothWith = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_REGULAR_WALLS, SMOOTH_GROUP_REINFORCED_WALLS) var/rotting = FALSE diff --git a/code/game/turfs/simulated/walls_indestructible.dm b/code/game/turfs/simulated/walls_indestructible.dm index 0a3386ef45c..51c298a926e 100644 --- a/code/game/turfs/simulated/walls_indestructible.dm +++ b/code/game/turfs/simulated/walls_indestructible.dm @@ -136,7 +136,7 @@ /turf/simulated/wall/indestructible/fakeglass name = "window" - icon = 'icons/obj/smooth_structures/reinforced_window.dmi' + icon = 'icons/obj/smooth_structures/windows/reinforced_window.dmi' icon_state = "fake_window" base_icon_state = "reinforced_window" opacity = FALSE @@ -151,7 +151,7 @@ underlays += mutable_appearance('icons/turf/floors.dmi', "plating") //add the plating underlay, below the grille /turf/simulated/wall/indestructible/fakeglass/brass - icon = 'icons/obj/smooth_structures/clockwork_window.dmi' + icon = 'icons/obj/smooth_structures/windows/clockwork_window.dmi' icon_state = "clockwork_window-0" base_icon_state = "clockwork_window" smoothing_groups = list(SMOOTH_GROUP_WINDOW_FULLTILE_BRASS) @@ -159,7 +159,7 @@ /turf/simulated/wall/indestructible/opsglass name = "window" - icon = 'icons/obj/smooth_structures/plastitanium_window.dmi' + icon = 'icons/obj/smooth_structures/windows/plastitanium_window.dmi' icon_state = "plastitanium_window-0" base_icon_state = "plastitanium_window" opacity = FALSE diff --git a/code/game/turfs/simulated/walls_reinforced.dm b/code/game/turfs/simulated/walls_reinforced.dm index 945fc6be8b6..f6916808b9d 100644 --- a/code/game/turfs/simulated/walls_reinforced.dm +++ b/code/game/turfs/simulated/walls_reinforced.dm @@ -15,6 +15,8 @@ sheet_amount = 1 girder_type = /obj/structure/girder/reinforced can_dismantle_with_welder = FALSE + smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_REINFORCED_WALLS) + canSmoothWith = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_REGULAR_WALLS, SMOOTH_GROUP_REINFORCED_WALLS) var/d_state = RWALL_INTACT var/can_be_reinforced = 1 diff --git a/code/modules/mining/equipment/survival_pod.dm b/code/modules/mining/equipment/survival_pod.dm index 86ed5eec0d4..0da77a9c65e 100644 --- a/code/modules/mining/equipment/survival_pod.dm +++ b/code/modules/mining/equipment/survival_pod.dm @@ -86,7 +86,7 @@ //Window /obj/structure/window/full/shuttle/survival_pod name = "pod window" - icon = 'icons/obj/smooth_structures/pod_window.dmi' + icon = 'icons/obj/smooth_structures/windows/pod_window.dmi' icon_state = "pod_window-0" base_icon_state = "pod_window" smoothing_flags = SMOOTH_BITMASK diff --git a/icons/obj/smooth_structures/plasma_window.dmi b/icons/obj/smooth_structures/plasma_window.dmi deleted file mode 100644 index eaed6f219e0..00000000000 Binary files a/icons/obj/smooth_structures/plasma_window.dmi and /dev/null differ diff --git a/icons/obj/smooth_structures/reinforced_window.dmi b/icons/obj/smooth_structures/reinforced_window.dmi deleted file mode 100644 index a66b648786d..00000000000 Binary files a/icons/obj/smooth_structures/reinforced_window.dmi and /dev/null differ diff --git a/icons/obj/smooth_structures/rice_window.dmi b/icons/obj/smooth_structures/rice_window.dmi deleted file mode 100644 index 3680926e7fa..00000000000 Binary files a/icons/obj/smooth_structures/rice_window.dmi and /dev/null differ diff --git a/icons/obj/smooth_structures/rplasma_window.dmi b/icons/obj/smooth_structures/rplasma_window.dmi deleted file mode 100644 index 173b8d53766..00000000000 Binary files a/icons/obj/smooth_structures/rplasma_window.dmi and /dev/null differ diff --git a/icons/obj/smooth_structures/tinted_window.dmi b/icons/obj/smooth_structures/tinted_window.dmi deleted file mode 100644 index 59b690110e5..00000000000 Binary files a/icons/obj/smooth_structures/tinted_window.dmi and /dev/null differ diff --git a/icons/obj/smooth_structures/window.dmi b/icons/obj/smooth_structures/window.dmi deleted file mode 100644 index 4b78390251e..00000000000 Binary files a/icons/obj/smooth_structures/window.dmi and /dev/null differ diff --git a/icons/obj/smooth_structures/clockwork_window.dmi b/icons/obj/smooth_structures/windows/clockwork_window.dmi similarity index 100% rename from icons/obj/smooth_structures/clockwork_window.dmi rename to icons/obj/smooth_structures/windows/clockwork_window.dmi diff --git a/icons/obj/smooth_structures/windows/plasma_window.dmi b/icons/obj/smooth_structures/windows/plasma_window.dmi new file mode 100644 index 00000000000..1b21a58e950 Binary files /dev/null and b/icons/obj/smooth_structures/windows/plasma_window.dmi differ diff --git a/icons/obj/smooth_structures/plastitanium_window.dmi b/icons/obj/smooth_structures/windows/plastitanium_window.dmi similarity index 100% rename from icons/obj/smooth_structures/plastitanium_window.dmi rename to icons/obj/smooth_structures/windows/plastitanium_window.dmi diff --git a/icons/obj/smooth_structures/pod_window.dmi b/icons/obj/smooth_structures/windows/pod_window.dmi similarity index 100% rename from icons/obj/smooth_structures/pod_window.dmi rename to icons/obj/smooth_structures/windows/pod_window.dmi diff --git a/icons/obj/smooth_structures/windows/reinforced_window.dmi b/icons/obj/smooth_structures/windows/reinforced_window.dmi new file mode 100644 index 00000000000..3259096ee86 Binary files /dev/null and b/icons/obj/smooth_structures/windows/reinforced_window.dmi differ diff --git a/icons/obj/smooth_structures/windows/reinforced_window_edges.dmi b/icons/obj/smooth_structures/windows/reinforced_window_edges.dmi new file mode 100644 index 00000000000..e6519858d26 Binary files /dev/null and b/icons/obj/smooth_structures/windows/reinforced_window_edges.dmi differ diff --git a/icons/obj/smooth_structures/windows/rplasma_window.dmi b/icons/obj/smooth_structures/windows/rplasma_window.dmi new file mode 100644 index 00000000000..5497819faa3 Binary files /dev/null and b/icons/obj/smooth_structures/windows/rplasma_window.dmi differ diff --git a/icons/obj/smooth_structures/shuttle_window.dmi b/icons/obj/smooth_structures/windows/shuttle_window.dmi similarity index 100% rename from icons/obj/smooth_structures/shuttle_window.dmi rename to icons/obj/smooth_structures/windows/shuttle_window.dmi diff --git a/icons/obj/smooth_structures/windows/tinted_window.dmi b/icons/obj/smooth_structures/windows/tinted_window.dmi new file mode 100644 index 00000000000..0a0bcb9ff05 Binary files /dev/null and b/icons/obj/smooth_structures/windows/tinted_window.dmi differ diff --git a/icons/obj/smooth_structures/windows/window.dmi b/icons/obj/smooth_structures/windows/window.dmi new file mode 100644 index 00000000000..ee33f8b78db Binary files /dev/null and b/icons/obj/smooth_structures/windows/window.dmi differ diff --git a/icons/obj/smooth_structures/windows/window_edges.dmi b/icons/obj/smooth_structures/windows/window_edges.dmi new file mode 100644 index 00000000000..866717e386a Binary files /dev/null and b/icons/obj/smooth_structures/windows/window_edges.dmi differ diff --git a/icons/obj/structures.dmi b/icons/obj/structures.dmi index a80d009bab9..24bb60fd0c3 100644 Binary files a/icons/obj/structures.dmi and b/icons/obj/structures.dmi differ