Ports TCC style windows (#19488)
* window * fix plasma window and spawners * this now works well * Apply suggestions from code review Co-authored-by: Edan <29551695+Edan52@users.noreply.github.com> * Empty-Commit * Empty-Commit * colour tweaks * further colour tweaks * last tweak * edges * false wall sanity * Update code/__DEFINES/icon_smoothing.dm * stealth conflict begone Co-authored-by: Edan <29551695+Edan52@users.noreply.github.com>
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
. = ..()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 38 KiB |