mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
[IDB Ignore] Refactor icon smoothing to use 8-bit bitmasking (#16620)
This commit is contained in:
@@ -451,8 +451,8 @@
|
||||
//This proc is used to update the icons of nearby windows.
|
||||
/obj/structure/window/proc/update_nearby_icons()
|
||||
update_icon()
|
||||
if(smooth)
|
||||
queue_smooth_neighbors(src)
|
||||
if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK))
|
||||
QUEUE_SMOOTH_NEIGHBORS(src)
|
||||
|
||||
/obj/structure/window/update_icon()
|
||||
if(!QDELETED(src))
|
||||
@@ -461,8 +461,8 @@
|
||||
var/ratio = obj_integrity / max_integrity
|
||||
ratio = CEILING(ratio * 4, 1) * 25
|
||||
|
||||
if(smooth)
|
||||
queue_smooth(src)
|
||||
if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK))
|
||||
QUEUE_SMOOTH(src)
|
||||
|
||||
cut_overlay(crack_overlay)
|
||||
if(ratio > 75)
|
||||
@@ -613,27 +613,28 @@
|
||||
level = 3
|
||||
fulltile = TRUE
|
||||
flags = PREVENT_CLICK_UNDER
|
||||
smoothing_flags = SMOOTH_BITMASK
|
||||
smoothing_groups = list(SMOOTH_GROUP_WINDOW_FULLTILE)
|
||||
canSmoothWith = list(SMOOTH_GROUP_WINDOW_FULLTILE)
|
||||
|
||||
/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"
|
||||
icon_state = "window-0"
|
||||
base_icon_state = "window"
|
||||
max_integrity = 50
|
||||
smooth = SMOOTH_TRUE
|
||||
canSmoothWith = list(/obj/structure/window/full/basic, /obj/structure/window/full/reinforced, /obj/structure/window/full/reinforced/polarized, /obj/structure/window/full/reinforced/tinted, /obj/structure/window/full/plasmabasic, /obj/structure/window/full/plasmareinforced, /turf/simulated/wall/indestructible/fakeglass)
|
||||
|
||||
/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"
|
||||
icon_state = "plasma_window-0"
|
||||
base_icon_state = "plasma_window"
|
||||
glass_decal = /obj/effect/decal/cleanable/glass/plasma
|
||||
shardtype = /obj/item/shard/plasma
|
||||
glass_type = /obj/item/stack/sheet/plasmaglass
|
||||
heat_resistance = 32000
|
||||
max_integrity = 300
|
||||
smooth = SMOOTH_TRUE
|
||||
canSmoothWith = list(/obj/structure/window/full/basic, /obj/structure/window/full/reinforced, /obj/structure/window/full/reinforced/polarized, /obj/structure/window/full/reinforced/tinted, /obj/structure/window/full/plasmabasic, /obj/structure/window/full/plasmareinforced, /turf/simulated/wall/indestructible/fakeglass)
|
||||
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
|
||||
@@ -642,12 +643,11 @@
|
||||
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"
|
||||
icon_state = "rplasma_window-0"
|
||||
base_icon_state = "rplasma_window"
|
||||
glass_decal = /obj/effect/decal/cleanable/glass/plasma
|
||||
shardtype = /obj/item/shard/plasma
|
||||
glass_type = /obj/item/stack/sheet/plasmarglass
|
||||
smooth = SMOOTH_TRUE
|
||||
canSmoothWith = list(/obj/structure/window/full/basic, /obj/structure/window/full/reinforced, /obj/structure/window/full/reinforced/polarized, /obj/structure/window/full/reinforced/tinted, /obj/structure/window/full/plasmabasic, /obj/structure/window/full/plasmareinforced, /turf/simulated/wall/indestructible/fakeglass)
|
||||
reinf = TRUE
|
||||
max_integrity = 1000
|
||||
explosion_block = 2
|
||||
@@ -661,9 +661,8 @@
|
||||
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/polarized, /obj/structure/window/full/reinforced/tinted, /obj/structure/window/full/plasmabasic, /obj/structure/window/full/plasmareinforced, /turf/simulated/wall/indestructible/fakeglass)
|
||||
icon_state = "reinforced_window-0"
|
||||
base_icon_state = "reinforced_window"
|
||||
max_integrity = 100
|
||||
reinf = TRUE
|
||||
heat_resistance = 1600
|
||||
@@ -682,26 +681,29 @@
|
||||
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"
|
||||
icon_state = "tinted_window-0"
|
||||
base_icon_state = "tinted_window"
|
||||
opacity = 1
|
||||
|
||||
/obj/structure/window/full/reinforced/ice
|
||||
icon = 'icons/obj/smooth_structures/rice_window.dmi'
|
||||
icon_state = "ice_window"
|
||||
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_state = "shuttle_window"
|
||||
icon_state = "shuttle_window-0"
|
||||
base_icon_state = "shuttle_window"
|
||||
max_integrity = 100
|
||||
reinf = TRUE
|
||||
heat_resistance = 1600
|
||||
explosion_block = 3
|
||||
armor = list(MELEE = 50, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 50, BIO = 100, RAD = 100, FIRE = 80, ACID = 100)
|
||||
smooth = SMOOTH_TRUE
|
||||
canSmoothWith = null
|
||||
smoothing_groups = list(SMOOTH_GROUP_WINDOW_FULLTILE_SHUTTLE, SMOOTH_GROUP_TITANIUM_WALLS)
|
||||
canSmoothWith = list(SMOOTH_GROUP_WINDOW_FULLTILE_SHUTTLE, SMOOTH_GROUP_TITANIUM_WALLS)
|
||||
glass_type = /obj/item/stack/sheet/titaniumglass
|
||||
|
||||
/obj/structure/window/full/shuttle/narsie_act()
|
||||
@@ -714,17 +716,17 @@
|
||||
name = "plastitanium window"
|
||||
desc = "An evil looking window of plasma and titanium."
|
||||
icon = 'icons/obj/smooth_structures/plastitanium_window.dmi'
|
||||
icon_state = "plastitanium_window"
|
||||
icon_state = "plastitanium_window-0"
|
||||
base_icon_state = "plastitanium_window"
|
||||
max_integrity = 100
|
||||
reinf = TRUE
|
||||
heat_resistance = 1600
|
||||
armor = list(MELEE = 50, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 50, BIO = 100, RAD = 100, FIRE = 80, ACID = 100)
|
||||
rad_insulation = RAD_HEAVY_INSULATION
|
||||
smooth = SMOOTH_TRUE
|
||||
canSmoothWith = null
|
||||
explosion_block = 3
|
||||
glass_type = /obj/item/stack/sheet/plastitaniumglass
|
||||
canSmoothWith = list(/turf/simulated/wall/indestructible/opsglass, /obj/structure/window/full/plastitanium)
|
||||
smoothing_groups = list(SMOOTH_GROUP_SHUTTLE_PARTS, SMOOTH_GROUP_WINDOW_FULLTILE_PLASTITANIUM, SMOOTH_GROUP_PLASTITANIUM_WALLS)
|
||||
canSmoothWith = list(SMOOTH_GROUP_WINDOW_FULLTILE_PLASTITANIUM, SMOOTH_GROUP_SYNDICATE_WALLS, SMOOTH_GROUP_PLASTITANIUM_WALLS)
|
||||
|
||||
/obj/structure/window/reinforced/clockwork
|
||||
name = "brass window"
|
||||
@@ -761,9 +763,11 @@
|
||||
animate(src, color = previouscolor, time = 8)
|
||||
|
||||
/obj/structure/window/reinforced/clockwork/fulltile
|
||||
icon_state = "clockwork_window"
|
||||
smooth = SMOOTH_TRUE
|
||||
canSmoothWith = null
|
||||
icon_state = "clockwork_window-0"
|
||||
base_icon_state = "clockwork_window"
|
||||
smoothing_flags = SMOOTH_BITMASK
|
||||
smoothing_groups = list(SMOOTH_GROUP_WINDOW_FULLTILE, SMOOTH_GROUP_WINDOW_FULLTILE_BRASS)
|
||||
canSmoothWith = list(SMOOTH_GROUP_WINDOW_FULLTILE_BRASS)
|
||||
fulltile = TRUE
|
||||
flags = PREVENT_CLICK_UNDER
|
||||
dir = FULLTILE_WINDOW_DIR
|
||||
|
||||
Reference in New Issue
Block a user