Skip to content

Commit

Permalink
πŸ§‘β€πŸ’» add admin queue enable/disable functions
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAfroOfDoom committed Oct 23, 2024
1 parent 1716257 commit 3a9968c
Show file tree
Hide file tree
Showing 8 changed files with 113 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
] \
} \
]'}
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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", \
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 3a9968c

Please sign in to comment.