From 1c7d513afea22f21e875fc48f7c413149b8fa3a3 Mon Sep 17 00:00:00 2001 From: TheAfroOfDoom Date: Fri, 22 Dec 2023 01:25:36 -0500 Subject: [PATCH] ticketize TODOs specific to `friendliness-pellets` functions new issues: - https://github.com/TheAfroOfDoom/omega-flowey-minecraft-remastered/issues/43 - https://github.com/TheAfroOfDoom/omega-flowey-minecraft-remastered/issues/44 - https://github.com/TheAfroOfDoom/omega-flowey-minecraft-remastered/issues/45 --- .../executor/loop/summon_indicator.mcfunction | 4 ++-- .../attack/friendliness-pellets/indicator/loop.mcfunction | 4 +++- .../attack/friendliness-pellets/reset_scores.mcfunction | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/friendliness-pellets/executor/loop/summon_indicator.mcfunction b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/friendliness-pellets/executor/loop/summon_indicator.mcfunction index 7bb6942ef..8453b24fb 100644 --- a/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/friendliness-pellets/executor/loop/summon_indicator.mcfunction +++ b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/friendliness-pellets/executor/loop/summon_indicator.mcfunction @@ -3,12 +3,12 @@ # Summon indicator execute at @r[team=player] run summon minecraft:marker ~ 33.0 ~ {CustomName: '"Friendliness-Pellets Indicator"', Tags:["omega-flowey-remastered","groupable","hostile","omega-flowey","attack","attack-indicator","attack-indicator-new","friendliness-pellets"], Passengers: [{id:"minecraft:item_display",Tags:["omega-flowey-remastered","hostile","omega-flowey","attack","friendliness-pellets"],transformation:[-1f,0f,1.2246467991473532e-16f,0f,0f,1f,0f,-0.125f,-1.2246467991473532e-16f,0f,-1f,0f,0f,0f,0f,1f],interpolation_duration:1,item_display:"head",item:{id:"minecraft:golden_sword",Count:1b,tag:{CustomModelData:4}}}]} -# TODO: this is so unbelievably hacky +# TODO(43): this is so unbelievably hacky # first indicator is 6 ticks slower before it starts summoning bullets execute if score @s attack.clock.i matches 0 run scoreboard players add #attack-friendliness-pellets attack.indicator.clock.delay 6 # Initialize indicator execute as @e[tag=attack-indicator-new] at @s run function entity:hostile/omega-flowey/attack/friendliness-pellets/indicator/initialize -# TODO: this is so unbelievably hacky +# TODO(43): this is so unbelievably hacky execute if score @s attack.clock.i matches 0 run scoreboard players remove #attack-friendliness-pellets attack.indicator.clock.delay 6 diff --git a/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/friendliness-pellets/indicator/loop.mcfunction b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/friendliness-pellets/indicator/loop.mcfunction index 8b41b256e..978742b68 100644 --- a/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/friendliness-pellets/indicator/loop.mcfunction +++ b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/friendliness-pellets/indicator/loop.mcfunction @@ -2,6 +2,7 @@ scoreboard players add @s attack.clock.i 1 +# TODO(45): refactor repeated `attack.clock.i` conditionals into separate functions # Change ring variant at tick index execute if score @s attack.clock.i = @s attack.indicator.animation.index run function entity:group/start execute if score @s attack.clock.i = @s attack.indicator.animation.index as @e[tag=friendliness-pellet-ring,scores={group.id=0}] run function animated_java:friendliness_pellet_ring/apply_variant/finished_blinking @@ -13,6 +14,7 @@ execute if score @s attack.clock.i matches ..-1 run playsound omega-flowey:attac # Ignore bullet summoning logic while `attack.clock.i` is negative execute if score @s attack.clock.i matches ..-1 run return 0 +# TODO(45): refactor repeated `attack.clock.i` conditionals into separate functions # Delete ring when we start summoning bullets execute if score @s attack.clock.i matches 0 run function entity:group/start execute if score @s attack.clock.i matches 0 as @e[tag=friendliness-pellet-ring,scores={group.id=0}] run function animated_java:friendliness_pellet_ring/remove/this @@ -25,5 +27,5 @@ execute if score @s attack.bullets.count < @s attack.bullets.total run function execute if score @s attack.bullets.count = @s attack.bullets.total run scoreboard players add @s attack.bullets.clock.i 1 # After `attack.bullets.clock.delay` ticks, terminate (and activate all bullets) -# TODO: this could be off by one tick (might need to be `attack.bullets.clock.delay - 1`?) +# TODO(44): this could be off by one tick (might need to be `attack.bullets.clock.delay - 1`?) execute if score @s attack.bullets.clock.i = @s attack.bullets.clock.delay run function entity:hostile/omega-flowey/attack/friendliness-pellets/indicator/terminate diff --git a/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/friendliness-pellets/reset_scores.mcfunction b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/friendliness-pellets/reset_scores.mcfunction index 30b85c867..9ae09cb7a 100644 --- a/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/friendliness-pellets/reset_scores.mcfunction +++ b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/friendliness-pellets/reset_scores.mcfunction @@ -1,4 +1,5 @@ ## Set fake player scores back to defaults (if they were changed by a pre-initialize attack function) +# TODO(44): validate these attack parameters scoreboard players set #attack-friendliness-pellets attack.bullets.clock.delay 4 scoreboard players set #attack-friendliness-pellets attack.bullets.total 10 # (42 / 14) + 1 = 3 + 1 = 4 indicators