mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 15:37:36 +01:00
[IDB Ignore] Refactor icon smoothing to use 8-bit bitmasking (#16620)
This commit is contained in:
@@ -11,7 +11,8 @@
|
||||
desc = "A huge chunk of metal used to seperate rooms."
|
||||
anchored = TRUE
|
||||
icon = 'icons/turf/walls/wall.dmi'
|
||||
icon_state = "wall"
|
||||
icon_state = "wall-0"
|
||||
base_icon_state = "wall"
|
||||
flags_2 = RAD_PROTECT_CONTENTS_2 | RAD_NO_CONTAMINATE_2
|
||||
rad_insulation = RAD_MEDIUM_INSULATION
|
||||
|
||||
@@ -25,15 +26,9 @@
|
||||
opacity = TRUE
|
||||
max_integrity = 100
|
||||
|
||||
canSmoothWith = list(
|
||||
/turf/simulated/wall,
|
||||
/turf/simulated/wall/r_wall,
|
||||
/obj/structure/falsewall,
|
||||
/obj/structure/falsewall/brass,
|
||||
/obj/structure/falsewall/reinforced, // WHY DO WE SMOOTH WITH FALSE R-WALLS WHEN WE DON'T SMOOTH WITH REAL R-WALLS. //because we do smooth with real r-walls now
|
||||
/turf/simulated/wall/rust,
|
||||
/turf/simulated/wall/r_wall/rust)
|
||||
smooth = SMOOTH_TRUE
|
||||
smoothing_flags = SMOOTH_BITMASK
|
||||
smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS)
|
||||
canSmoothWith = list(SMOOTH_GROUP_WALLS)
|
||||
|
||||
/obj/structure/falsewall/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -72,39 +67,41 @@
|
||||
|
||||
opening = 1
|
||||
if(density)
|
||||
do_the_flick()
|
||||
sleep(4)
|
||||
flick("fwall_opening", src)
|
||||
density = 0
|
||||
set_opacity(0)
|
||||
update_icon(0)
|
||||
update_icon()
|
||||
else
|
||||
var/srcturf = get_turf(src)
|
||||
for(var/mob/living/obstacle in srcturf) //Stop people from using this as a shield
|
||||
opening = 0
|
||||
return
|
||||
do_the_flick()
|
||||
flick("fwall_closing", src)
|
||||
density = 1
|
||||
sleep(4)
|
||||
set_opacity(1)
|
||||
update_icon()
|
||||
air_update_turf(1)
|
||||
opening = 0
|
||||
update_icon()
|
||||
|
||||
/obj/structure/falsewall/proc/do_the_flick()
|
||||
if(density)
|
||||
smooth = SMOOTH_FALSE
|
||||
clear_smooth_overlays()
|
||||
flick("fwall_opening", src)
|
||||
else
|
||||
flick("fwall_closing", src)
|
||||
|
||||
/obj/structure/falsewall/update_icon()
|
||||
if(density)
|
||||
icon_state = initial(icon_state)
|
||||
smooth = SMOOTH_TRUE
|
||||
queue_smooth(src)
|
||||
if(opening)
|
||||
if(density)
|
||||
icon_state = "fwall_opening"
|
||||
smoothing_flags = NONE
|
||||
clear_smooth_overlays()
|
||||
else
|
||||
icon_state = "fwall_closing"
|
||||
else
|
||||
icon_state = "fwall_open"
|
||||
if(density)
|
||||
icon_state = initial(icon_state)
|
||||
smoothing_flags = SMOOTH_CORNERS
|
||||
icon_state = "[base_icon_state]-[smoothing_junction]"
|
||||
smoothing_flags = SMOOTH_BITMASK
|
||||
QUEUE_SMOOTH(src)
|
||||
else
|
||||
icon_state = "fwall_open"
|
||||
|
||||
/obj/structure/falsewall/proc/ChangeToWall(delete = TRUE)
|
||||
var/turf/T = get_turf(src)
|
||||
@@ -165,9 +162,11 @@
|
||||
name = "reinforced wall"
|
||||
desc = "A huge chunk of reinforced metal used to seperate rooms."
|
||||
icon = 'icons/turf/walls/reinforced_wall.dmi'
|
||||
icon_state = "r_wall"
|
||||
icon_state = "reinforced_wall-0"
|
||||
base_icon_state = "reinforced_wall"
|
||||
walltype = /turf/simulated/wall/r_wall
|
||||
mineral = /obj/item/stack/sheet/plasteel
|
||||
smoothing_flags = SMOOTH_BITMASK
|
||||
|
||||
/obj/structure/falsewall/reinforced/examine_status(mob/user)
|
||||
. = ..()
|
||||
@@ -188,12 +187,15 @@
|
||||
name = "uranium wall"
|
||||
desc = "A wall with uranium plating. This is probably a bad idea."
|
||||
icon = 'icons/turf/walls/uranium_wall.dmi'
|
||||
icon_state = "uranium"
|
||||
icon_state = "uranium_wall-0"
|
||||
base_icon_state = "uranium_wall"
|
||||
mineral = /obj/item/stack/sheet/mineral/uranium
|
||||
walltype = /turf/simulated/wall/mineral/uranium
|
||||
var/active = null
|
||||
var/last_event = 0
|
||||
canSmoothWith = list(/turf/simulated/wall/mineral/uranium, /obj/structure/falsewall/uranium, /turf/simulated/wall/indestructible/uranium)
|
||||
smoothing_flags = SMOOTH_BITMASK
|
||||
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_URANIUM_WALLS)
|
||||
canSmoothWith = list(SMOOTH_GROUP_URANIUM_WALLS)
|
||||
|
||||
/obj/structure/falsewall/uranium/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
radiate()
|
||||
@@ -220,28 +222,37 @@
|
||||
name = "gold wall"
|
||||
desc = "A wall with gold plating. Swag!"
|
||||
icon = 'icons/turf/walls/gold_wall.dmi'
|
||||
icon_state = "gold"
|
||||
icon_state = "gold_wall-0"
|
||||
base_icon_state = "gold_wall"
|
||||
mineral = /obj/item/stack/sheet/mineral/gold
|
||||
walltype = /turf/simulated/wall/mineral/gold
|
||||
canSmoothWith = list(/obj/structure/falsewall/gold, /turf/simulated/wall/mineral/gold)
|
||||
smoothing_flags = SMOOTH_BITMASK
|
||||
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_GOLD_WALLS)
|
||||
canSmoothWith = list(SMOOTH_GROUP_GOLD_WALLS)
|
||||
|
||||
/obj/structure/falsewall/silver
|
||||
name = "silver wall"
|
||||
desc = "A wall with silver plating. Shiny."
|
||||
icon = 'icons/turf/walls/silver_wall.dmi'
|
||||
icon_state = "silver"
|
||||
icon_state = "silver_wall-0"
|
||||
base_icon_state = "silver_wall"
|
||||
mineral = /obj/item/stack/sheet/mineral/silver
|
||||
walltype = /turf/simulated/wall/mineral/silver
|
||||
canSmoothWith = list(/obj/structure/falsewall/silver, /turf/simulated/wall/mineral/silver)
|
||||
smoothing_flags = SMOOTH_BITMASK
|
||||
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_SILVER_WALLS)
|
||||
canSmoothWith = list(SMOOTH_GROUP_SILVER_WALLS)
|
||||
|
||||
/obj/structure/falsewall/diamond
|
||||
name = "diamond wall"
|
||||
desc = "A wall with diamond plating. You monster."
|
||||
icon = 'icons/turf/walls/diamond_wall.dmi'
|
||||
icon_state = "diamond"
|
||||
icon_state = "diamond_wall-0"
|
||||
base_icon_state = "diamond_wall"
|
||||
mineral = /obj/item/stack/sheet/mineral/diamond
|
||||
walltype = /turf/simulated/wall/mineral/diamond
|
||||
canSmoothWith = list(/obj/structure/falsewall/diamond, /turf/simulated/wall/mineral/diamond)
|
||||
smoothing_flags = SMOOTH_BITMASK
|
||||
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_DIAMOND_WALLS)
|
||||
canSmoothWith = list(SMOOTH_GROUP_DIAMOND_WALLS)
|
||||
max_integrity = 800
|
||||
|
||||
|
||||
@@ -249,10 +260,13 @@
|
||||
name = "plasma wall"
|
||||
desc = "A wall with plasma plating. This is definately a bad idea."
|
||||
icon = 'icons/turf/walls/plasma_wall.dmi'
|
||||
icon_state = "plasma"
|
||||
icon_state = "plasma_wall-0"
|
||||
base_icon_state = "plasma_wall"
|
||||
mineral = /obj/item/stack/sheet/mineral/plasma
|
||||
walltype = /turf/simulated/wall/mineral/plasma
|
||||
canSmoothWith = list(/obj/structure/falsewall/plasma, /turf/simulated/wall/mineral/plasma, /turf/simulated/wall/mineral/alien)
|
||||
smoothing_flags = SMOOTH_BITMASK
|
||||
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_PLASMA_WALLS)
|
||||
canSmoothWith = list(SMOOTH_GROUP_PLASMA_WALLS)
|
||||
|
||||
/obj/structure/falsewall/plasma/attackby(obj/item/W, mob/user, params)
|
||||
if(is_hot(W) > 300)
|
||||
@@ -278,85 +292,110 @@
|
||||
/obj/structure/falsewall/alien
|
||||
name = "alien wall"
|
||||
desc = "A strange-looking alien wall."
|
||||
icon = 'icons/turf/walls/plasma_wall.dmi'
|
||||
icon_state = "plasma"
|
||||
icon = 'icons/turf/walls/abductor_wall.dmi'
|
||||
icon_state = "abductor_wall-0"
|
||||
base_icon_state = "abductor_wall"
|
||||
mineral = /obj/item/stack/sheet/mineral/abductor
|
||||
walltype = /turf/simulated/wall/mineral/abductor
|
||||
canSmoothWith = list(/turf/simulated/wall/mineral/abductor, /obj/structure/falsewall/abductor, /turf/simulated/wall/indestructible/alien)
|
||||
smoothing_flags = SMOOTH_BITMASK
|
||||
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_ABDUCTOR_WALLS)
|
||||
canSmoothWith = list(SMOOTH_GROUP_ABDUCTOR_WALLS)
|
||||
|
||||
|
||||
/obj/structure/falsewall/bananium
|
||||
name = "bananium wall"
|
||||
desc = "A wall with bananium plating. Honk!"
|
||||
icon = 'icons/turf/walls/bananium_wall.dmi'
|
||||
icon_state = "bananium"
|
||||
icon_state = "bananium_wall-0"
|
||||
base_icon_state = "bananium_wall"
|
||||
mineral = /obj/item/stack/sheet/mineral/bananium
|
||||
walltype = /turf/simulated/wall/mineral/bananium
|
||||
canSmoothWith = list(/obj/structure/falsewall/bananium, /turf/simulated/wall/mineral/bananium)
|
||||
smoothing_flags = SMOOTH_BITMASK
|
||||
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_BANANIUM_WALLS)
|
||||
canSmoothWith = list(SMOOTH_GROUP_BANANIUM_WALLS)
|
||||
|
||||
/obj/structure/falsewall/sandstone
|
||||
name = "sandstone wall"
|
||||
desc = "A wall with sandstone plating."
|
||||
icon = 'icons/turf/walls/sandstone_wall.dmi'
|
||||
icon_state = "sandstone"
|
||||
icon_state = "sandstone_wall-0"
|
||||
base_icon_state = "sandstone_wall"
|
||||
mineral = /obj/item/stack/sheet/mineral/sandstone
|
||||
walltype = /turf/simulated/wall/mineral/sandstone
|
||||
canSmoothWith = list(/turf/simulated/wall/mineral/sandstone, /turf/simulated/wall/indestructible/sandstone, /obj/structure/falsewall/sandstone)
|
||||
smoothing_flags = SMOOTH_BITMASK
|
||||
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_SANDSTONE_WALLS)
|
||||
canSmoothWith = list(SMOOTH_GROUP_SANDSTONE_WALLS)
|
||||
|
||||
/obj/structure/falsewall/wood
|
||||
name = "wooden wall"
|
||||
desc = "A wall with wooden plating. Stiff."
|
||||
icon = 'icons/turf/walls/wood_wall.dmi'
|
||||
icon_state = "wood"
|
||||
icon_state = "wood_wall-0"
|
||||
base_icon_state = "wood_wall"
|
||||
mineral = /obj/item/stack/sheet/wood
|
||||
walltype = /turf/simulated/wall/mineral/wood
|
||||
canSmoothWith = list(/obj/structure/falsewall/wood, /turf/simulated/wall/mineral/wood)
|
||||
smoothing_flags = SMOOTH_BITMASK
|
||||
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_WOOD_WALLS)
|
||||
canSmoothWith = list(SMOOTH_GROUP_WOOD_WALLS)
|
||||
|
||||
/obj/structure/falsewall/iron
|
||||
name = "rough metal wall"
|
||||
desc = "A wall with rough metal plating."
|
||||
icon = 'icons/turf/walls/iron_wall.dmi'
|
||||
icon_state = "iron"
|
||||
icon_state = "iron_wall-0"
|
||||
base_icon_state = "iron_wall"
|
||||
mineral = /obj/item/stack/rods
|
||||
mineral_amount = 5
|
||||
walltype = /turf/simulated/wall/mineral/iron
|
||||
canSmoothWith = list(/obj/structure/falsewall/iron, /turf/simulated/wall/mineral/iron)
|
||||
smoothing_flags = SMOOTH_BITMASK
|
||||
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_IRON_WALLS)
|
||||
canSmoothWith = list(SMOOTH_GROUP_IRON_WALLS)
|
||||
|
||||
/obj/structure/falsewall/abductor
|
||||
name = "alien wall"
|
||||
desc = "A wall with alien alloy plating."
|
||||
icon = 'icons/turf/walls/abductor_wall.dmi'
|
||||
icon_state = "abductor"
|
||||
icon_state = "abductor_wall-0"
|
||||
base_icon_state = "abductor_wall"
|
||||
mineral = /obj/item/stack/sheet/mineral/abductor
|
||||
walltype = /turf/simulated/wall/mineral/abductor
|
||||
canSmoothWith = list(/obj/structure/falsewall/abductor, /turf/simulated/wall/mineral/abductor)
|
||||
smoothing_flags = SMOOTH_BITMASK
|
||||
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_ABDUCTOR_WALLS)
|
||||
canSmoothWith = list(SMOOTH_GROUP_ABDUCTOR_WALLS)
|
||||
|
||||
/obj/structure/falsewall/titanium
|
||||
desc = "A light-weight titanium wall used in shuttles."
|
||||
icon = 'icons/turf/walls/shuttle_wall.dmi'
|
||||
icon_state = "shuttle"
|
||||
icon = 'icons/turf/walls/plastinum_wall.dmi'
|
||||
icon_state = "plastinum_wall-0"
|
||||
base_icon_state = "plastinum_wall"
|
||||
mineral = /obj/item/stack/sheet/mineral/titanium
|
||||
walltype = /turf/simulated/wall/mineral/titanium
|
||||
smooth = SMOOTH_MORE
|
||||
canSmoothWith = list(/turf/simulated/wall/mineral/titanium, /obj/machinery/door/airlock/titanium, /obj/machinery/door/airlock, /obj/structure/window/full/shuttle, /obj/structure/shuttle/engine/heater)
|
||||
smoothing_flags = SMOOTH_BITMASK
|
||||
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_TITANIUM_WALLS)
|
||||
canSmoothWith = list(SMOOTH_GROUP_TITANIUM_WALLS, SMOOTH_GROUP_AIRLOCK, SMOOTH_GROUP_SHUTTLE_PARTS)
|
||||
|
||||
/obj/structure/falsewall/plastitanium
|
||||
desc = "An evil wall of plasma and titanium."
|
||||
icon = 'icons/turf/walls/plastitanium_wall.dmi'
|
||||
icon_state = "shuttle"
|
||||
icon_state = "plastitanium_wall-0"
|
||||
base_icon_state = "plastitanium_wall"
|
||||
mineral = /obj/item/stack/sheet/mineral/plastitanium
|
||||
walltype = /turf/simulated/wall/mineral/plastitanium
|
||||
smooth = SMOOTH_MORE
|
||||
canSmoothWith = list(/turf/simulated/wall/mineral/plastitanium, /turf/simulated/wall/indestructible/syndicate, /turf/simulated/wall/mineral/plastitanium/nodiagonal, /obj/machinery/door/airlock/titanium, /obj/machinery/door/airlock, /obj/structure/window/full/shuttle, /obj/structure/shuttle/engine/heater, /turf/simulated/wall/indestructible/opsglass, /obj/structure/window/full/plastitanium)
|
||||
smoothing_flags = SMOOTH_BITMASK
|
||||
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_PLASTITANIUM_WALLS)
|
||||
canSmoothWith = list(SMOOTH_GROUP_PLASTITANIUM_WALLS, SMOOTH_GROUP_AIRLOCK, SMOOTH_GROUP_SHUTTLE_PARTS)
|
||||
|
||||
/obj/structure/falsewall/brass
|
||||
name = "clockwork wall"
|
||||
desc = "A huge chunk of warm metal. The clanging of machinery emanates from within."
|
||||
icon = 'icons/turf/walls/clockwork_wall.dmi'
|
||||
icon_state = "clockwork_wall"
|
||||
icon_state = "clockwork_wall-0"
|
||||
base_icon_state = "clockwork_wall"
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
mineral_amount = 1
|
||||
canSmoothWith = list(/obj/effect/clockwork/overlay/wall, /obj/structure/falsewall/brass)
|
||||
smoothing_flags = SMOOTH_BITMASK
|
||||
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_BRASS_WALL)
|
||||
canSmoothWith = list(SMOOTH_GROUP_BRASS_WALL)
|
||||
girder_type = /obj/structure/clockwork/wall_gear/displaced
|
||||
walltype = /turf/simulated/wall/clockwork
|
||||
mineral = /obj/item/stack/tile/brass
|
||||
|
||||
Reference in New Issue
Block a user