From 8187c178d8a269dd8725c1ea5f42fa72c8675d80 Mon Sep 17 00:00:00 2001 From: S34N <12197162+S34NW@users.noreply.github.com> Date: Tue, 22 Nov 2022 03:46:46 +0000 Subject: [PATCH] fixes CC windows and walls (#19730) --- .../turfs/simulated/walls_indestructible.dm | 37 +++++++++++++++---- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/code/game/turfs/simulated/walls_indestructible.dm b/code/game/turfs/simulated/walls_indestructible.dm index 51c298a926e..03effb0026f 100644 --- a/code/game/turfs/simulated/walls_indestructible.dm +++ b/code/game/turfs/simulated/walls_indestructible.dm @@ -141,8 +141,12 @@ base_icon_state = "reinforced_window" opacity = FALSE 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) + /// Used to define what file the edging sprite is contained within + var/edge_overlay_file = 'icons/obj/smooth_structures/windows/reinforced_window_edges.dmi' + /// Tracks the edging appearence sprite + var/mutable_appearance/edge_overlay /turf/simulated/wall/indestructible/fakeglass/Initialize(mapload) . = ..() @@ -150,12 +154,31 @@ underlays += mutable_appearance('icons/obj/structures.dmi', "grille") //add a grille underlay underlays += mutable_appearance('icons/turf/floors.dmi', "plating") //add the plating underlay, below the grille +/turf/simulated/wall/indestructible/fakeglass/smooth_icon() + ..() + update_icon(UPDATE_OVERLAYS) + +/turf/simulated/wall/indestructible/fakeglass/update_icon_state() + . = ..() + if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK)) + QUEUE_SMOOTH(src) + +/turf/simulated/wall/indestructible/fakeglass/update_overlays() + . = ..() + + if(!edge_overlay_file) + return + + edge_overlay = mutable_appearance(edge_overlay_file, "[smoothing_junction]", layer + 0.1, appearance_flags = RESET_COLOR) + . += edge_overlay + /turf/simulated/wall/indestructible/fakeglass/brass 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) canSmoothWith = list(SMOOTH_GROUP_WINDOW_FULLTILE_BRASS) + edge_overlay_file = null /turf/simulated/wall/indestructible/opsglass name = "window" @@ -192,12 +215,12 @@ canSmoothWith = null /turf/simulated/wall/indestructible/riveted - icon = 'icons/turf/walls/riveted.dmi' - icon_state = "riveted-0" - base_icon_state = "riveted" + icon = 'icons/turf/walls/reinforced_wall.dmi' + icon_state = "reinforced_wall-0" + base_icon_state = "reinforced_wall" smoothing_flags = SMOOTH_BITMASK - smoothing_groups = list(SMOOTH_GROUP_WALLS) - canSmoothWith = list(SMOOTH_GROUP_WALLS) + 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) /turf/simulated/wall/indestructible/syndicate icon = 'icons/turf/walls/plastitanium_wall.dmi'