mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-28 22:47:59 +01:00
[IDB Ignore] Refactor icon smoothing to use 8-bit bitmasking (#16620)
This commit is contained in:
@@ -86,6 +86,7 @@
|
||||
barefootstep = FOOTSTEP_WATER
|
||||
clawfootstep = FOOTSTEP_WATER
|
||||
heavyfootstep = FOOTSTEP_WATER
|
||||
smoothing_groups = list(SMOOTH_GROUP_BEACH_WATER)
|
||||
|
||||
/turf/simulated/floor/beach/away/water/Entered(atom/movable/AM, atom/OldLoc)
|
||||
. = ..()
|
||||
@@ -120,13 +121,11 @@
|
||||
/turf/simulated/floor/beach/away/water/drop
|
||||
name = "Water"
|
||||
icon = 'icons/turf/floors/seadrop.dmi'
|
||||
icon_state = "seadrop"
|
||||
icon_state = "seadrop-0"
|
||||
base_icon_state = "seadrop"
|
||||
water_overlay_image = null
|
||||
smooth = SMOOTH_TRUE
|
||||
canSmoothWith = list(
|
||||
/turf/simulated/floor/beach/away/water/drop, /turf/simulated/floor/beach/away/water/drop/dense,
|
||||
/turf/simulated/floor/beach/away/water, /turf/simulated/floor/beach/away/water/dense,
|
||||
/turf/simulated/floor/beach/away/water/edge_drop)
|
||||
smoothing_flags = SMOOTH_BITMASK
|
||||
canSmoothWith = list(SMOOTH_GROUP_BEACH_WATER)
|
||||
var/obj/effect/beach_drop_overlay/water_overlay
|
||||
baseturf = /turf/simulated/floor/beach/away/water/drop
|
||||
|
||||
@@ -141,13 +140,11 @@
|
||||
/obj/effect/beach_drop_overlay
|
||||
name = "Water"
|
||||
icon = 'icons/turf/floors/seadrop-o.dmi'
|
||||
base_icon_state = "seadrop-o"
|
||||
layer = MOB_LAYER + 0.1
|
||||
smooth = SMOOTH_TRUE
|
||||
smoothing_flags = SMOOTH_BITMASK
|
||||
canSmoothWith = list(SMOOTH_GROUP_BEACH_WATER)
|
||||
anchored = 1
|
||||
canSmoothWith = list(
|
||||
/turf/simulated/floor/beach/away/water/drop, /turf/simulated/floor/beach/away/water/drop/dense,
|
||||
/turf/simulated/floor/beach/away/water, /turf/simulated/floor/beach/away/water/dense,
|
||||
/turf/simulated/floor/beach/away/water/edge_drop)
|
||||
|
||||
/turf/simulated/floor/beach/away/water/drop/dense
|
||||
density = TRUE
|
||||
@@ -155,6 +152,7 @@
|
||||
|
||||
/turf/simulated/floor/beach/away/water/deep
|
||||
name = "Deep Water"
|
||||
smoothing_groups = list()
|
||||
icon_state = "seadeep"
|
||||
water_overlay_image = "water_deep"
|
||||
baseturf = /turf/simulated/floor/beach/away/water/deep
|
||||
|
||||
@@ -14,12 +14,12 @@
|
||||
subtimer = start_watch()
|
||||
log_debug("Smoothing tiles")
|
||||
for(var/turf/T in smoothTurfs)
|
||||
if(T.smooth)
|
||||
queue_smooth(T)
|
||||
if(T.smoothing_flags)
|
||||
QUEUE_SMOOTH(T)
|
||||
for(var/R in T)
|
||||
var/atom/A = R
|
||||
if(A.smooth)
|
||||
queue_smooth(A)
|
||||
if(A.smoothing_flags)
|
||||
QUEUE_SMOOTH(A)
|
||||
log_debug("\tTook [stop_watch(subtimer)]s")
|
||||
log_debug("Late setup finished - took [stop_watch(total_timer)]s")
|
||||
|
||||
|
||||
@@ -73,10 +73,12 @@
|
||||
/obj/structure/window/full/shuttle/survival_pod
|
||||
name = "pod window"
|
||||
icon = 'icons/obj/smooth_structures/pod_window.dmi'
|
||||
icon_state = "smooth"
|
||||
smooth = SMOOTH_MORE
|
||||
icon_state = "pod_window-0"
|
||||
base_icon_state = "pod_window"
|
||||
smoothing_flags = SMOOTH_BITMASK
|
||||
glass_type = /obj/item/stack/sheet/titaniumglass
|
||||
canSmoothWith = list(/turf/simulated/wall/mineral/titanium/survival, /obj/machinery/door/airlock/survival_pod, /obj/structure/window/full/shuttle/survival_pod)
|
||||
smoothing_groups = list(SMOOTH_GROUP_SHUTTLE_PARTS, SMOOTH_GROUP_SURVIVAL_TIANIUM_POD)
|
||||
canSmoothWith = list(SMOOTH_GROUP_SURVIVAL_TIANIUM_POD)
|
||||
|
||||
/obj/structure/window/reinforced/survival_pod
|
||||
name = "pod window"
|
||||
@@ -128,7 +130,9 @@
|
||||
/obj/structure/table/survival_pod
|
||||
icon = 'icons/obj/lavaland/survival_pod.dmi'
|
||||
icon_state = "table"
|
||||
smooth = SMOOTH_FALSE
|
||||
smoothing_flags = NONE
|
||||
smoothing_groups = null
|
||||
canSmoothWith = null
|
||||
|
||||
//Sleeper
|
||||
/obj/machinery/sleeper/survival_pod
|
||||
|
||||
@@ -100,7 +100,7 @@ Difficulty: Hard
|
||||
/datum/action/innate/megafauna_attack/hallucination_surround
|
||||
name = "Surround Target"
|
||||
icon_icon = 'icons/turf/walls/wall.dmi'
|
||||
button_icon_state = "wall"
|
||||
button_icon_state = "wall-0"
|
||||
chosen_message = "<span class='colossus'>You are now surrounding the target you click on with hallucinations.</span>"
|
||||
chosen_attack_num = 3
|
||||
|
||||
|
||||
@@ -512,18 +512,23 @@ Difficulty: Hard
|
||||
/obj/effect/temp_visual/hierophant/wall //smoothing and pooling were not friends, but pooling is dead.
|
||||
name = "vortex wall"
|
||||
icon = 'icons/turf/walls/hierophant_wall_temp.dmi'
|
||||
icon_state = "wall"
|
||||
icon_state = "hierophant_wall_temp-0"
|
||||
base_icon_state = "hierophant_wall_temp"
|
||||
smoothing_flags = SMOOTH_BITMASK
|
||||
smoothing_groups = list(SMOOTH_GROUP_HIERO_WALL)
|
||||
canSmoothWith = list(SMOOTH_GROUP_HIERO_WALL)
|
||||
light_range = MINIMUM_USEFUL_LIGHT_RANGE
|
||||
duration = 100
|
||||
smooth = SMOOTH_TRUE
|
||||
|
||||
/obj/effect/temp_visual/hierophant/wall/Initialize(mapload, new_caster)
|
||||
. = ..()
|
||||
queue_smooth_neighbors(src)
|
||||
queue_smooth(src)
|
||||
if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK))
|
||||
QUEUE_SMOOTH_NEIGHBORS(src)
|
||||
QUEUE_SMOOTH(src)
|
||||
|
||||
/obj/effect/temp_visual/hierophant/wall/Destroy()
|
||||
queue_smooth_neighbors(src)
|
||||
if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK))
|
||||
QUEUE_SMOOTH_NEIGHBORS(src)
|
||||
return ..()
|
||||
|
||||
/obj/effect/temp_visual/hierophant/wall/CanPass(atom/movable/mover, turf/target)
|
||||
|
||||
@@ -293,4 +293,5 @@ GLOBAL_LIST_INIT(AISwarmerCapsByType, list(/mob/living/simple_animal/hostile/swa
|
||||
name = "swarmer catwalk"
|
||||
desc = "A catwalk-like mesh, produced by swarmers to allow them to navigate hostile terrain."
|
||||
icon = 'icons/obj/smooth_structures/swarmer_catwalk.dmi'
|
||||
icon_state = "swarmer_catwalk"
|
||||
icon_state = "swarmer_catwalk-0"
|
||||
base_icon_state = "swarmer_catwalk"
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
icon = 'icons/effects/spacevines.dmi'
|
||||
icon_state = "flower_bud"
|
||||
layer = MOB_LAYER + 0.9
|
||||
opacity = 0
|
||||
canSmoothWith = list()
|
||||
smooth = SMOOTH_FALSE
|
||||
var/growth_time = 1200
|
||||
opacity = FALSE
|
||||
canSmoothWith = null
|
||||
smoothing_flags = NONE
|
||||
var/growth_time = 120 SECONDS
|
||||
|
||||
/obj/structure/alien/resin/flower_bud_enemy/New()
|
||||
..()
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
flags_2 = RAD_PROTECT_CONTENTS_2 | RAD_NO_CONTAMINATE_2
|
||||
light_range = 4
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF | FREEZE_PROOF
|
||||
var/base_icon_state = "darkmatter"
|
||||
base_icon_state = "darkmatter"
|
||||
|
||||
///The id of our supermatter
|
||||
var/supermatter_id = 1
|
||||
|
||||
@@ -684,7 +684,7 @@
|
||||
flags_2 = RAD_PROTECT_CONTENTS_2 | RAD_NO_CONTAMINATE_2
|
||||
plane = FLOOR_PLANE
|
||||
layer = DISPOSAL_PIPE_LAYER // slightly lower than wires and other pipes
|
||||
var/base_icon_state // initial icon state on map
|
||||
base_icon_state // initial icon state on map
|
||||
|
||||
// new pipe, set the icon_state as on map
|
||||
/obj/structure/disposalpipe/Initialize(mapload)
|
||||
|
||||
@@ -47,17 +47,17 @@
|
||||
name = "clockwork wall"
|
||||
icon = 'icons/turf/walls/clockwork_wall.dmi'
|
||||
icon_state = "clockwork_wall"
|
||||
canSmoothWith = list(/obj/effect/clockwork/overlay/wall, /obj/structure/falsewall/brass)
|
||||
smooth = SMOOTH_TRUE
|
||||
canSmoothWith = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_BRASS_WALL)
|
||||
smoothing_flags = SMOOTH_CORNERS
|
||||
layer = CLOSED_TURF_LAYER
|
||||
|
||||
/obj/effect/clockwork/overlay/wall/Initialize(mapload)
|
||||
. = ..()
|
||||
queue_smooth_neighbors(src)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/queue_smooth, src), 1)
|
||||
QUEUE_SMOOTH_NEIGHBORS(src)
|
||||
QUEUE_SMOOTH(src)
|
||||
|
||||
/obj/effect/clockwork/overlay/wall/Destroy()
|
||||
queue_smooth_neighbors(src)
|
||||
QUEUE_SMOOTH_NEIGHBORS(src)
|
||||
return ..()
|
||||
|
||||
/obj/effect/clockwork/overlay/floor
|
||||
|
||||
@@ -57,8 +57,8 @@
|
||||
|
||||
// After docking //
|
||||
/atom/proc/postDock(obj/docking_port/S1)
|
||||
if(smooth)
|
||||
queue_smooth(src)
|
||||
if(smoothing_flags)
|
||||
QUEUE_SMOOTH(src)
|
||||
|
||||
/mob/postDock()
|
||||
update_parallax_contents()
|
||||
|
||||
@@ -4,10 +4,12 @@
|
||||
visual disturbances. It's probably best not to be on top of these \
|
||||
when whatever is tunneling comes through."
|
||||
icon = 'icons/turf/floors/ripple.dmi'
|
||||
icon_state = "ripple"
|
||||
icon_state = "ripple-0"
|
||||
base_icon_state = "ripple"
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
smooth = SMOOTH_TRUE
|
||||
smoothing_flags = SMOOTH_BITMASK
|
||||
smoothing_groups = list(SMOOTH_GROUP_RIPPLE)
|
||||
layer = RIPPLE_LAYER
|
||||
alpha = 0
|
||||
duration = 3 * SHUTTLE_RIPPLE_TIME
|
||||
@@ -15,5 +17,5 @@
|
||||
|
||||
/obj/effect/temp_visual/ripple/New()
|
||||
. = ..()
|
||||
queue_smooth(src)
|
||||
QUEUE_SMOOTH(src)
|
||||
animate(src, alpha=255, time=SHUTTLE_RIPPLE_TIME)
|
||||
|
||||
@@ -11,8 +11,8 @@ If ever any of these procs are useful for non-shuttles, rename it to proc/rotate
|
||||
setDir(angle2dir(rotation+dir2angle(dir)))
|
||||
|
||||
//resmooth if need be.
|
||||
if(smooth && (params & ROTATE_SMOOTH))
|
||||
queue_smooth(src)
|
||||
if(params & ROTATE_SMOOTH && smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK))
|
||||
QUEUE_SMOOTH(src)
|
||||
|
||||
//rotate the pixel offsets too.
|
||||
if((pixel_x || pixel_y) && (params & ROTATE_OFFSET))
|
||||
|
||||
Reference in New Issue
Block a user