Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚸 improve active player display + add sound categories display #235

Merged
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
execute unless entity @s[tag=omegaflowey.player.fighting_flowey] run \
scoreboard players set #omegaflowey.admin.is_active_player omegaflowey.global.flag 0

function gu:generate
function omegaflowey.admin:attack/shared/macro with storage omegaflowey:bossfight

execute if score #omegaflowey.admin.is_active_player omegaflowey.global.flag matches 0 run \
function omegaflowey.utils:log/self { text_component: '[ \
{ "text": "", "color": "red" }, \
"Some attacks won\'t function properly if you don\'t have the bossfight tag.\\n", \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$execute \
if entity @s[tag=omegaflowey.player.fighting_flowey] \
if data storage gu:main { out: "$(active_player_uuid)" } run \
scoreboard players set #omegaflowey.admin.is_active_player omegaflowey.global.flag 1
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
execute if entity @s[tag=omegaflowey.player.fighting_flowey] run return run \
function omegaflowey.utils:log/self { text_component: '[ \
{ "text": "You are already the active bossfight player", "color": "red" } \
]' }

tag @a remove omegaflowey.player.fighting_flowey
tag @s add omegaflowey.player.fighting_flowey

function gu:generate
data modify storage omegaflowey:bossfight active_player_uuid set from storage gu:main out

function omegaflowey.main:summit/room/cave/active_player_display/update_value with storage omegaflowey:bossfight

function omegaflowey.utils:log/self { text_component: '[ \
{ "text": "Set you as the active bossfight player", "color": "yellow" } \
]' }
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
execute unless entity @s[tag=omegaflowey.player.fighting_flowey] run return run \
function omegaflowey.utils:log/self { text_component: '[ \
{ "text": "You are already NOT the active bossfight player", "color": "red" } \
]' }

tag @s remove omegaflowey.player.fighting_flowey

function omegaflowey.main:summit/room/cave/active_player_display/update_value with storage omegaflowey:bossfight

function omegaflowey.utils:log/self { text_component: '[ \
{ "text": "Unset you as the active bossfight player", "color": "yellow" } \
]' }
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ function omegaflowey.entity:shared/run_as_active_player_or_spectator { command:
}
$execute as $(active_player_uuid) run function omegaflowey.entity:directorial/boss_fight/shared/stop/as_active_player

data modify storage omegaflowey:bossfight active_player_uuid set value "0"
function omegaflowey.main:summit/room/cave/active_player_display/update_value with storage omegaflowey:bossfight
# prompt next player in queue
function omegaflowey.entity:directorial/boss_fight/summit/player/queue/check_should_prompt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# players who leave the server are removed from the bossfight (when they rejoin)
function omegaflowey.entity:directorial/boss_fight/shared/stop/as_active_player/modify_health_and_tags
function omegaflowey.main:summit/room/cave/active_player_display/update_value with storage omegaflowey:bossfight

function omegaflowey.utils:log/self { text_component: '[\
{ "text": "You were ", "color": "yellow" }, \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
setblock -133 43 44 air

$execute unless entity $(active_player_uuid) run \
$execute unless entity $(active_player_uuid) run return run \
data modify entity @s text set value '[{ "text": "NONE", "bold": true, "color": "green" }]'
$execute unless entity $(active_player_uuid) run return 0

$data modify entity @s text set value '[{ "selector": "$(active_player_uuid)", "color": "white" }]'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
$execute as $(active_player_uuid) run data modify storage omegaflowey:bossfight active_player_uuid_intarray set from entity @s UUID
# If active player doesn't exist, update active player UUID storage
$execute unless entity $(active_player_uuid) run data modify storage omegaflowey:bossfight active_player_uuid set value "0"
$execute \
as $(active_player_uuid) \
if entity @s[tag=!omegaflowey.player.fighting_flowey] \
run data modify storage omegaflowey:bossfight active_player_uuid set value "0"

$data modify storage omegaflowey:bossfight active_player_uuid_intarray set from entity $(active_player_uuid) UUID

$execute as $(active_player_display_uuid) run \
function omegaflowey.main:summit/room/cave/active_player_display/as_text_display with storage omegaflowey:bossfight
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
$execute unless entity $(active_player_uuid) run \
$execute unless entity $(active_player_uuid) run return run \
data modify entity @s text set value '""'
$execute unless entity $(active_player_uuid) run return 0

$data modify entity @s text set value '[ \
{ "text": "\\uf610", "font": "omega-flowey:custom" }, \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -648,3 +648,83 @@ execute as @e[ \
limit=1 \
] run function gu:generate
data modify storage omegaflowey:decorative feedback_form_interaction_uuid set from storage gu:main out

summon minecraft:text_display -137.75 44.0 26.001 { \
Tags: [ \
"omega-flowey-remastered", \
"decorative", \
"decorative-cave", \
"sound-categories-display-title", \
], \
alignment: "center", \
background: 0, \
brightness: { block: 12, sky: 0 }, \
default_background: 0b, \
line_width: 200, \
see_through: 0b, \
shadow: 0b, \
text: '{ "text": "BOOTH SOUND CATEGORIES", "color": "gold", "bold": true }', \
text_opacity: 255, \
transformation: { \
left_rotation: [0.0f, 0.0f, 0.0f, 1.0f], \
right_rotation: [0.0f, 0.0f, 0.0f, 1.0f], \
scale: [0.875f, 0.875f, 0.875f], \
translation: [0.0f, 0.0f, 0.0f] \
} \
}

summon minecraft:text_display -137.75 42.0 26.0015 { \
Tags: [ \
"omega-flowey-remastered", \
"decorative", \
"decorative-cave", \
"sound-categories-display-content", \
], \
alignment: "left", \
background: -16777216, \
brightness: { block: 12, sky: 0 }, \
default_background: 0b, \
line_width: 300, \
see_through: 0b, \
shadow: 0b, \
text: '[ \
{ "translate": ":musical_note:" }, \
{ "text": " Jukebox/Note Blocks", "color": "yellow", "bold": true }, \
"\\nbossfight music\\n\\n", \
{ "translate": ":crossed_swords:" }, \
{ "text": " Hostile Creatures", "color": "yellow", "bold": true }, \
"\\nattack sound effects\\n\\n", \
{ "translate": ":video_game:" }, \
{ "text": " Players", "color": "yellow", "bold": true }, \
"\\nsound effects applied to players\\n\\n", \
{ "translate": ":earth_americas:" }, \
{ "text": " Ambient", "color": "yellow", "bold": true }, \
"\\nmisc. supplemental sounds" \
]', \
text_opacity: 255, \
transformation: { \
left_rotation: [0.0f, 0.0f, 0.0f, 1.0f], \
right_rotation: [0.0f, 0.0f, 0.0f, 1.0f], \
scale: [0.625f, 0.625f, 0.625f], \
translation: [0.0f, 0.0f, 0.0f], \
} \
}

summon minecraft:block_display -139.13 41.9375 26.001 { \
Tags: [ \
"omega-flowey-remastered", \
"decorative", \
"decorative-cave", \
"sound-categories-display-border", \
], \
block_state: { \
"Name": "minecraft:smooth_quartz", \
}, \
brightness: { block: 12, sky: 0 }, \
transformation: { \
left_rotation: [0.0f, 0.0f, 0.0f, 1.0f], \
right_rotation: [0.0f, 0.0f, 0.0f, 1.0f], \
scale: [2.775f, 1.875f, 1.0E-4f], \
translation: [0.0f, 0.0f, 0.0f], \
} \
}