From eb81ba0aa4816a5a71ccc7da7f4dfd54d5952800 Mon Sep 17 00:00:00 2001 From: TheAfroOfDoom Date: Mon, 21 Oct 2024 01:17:52 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B8=20show=20feedback=20link=20to=20pl?= =?UTF-8?q?ayer=20after=20beat=20Flowey=20for=20the=20first=20time?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../stop/as_active_player/won.mcfunction | 6 +++++ .../won/log_thanks_for_playing.mcfunction | 23 +++++++++++++++++++ .../as_interaction.mcfunction | 3 +-- 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 datapacks/omegaflowey/data/omegaflowey.entity/function/directorial/boss_fight/shared/stop/as_active_player/won/log_thanks_for_playing.mcfunction diff --git a/datapacks/omegaflowey/data/omegaflowey.entity/function/directorial/boss_fight/shared/stop/as_active_player/won.mcfunction b/datapacks/omegaflowey/data/omegaflowey.entity/function/directorial/boss_fight/shared/stop/as_active_player/won.mcfunction index 748820994..f878bca40 100644 --- a/datapacks/omegaflowey/data/omegaflowey.entity/function/directorial/boss_fight/shared/stop/as_active_player/won.mcfunction +++ b/datapacks/omegaflowey/data/omegaflowey.entity/function/directorial/boss_fight/shared/stop/as_active_player/won.mcfunction @@ -8,3 +8,9 @@ execute if score #omegaflowey.bossfight.player_hit_count omegaflowey.global.flag # Play custom item pickup sound stopsound @s player minecraft:entity.item.pickup playsound omega-flowey:player.get-item player @s ~ ~ ~ 10 + +# Show feedback link, but only the first time they beat it +execute unless entity @s[tag=omegaflowey.player.survived_flowey] run \ + function omegaflowey.entity:directorial/boss_fight/shared/stop/as_active_player/won/log_thanks_for_playing + +tag @s add omegaflowey.player.survived_flowey diff --git a/datapacks/omegaflowey/data/omegaflowey.entity/function/directorial/boss_fight/shared/stop/as_active_player/won/log_thanks_for_playing.mcfunction b/datapacks/omegaflowey/data/omegaflowey.entity/function/directorial/boss_fight/shared/stop/as_active_player/won/log_thanks_for_playing.mcfunction new file mode 100644 index 000000000..3115ca57e --- /dev/null +++ b/datapacks/omegaflowey/data/omegaflowey.entity/function/directorial/boss_fight/shared/stop/as_active_player/won/log_thanks_for_playing.mcfunction @@ -0,0 +1,23 @@ +function omegaflowey.utils:log/self { text_component: '[ \ + "", \ + { "text": "Thanks for playing our ", "color": "aqua" }, \ + { "text": "demo", "color": "gold" }, \ + { "text": "! ", "color": "aqua" }, \ + { "translate": ":trophy:" } \ +]'} + +function omegaflowey.utils:log/self { text_component: '[ \ + { \ + "text": "", "extra": [ \ + { "text": "We\'d love if you shared your ", "color": "aqua" }, \ + { "text": "feedback ", "color": "yellow" }, \ + { "translate": ":heart:" }, \ + " ", \ + { "text": "[link]", "color": "light_purple", "underlined": true } \ + ], \ + "clickEvent": { \ + "action": "open_url", \ + "value": "https://forms.gle/AkksowKZeQYoZ2z46" \ + } \ + } \ +]'} diff --git a/datapacks/omegaflowey/data/omegaflowey.entity/function/player/interacted/with_feedback_form_link/as_interaction.mcfunction b/datapacks/omegaflowey/data/omegaflowey.entity/function/player/interacted/with_feedback_form_link/as_interaction.mcfunction index 740f9c1e8..503a1a4de 100644 --- a/datapacks/omegaflowey/data/omegaflowey.entity/function/player/interacted/with_feedback_form_link/as_interaction.mcfunction +++ b/datapacks/omegaflowey/data/omegaflowey.entity/function/player/interacted/with_feedback_form_link/as_interaction.mcfunction @@ -3,8 +3,7 @@ execute on target run function omegaflowey.utils:log/self { text_component: ' \ { \ "text": "", "extra": [ \ { "text": "Click here to leave us ", "color": "aqua" }, \ - { "text": "feedback", "underlined": true, "color": "yellow" }, \ - { "text": "!", "color": "aqua" } \ + { "text": "feedback", "underlined": true, "color": "yellow" } \ ], \ "clickEvent": { \ "action": "open_url", \