[MIRROR] [READY] Refactor icon smoothing to use 8-bit bitmasking (#1053)

* Merge pull request #53906 from Rohesie/smoothing

[READY] Refactor icon smoothing to use 8-bit bitmasking

* [READY] Refactor icon smoothing to use 8-bit bitmasking

Co-authored-by: nemvar <47324920+nemvar@users.noreply.github.com>
This commit is contained in:
SkyratBot
2020-09-29 22:55:58 +01:00
committed by GitHub
co-authored by nemvar
parent f5ae2cd993
commit b96909fb02
146 changed files with 760 additions and 423 deletions
@@ -93,7 +93,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
@@ -516,18 +516,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
smoothing_flags = SMOOTH_CORNERS
/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/CanAllowThrough(atom/movable/mover, turf/target)
@@ -285,4 +285,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"
@@ -73,7 +73,7 @@ Difficulty: Hard
/datum/action/innate/megafauna_attack/disorienting_scream
name = "Disorienting Scream"
icon_icon = 'icons/turf/walls/wall.dmi'
button_icon_state = "wall"
button_icon_state = "wall-0"
chosen_message = "<span class='colossus'>You are now screeching, disorienting targets around you.</span>"
chosen_attack_num = 3
@@ -302,9 +302,12 @@ While using this makes the system rely on OnFire, it still gives options for tim
/obj/effect/temp_visual/elite_tumor_wall
name = "magic 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)
duration = 50
smoothing_flags = SMOOTH_CORNERS
layer = BELOW_MOB_LAYER
color = rgb(255,0,0)
light_range = MINIMUM_USEFUL_LIGHT_RANGE
@@ -314,11 +317,13 @@ While using this makes the system rely on OnFire, it still gives options for tim
/obj/effect/temp_visual/elite_tumor_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/elite_tumor_wall/Destroy()
QUEUE_SMOOTH_NEIGHBORS(src)
if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK))
QUEUE_SMOOTH_NEIGHBORS(src)
activator = null
ourelite = null
return ..()