Skip to content

Commit

Permalink
📈 minify bossfight data tags
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAfroOfDoom committed Oct 23, 2024
1 parent 83cd493 commit 1716257
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function omegaflowey.main:telemetry/data/active_player/bossfight_hit_count
function omegaflowey.main:telemetry/data/active_player/gamemode with storage omegaflowey:bossfight
execute store result storage omegaflowey:telemetry.temp data.stop_reason int 1 run \
execute store result storage omegaflowey:telemetry.temp data.s int 1 run \
scoreboard players get #omegaflowey.bossfight.stop_reason omegaflowey.global.flag
function omegaflowey.main:telemetry/bossfight/tag/end { name: "bossfight.summit" }
function omegaflowey.main:telemetry/bossfight/tag/root/end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
data modify storage omegaflowey:telemetry.temp data set value {}
execute store result storage omegaflowey:telemetry.temp data.phase_index int 1 run \
execute store result storage omegaflowey:telemetry.temp data.i int 1 run \
scoreboard players get @s omegaflowey.boss-fight.attack.phase.i
function omegaflowey.main:telemetry/bossfight/tag/start { name: "bossfight.phase.attack" }

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
data modify storage omegaflowey:telemetry.temp data set value {}
execute store result storage omegaflowey:telemetry.temp data.phase_index int 1 run \
execute store result storage omegaflowey:telemetry.temp data.i int 1 run \
scoreboard players get @s omegaflowey.boss-fight.cutscene.phase.i
function omegaflowey.main:telemetry/bossfight/tag/start { name: "bossfight.phase.cutscene" }

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
data modify storage omegaflowey:telemetry.temp data set value {}
execute store result storage omegaflowey:telemetry.temp data.phase_index int 1 run \
execute store result storage omegaflowey:telemetry.temp data.i int 1 run \
scoreboard players get @s omegaflowey.boss-fight.progress.phase.i
function omegaflowey.main:telemetry/bossfight/tag/start { name: "bossfight.phase.soul" }

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
data modify storage omegaflowey:telemetry.temp data set value {}
execute store result storage omegaflowey:telemetry.temp data.phase_index int 1 run \
execute store result storage omegaflowey:telemetry.temp data.i int 1 run \
scoreboard players get @s omegaflowey.boss-fight.progress.phase.i
function omegaflowey.main:telemetry/bossfight/tag/start { name: "bossfight.phase.warn" }

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
data modify storage omegaflowey:telemetry.temp data set value { amount: 4 }
data modify storage omegaflowey:telemetry.temp data set value { a: 4 }
function omegaflowey.main:telemetry/bossfight/tag/instant { name: "player.heal" }

effect give @s minecraft:instant_health 1 1 true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$data modify storage omegaflowey:telemetry.temp data set value { amount: $(damage) }
data modify storage omegaflowey:telemetry.temp data.source set from storage omegaflowey:utils.damage source
$data modify storage omegaflowey:telemetry.temp data set value { d: $(damage) }
data modify storage omegaflowey:telemetry.temp data.s set from storage omegaflowey:utils.damage source
function omegaflowey.main:telemetry/data/active_player/gamemode with storage omegaflowey:bossfight
function omegaflowey.main:telemetry/bossfight/tag/instant { name: "player.damage" }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,21 @@ data modify storage omegaflowey:telemetry schema_bossfight_name set value { \
"soul.saved": 34, \
"player.heal": 35, \
}

## bossfight.summit.end data
# h: player_hit_count
# s: stop_reason

## bossfight.phase.attack.start data
## bossfight.phase.cutscene.start data
## bossfight.phase.soul.start data
## bossfight.phase.warn.start data
# i: phase_index

## player.damage data
# d: damage
# g: player_gamemode
# s: source

## player.heal data
# a: amount
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function omegaflowey.main:telemetry/data/shared

execute store result storage omegaflowey:telemetry.temp data.player_hit_count int 1 run \
execute store result storage omegaflowey:telemetry.temp data.h int 1 run \
scoreboard players get #omegaflowey.bossfight.player_hit_count omegaflowey.global.flag
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
function omegaflowey.main:telemetry/data/shared

$execute as $(active_player_uuid) if entity @s[gamemode=survival] run \
data modify storage omegaflowey:telemetry.temp data.player_gamemode set value 0
data modify storage omegaflowey:telemetry.temp data.g set value 0
$execute as $(active_player_uuid) if entity @s[gamemode=creative] run \
data modify storage omegaflowey:telemetry.temp data.player_gamemode set value 1
data modify storage omegaflowey:telemetry.temp data.g set value 1
$execute as $(active_player_uuid) if entity @s[gamemode=adventure] run \
data modify storage omegaflowey:telemetry.temp data.player_gamemode set value 2
data modify storage omegaflowey:telemetry.temp data.g set value 2
$execute as $(active_player_uuid) if entity @s[gamemode=spectator] run \
data modify storage omegaflowey:telemetry.temp data.player_gamemode set value 3
data modify storage omegaflowey:telemetry.temp data.g set value 3

0 comments on commit 1716257

Please sign in to comment.