From 3a9968c26eeb572dcf63e9c00151a77499e6d73d Mon Sep 17 00:00:00 2001 From: TheAfroOfDoom Date: Tue, 22 Oct 2024 22:23:03 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20add=20admin?= =?UTF-8?q?=20queue=20enable/disable=20functions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../function/help.mcfunction | 23 +++++++++++- .../function/queue/disable.mcfunction | 6 +++ .../function/queue/enable.mcfunction | 6 +++ .../interacted/with_join_queue.mcfunction | 5 ++- .../interacted/with_join_queue_2.mcfunction | 5 ++- .../room/cave/setup/text_displays.mcfunction | 1 + .../join_queue/disable.mcfunction | 37 +++++++++++++++++++ .../join_queue/enable.mcfunction | 33 +++++++++++++++++ 8 files changed, 113 insertions(+), 3 deletions(-) create mode 100644 datapacks/omegaflowey/data/omegaflowey.admin/function/queue/disable.mcfunction create mode 100644 datapacks/omegaflowey/data/omegaflowey.admin/function/queue/enable.mcfunction create mode 100644 datapacks/omegaflowey/data/omegaflowey.main/function/summit/room/cave/setup/text_displays/join_queue/disable.mcfunction create mode 100644 datapacks/omegaflowey/data/omegaflowey.main/function/summit/room/cave/setup/text_displays/join_queue/enable.mcfunction diff --git a/datapacks/omegaflowey/data/omegaflowey.admin/function/help.mcfunction b/datapacks/omegaflowey/data/omegaflowey.admin/function/help.mcfunction index 18b43cb0d..35b8eb925 100644 --- a/datapacks/omegaflowey/data/omegaflowey.admin/function/help.mcfunction +++ b/datapacks/omegaflowey/data/omegaflowey.admin/function/help.mcfunction @@ -250,7 +250,28 @@ function omegaflowey.utils:log/self { text_component: '[ \ "value": "/function omegaflowey.admin:kill/queue" \ } \ }, \ - ": resets the bossfight player queue" \ + ": resets the bossfight player queue", \ + "\\n", \ + "\\n", \ + { \ + "text": "queue/enable", \ + "color": "yellow", \ + "clickEvent": { \ + "action": "suggest_command", \ + "value": "/function omegaflowey.admin:queue/enable" \ + } \ + }, \ + ": enables the join queue buttons and shows their text", \ + "\\n", \ + { \ + "text": "queue/disable", \ + "color": "yellow", \ + "clickEvent": { \ + "action": "suggest_command", \ + "value": "/function omegaflowey.admin:queue/disable" \ + } \ + }, \ + ": disables the join queue buttons and hides their text" \ ] \ } \ ]'} diff --git a/datapacks/omegaflowey/data/omegaflowey.admin/function/queue/disable.mcfunction b/datapacks/omegaflowey/data/omegaflowey.admin/function/queue/disable.mcfunction new file mode 100644 index 000000000..a692b3bc9 --- /dev/null +++ b/datapacks/omegaflowey/data/omegaflowey.admin/function/queue/disable.mcfunction @@ -0,0 +1,6 @@ +function omegaflowey.utils:log { text_component: '[ \ + { "selector": "@s", "color": "gold" }, \ + { "text": " disabled the JOIN QUEUE buttons ", "color": "yellow" } \ +]'} + +function omegaflowey.main:summit/room/cave/setup/text_displays/join_queue/disable diff --git a/datapacks/omegaflowey/data/omegaflowey.admin/function/queue/enable.mcfunction b/datapacks/omegaflowey/data/omegaflowey.admin/function/queue/enable.mcfunction new file mode 100644 index 000000000..350be3a10 --- /dev/null +++ b/datapacks/omegaflowey/data/omegaflowey.admin/function/queue/enable.mcfunction @@ -0,0 +1,6 @@ +function omegaflowey.utils:log { text_component: '[ \ + { "selector": "@s", "color": "gold" }, \ + { "text": " enabled the JOIN QUEUE buttons ", "color": "yellow" } \ +]'} + +function omegaflowey.main:summit/room/cave/setup/text_displays/join_queue/enable diff --git a/datapacks/omegaflowey/data/omegaflowey.entity/function/player/interacted/with_join_queue.mcfunction b/datapacks/omegaflowey/data/omegaflowey.entity/function/player/interacted/with_join_queue.mcfunction index 27433d319..be8a3fcd9 100644 --- a/datapacks/omegaflowey/data/omegaflowey.entity/function/player/interacted/with_join_queue.mcfunction +++ b/datapacks/omegaflowey/data/omegaflowey.entity/function/player/interacted/with_join_queue.mcfunction @@ -1,3 +1,6 @@ +advancement revoke @s only omegaflowey.entity:player_interacted_with_join_queue + +execute if score #omegaflowey.bossfight.queue_disabled omegaflowey.global.flag matches 1 run return 0 + function omegaflowey.main:telemetry/booth/add_tag { name: "player.interact.join_queue" } function omegaflowey.entity:player/interacted/with_join_queue/macro with storage omegaflowey:decorative -advancement revoke @s only omegaflowey.entity:player_interacted_with_join_queue diff --git a/datapacks/omegaflowey/data/omegaflowey.entity/function/player/interacted/with_join_queue_2.mcfunction b/datapacks/omegaflowey/data/omegaflowey.entity/function/player/interacted/with_join_queue_2.mcfunction index 53a436c23..2339f7d61 100644 --- a/datapacks/omegaflowey/data/omegaflowey.entity/function/player/interacted/with_join_queue_2.mcfunction +++ b/datapacks/omegaflowey/data/omegaflowey.entity/function/player/interacted/with_join_queue_2.mcfunction @@ -1,3 +1,6 @@ +advancement revoke @s only omegaflowey.entity:player_interacted_with_join_queue_2 + +execute if score #omegaflowey.bossfight.queue_disabled omegaflowey.global.flag matches 1 run return 0 + function omegaflowey.main:telemetry/booth/add_tag { name: "player.interact.join_queue_2" } function omegaflowey.entity:player/interacted/with_join_queue_2/macro with storage omegaflowey:decorative -advancement revoke @s only omegaflowey.entity:player_interacted_with_join_queue_2 diff --git a/datapacks/omegaflowey/data/omegaflowey.main/function/summit/room/cave/setup/text_displays.mcfunction b/datapacks/omegaflowey/data/omegaflowey.main/function/summit/room/cave/setup/text_displays.mcfunction index 17f7f0d81..f7f8dfa02 100644 --- a/datapacks/omegaflowey/data/omegaflowey.main/function/summit/room/cave/setup/text_displays.mcfunction +++ b/datapacks/omegaflowey/data/omegaflowey.main/function/summit/room/cave/setup/text_displays.mcfunction @@ -83,6 +83,7 @@ data modify storage omegaflowey:bossfight active_player_health_display_uuid set # Player name display updates both the name (+ skull) and the health counter function omegaflowey.main:summit/room/cave/active_player_display/update_value with storage omegaflowey:bossfight +scoreboard players set #omegaflowey.bossfight.queue_disabled omegaflowey.global.flag 0 summon minecraft:text_display -137.5 43.5 42.5 { \ Tags: [ \ "omega-flowey-remastered", \ diff --git a/datapacks/omegaflowey/data/omegaflowey.main/function/summit/room/cave/setup/text_displays/join_queue/disable.mcfunction b/datapacks/omegaflowey/data/omegaflowey.main/function/summit/room/cave/setup/text_displays/join_queue/disable.mcfunction new file mode 100644 index 000000000..03f78bfd6 --- /dev/null +++ b/datapacks/omegaflowey/data/omegaflowey.main/function/summit/room/cave/setup/text_displays/join_queue/disable.mcfunction @@ -0,0 +1,37 @@ +execute as @e[ \ + x=-137.5, y=43.5, z=42.5, distance=..0.01, \ + type=minecraft:text_display, \ + tag=join-queue-title, \ + limit=1 \ +] run data modify entity @s text set value '[ \ + { "text": "FIGHT\\n", "color": "red", "bold": true, "underlined": false }, \ + { "text": "DISABLED", "underlined": true } \ +]' + +execute as @e[ \ + x=-137.5, y=43.5, z=42.5, distance=..0.01, \ + type=minecraft:interaction, \ + tag=join-queue-interaction, \ + limit=1 \ +] run data modify entity @s response set value false + +execute as @e[ \ + x=-135.75, y=38.5, z=46.25, distance=..0.01, \ + type=minecraft:text_display, \ + tag=join-queue-2-title, \ + limit=1 \ +] run data modify entity @s text set value '[ \ + { "text": "FIGHT\\n", "color": "red", "bold": true, "underlined": false }, \ + { "text": "DISABLED", "underlined": true } \ +]' + +execute as @e[ \ + x=-135.75, y=38.5, z=46.25, distance=..0.01, \ + type=minecraft:interaction, \ + tag=join-queue-2-interaction, \ + limit=1 \ +] run data modify entity @s response set value false + +scoreboard players set #omegaflowey.bossfight.queue_disabled omegaflowey.global.flag 1 + +function omegaflowey.entity:directorial/boss_fight/summit/player/queue/reset diff --git a/datapacks/omegaflowey/data/omegaflowey.main/function/summit/room/cave/setup/text_displays/join_queue/enable.mcfunction b/datapacks/omegaflowey/data/omegaflowey.main/function/summit/room/cave/setup/text_displays/join_queue/enable.mcfunction new file mode 100644 index 000000000..f60d201e6 --- /dev/null +++ b/datapacks/omegaflowey/data/omegaflowey.main/function/summit/room/cave/setup/text_displays/join_queue/enable.mcfunction @@ -0,0 +1,33 @@ +execute as @e[ \ + x=-137.5, y=43.5, z=42.5, distance=..0.01, \ + type=minecraft:text_display, \ + tag=join-queue-title, \ + limit=1 \ +] run data modify entity @s text set value '[ \ + { "text": "JOIN QUEUE", "color": "light_purple", "bold": true, "underlined": true } \ +]' + +execute as @e[ \ + x=-137.5, y=43.5, z=42.5, distance=..0.01, \ + type=minecraft:interaction, \ + tag=join-queue-interaction, \ + limit=1 \ +] run data modify entity @s response set value true + +execute as @e[ \ + x=-135.75, y=38.5, z=46.25, distance=..0.01, \ + type=minecraft:text_display, \ + tag=join-queue-2-title, \ + limit=1 \ +] run data modify entity @s text set value '[ \ + { "text": "JOIN QUEUE", "color": "light_purple", "bold": true, "underlined": true } \ +]' + +execute as @e[ \ + x=-135.75, y=38.5, z=46.25, distance=..0.01, \ + type=minecraft:interaction, \ + tag=join-queue-2-interaction, \ + limit=1 \ +] run data modify entity @s response set value true + +scoreboard players set #omegaflowey.bossfight.queue_disabled omegaflowey.global.flag 0