Skip to content

Commit

Permalink
πŸ§‘β€πŸ’» add telemetry trigger to force create a new page
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAfroOfDoom committed Oct 27, 2024
1 parent 803b025 commit e082444
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ scoreboard objectives add omegaflowey.player.telemetry.id dummy
scoreboard objectives add omegaflowey.player.telemetry.trigger.disable trigger
scoreboard objectives add omegaflowey.player.telemetry.trigger.enable trigger
scoreboard objectives add omegaflowey.player.telemetry.trigger.help trigger
scoreboard objectives add omegaflowey.player.telemetry.trigger.new_page.booth trigger
scoreboard objectives add omegaflowey.player.telemetry.trigger.new_page.bossfight trigger
scoreboard objectives add omegaflowey.player.telemetry.trigger.pop.booth trigger
scoreboard objectives add omegaflowey.player.telemetry.trigger.pop.bossfight trigger
scoreboard objectives add omegaflowey.player.telemetry.trigger.show.booth trigger
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,25 @@ function omegaflowey.utils:log/self { text_component: '[ \
} \
}, \
"\\n", \
{ "text": "new_page: ", "color": "aqua" }, \
{ \
"text": "booth", \
"color": "yellow", \
"clickEvent": { \
"action": "suggest_command", \
"value": "/trigger omegaflowey.player.telemetry.trigger.new_page.booth" \
} \
}, \
" ", \
{ \
"text": "bossfight", \
"color": "yellow", \
"clickEvent": { \
"action": "suggest_command", \
"value": "/trigger omegaflowey.player.telemetry.trigger.new_page.bossfight" \
} \
}, \
"\\n", \
"\\n", \
{ \
"text": "stats", \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
execute if entity @s[name=!TheAfroOfDoom] run return run function omegaflowey.utils:log/self { text_component: '[ \
{ "text": "Only ", "color": "red" }, \
{ "text": "TheAfroOfDoom ", "color": "yellow" }, \
{ "text": "can start a new page in booth telemetry", "color": "red" } \
]'}

function omegaflowey.main:telemetry/booth/add_tag/new_page

function omegaflowey.utils:log/self { text_component: '[ \
{ "text": "Started a new page in booth telemetry ", "color": "yellow" } \
]'}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
execute if entity @s[name=!TheAfroOfDoom] run return run function omegaflowey.utils:log/self { text_component: '[ \
{ "text": "Only ", "color": "red" }, \
{ "text": "TheAfroOfDoom ", "color": "yellow" }, \
{ "text": "can start a new page in bossfight telemetry", "color": "red" } \
]'}

$execute if entity $(boss_fight_uuid) run return run function omegaflowey.utils:log/self { text_component: '[ \
{ "text": "Cannot start a new page in bossfight telemetry: a bossfight is currently active", "color": "red" } \
]'}

function omegaflowey.main:telemetry/bossfight/tag/root/start/new_page

function omegaflowey.utils:log/self { text_component: '[ \
{ "text": "Started a new page in bossfight telemetry ", "color": "yellow" } \
]'}
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
scoreboard players enable @s omegaflowey.player.telemetry.trigger.disable
scoreboard players enable @s omegaflowey.player.telemetry.trigger.enable
scoreboard players enable @s omegaflowey.player.telemetry.trigger.help
scoreboard players enable @s omegaflowey.player.telemetry.trigger.new_page.booth
scoreboard players enable @s omegaflowey.player.telemetry.trigger.new_page.bossfight
scoreboard players enable @s omegaflowey.player.telemetry.trigger.pop.booth
scoreboard players enable @s omegaflowey.player.telemetry.trigger.pop.bossfight
scoreboard players enable @s omegaflowey.player.telemetry.trigger.show.booth
Expand All @@ -10,6 +12,8 @@ scoreboard players enable @s omegaflowey.player.telemetry.trigger.stats
scoreboard players set @s omegaflowey.player.telemetry.trigger.disable 0
scoreboard players set @s omegaflowey.player.telemetry.trigger.enable 0
scoreboard players set @s omegaflowey.player.telemetry.trigger.help 0
scoreboard players set @s omegaflowey.player.telemetry.trigger.new_page.booth 0
scoreboard players set @s omegaflowey.player.telemetry.trigger.new_page.bossfight 0
scoreboard players set @s omegaflowey.player.telemetry.trigger.pop.booth 0
scoreboard players set @s omegaflowey.player.telemetry.trigger.pop.bossfight 0
scoreboard players set @s omegaflowey.player.telemetry.trigger.show.booth 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ execute if score @s omegaflowey.player.telemetry.trigger.enable matches 1 run \
function omegaflowey.main:telemetry/admin/enable
execute if score @s omegaflowey.player.telemetry.trigger.help matches 1 run \
function omegaflowey.main:telemetry/admin/help
execute if score @s omegaflowey.player.telemetry.trigger.new_page.booth matches 1 run \
function omegaflowey.main:telemetry/admin/new_page/booth
execute if score @s omegaflowey.player.telemetry.trigger.new_page.bossfight matches 1 run \
function omegaflowey.main:telemetry/admin/new_page/bossfight with storage omegaflowey:bossfight
execute if score @s omegaflowey.player.telemetry.trigger.pop.booth matches 1 run \
function omegaflowey.main:telemetry/admin/pop/booth
execute if score @s omegaflowey.player.telemetry.trigger.pop.bossfight matches 1 run \
Expand Down

0 comments on commit e082444

Please sign in to comment.