mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +01:00
[IDB Ignore] Refactor icon smoothing to use 8-bit bitmasking (#16620)
This commit is contained in:
@@ -43,13 +43,23 @@
|
||||
layer = TURF_LAYER
|
||||
icon = 'icons/effects/dirt.dmi'
|
||||
icon_state = "dirt"
|
||||
canSmoothWith = list(/obj/effect/decal/cleanable/dirt, /turf/simulated/wall, /obj/structure/falsewall)
|
||||
smooth = SMOOTH_MORE
|
||||
base_icon_state = "dirt"
|
||||
smoothing_flags = NONE
|
||||
smoothing_groups = list(SMOOTH_GROUP_CLEANABLE_DIRT)
|
||||
canSmoothWith = list(SMOOTH_GROUP_CLEANABLE_DIRT, SMOOTH_GROUP_WALLS)
|
||||
mouse_opacity = FALSE
|
||||
|
||||
/obj/effect/decal/cleanable/dirt/Initialize(mapload)
|
||||
/obj/effect/decal/cleanable/dirt/Initialize()
|
||||
. = ..()
|
||||
icon_state = ""
|
||||
QUEUE_SMOOTH_NEIGHBORS(src)
|
||||
if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK))
|
||||
QUEUE_SMOOTH_NEIGHBORS(src)
|
||||
|
||||
/obj/effect/decal/cleanable/dirt/Destroy()
|
||||
QUEUE_SMOOTH_NEIGHBORS(src)
|
||||
if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK))
|
||||
QUEUE_SMOOTH_NEIGHBORS(src)
|
||||
return ..()
|
||||
|
||||
/obj/effect/decal/cleanable/dirt/blackpowder
|
||||
name = "black powder"
|
||||
|
||||
@@ -66,11 +66,11 @@
|
||||
return TRUE
|
||||
if(random_icon_states && length(src.random_icon_states) > 0)
|
||||
src.icon_state = pick(src.random_icon_states)
|
||||
if(smooth)
|
||||
queue_smooth(src)
|
||||
queue_smooth_neighbors(src)
|
||||
if(smoothing_flags)
|
||||
QUEUE_SMOOTH(src)
|
||||
QUEUE_SMOOTH_NEIGHBORS(src)
|
||||
|
||||
/obj/effect/decal/cleanable/Destroy()
|
||||
if(smooth)
|
||||
queue_smooth_neighbors(src)
|
||||
if(smoothing_flags)
|
||||
QUEUE_SMOOTH_NEIGHBORS(src)
|
||||
return ..()
|
||||
|
||||
Reference in New Issue
Block a user