Skip to content

Commit

Permalink
(0.14.43) /trigger do2.trigger.enable_coop
Browse files Browse the repository at this point in the history
  • Loading branch information
Frustrated-Programmer committed Feb 9, 2025
1 parent 0a6bb9f commit 612d8de
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ execute as @e[team=do2.players] run function do2:vanilla_compatability/gui/inter

# Disable setting triggers
execute as @a[tag=!do2.fakePlayers] run trigger do2.trigger.settings add 0
execute as @a[tag=!do2.fakePlayers] run trigger do2.trigger.enable_coop add 0

# Agronet event
function do2:external/agronet/logs/gamestate/on_game_load
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ tag @s add do2.audio_checking
schedule function do2:vanilla_compatability/audio/interface/detect 5t append

# Check if we should enable player's ability to enter in the setting's room
tag @s add do2.setting_room_checking
schedule function do2:external/tracked_out/check_if_setting_room_trigger 5t append
tag @s add do2.practice_room_checking
schedule function do2:external/tracked_out/check_for_start_of_practice 5t append

# Agronet event
function do2:external/agronet/logs/spam/on_player_join
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Code needed to delay this function.
execute unless entity @s[tag=do2.practice_room_checking2] as @a[tag=do2.practice_room_checking] run tag @s add do2.practice_room_checking2
execute unless entity @s[tag=do2.practice_room_checking2] as @a[tag=do2.practice_room_checking] run function do2:external/tracked_out/check_for_start_of_practice
tag @a remove do2.practice_room_checking
execute unless entity @a[tag=do2.practice_room_checking2] run return 0
tag @a remove do2.practice_room_checking2

# do2.utility.runType
# 0 = unknown
# 1 = practice
# 2 = comp

execute unless score @p[tag=do2.received_shulker] do2.utility.runType matches 1 run return 0
execute unless score $dungeon do2.run.active matches 0 run return 0

scoreboard players enable @s do2.trigger.settings
scoreboard players enable @s do2.trigger.enable_coop

# Lock setting's room
scoreboard players set $dungeon do2.utility.lockConfigRoom 2
function do2:scoreboard/config/config_lock_inverse

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ execute as @a[tag=!do2.fakePlayer] unless entity @s[scores={do2.trigger.map=0}]
execute as @a[tag=!do2.fakePlayer] unless entity @s[scores={do2.trigger.playsound=0}] run function do2:scoreboard/triggers/t_playsound
execute as @a[tag=!do2.fakePlayer] unless entity @s[scores={do2.trigger.gui=0}] run function do2:scoreboard/triggers/t_gui
execute as @a[tag=!do2.fakePlayer] unless entity @s[scores={do2.trigger.settings=0}] run function do2:scoreboard/triggers/t_settings
execute as @a[tag=!do2.fakePlayer] unless entity @s[scores={do2.trigger.enable_coop=0}] run function do2:scoreboard/triggers/t_enable_coop
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ scoreboard players set @s do2.trigger.map 0
scoreboard players set @s do2.trigger.playsound 0
scoreboard players set @s do2.trigger.gui 0
scoreboard players set @s do2.trigger.settings 0
scoreboard players set @s do2.trigger.enable_coop 0

scoreboard players enable @s[tag=do2.staff] do2.trigger.logs
scoreboard players enable @s[tag=do2.staff] do2.trigger.settings
scoreboard players enable @s[tag=do2.staff] do2.trigger.enable_coop
scoreboard players enable @s do2.trigger.version
scoreboard players enable @s do2.trigger.map
scoreboard players enable @s do2.trigger.playsound
scoreboard players enable @s do2.trigger.gui
scoreboard players set @s do2.trigger.settings 0
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ scoreboard players enable @a[tag=!do2.fakePlayer] do2.trigger.playsound
scoreboard objectives add do2.trigger.gui trigger "detect gui trigger"
scoreboard players enable @a[tag=!do2.fakePlayer] do2.trigger.gui

scoreboard objectives add do2.trigger.enable_coop trigger "detect coop trigger"
scoreboard players enable @a[tag=!do2.fakePlayer,tag=do2.staff] do2.trigger.enable_coop

scoreboard objectives add do2.trigger.settings trigger "detect settings trigger"
scoreboard players enable @a[tag=!do2.fakePlayer,tag=do2.staff] do2.trigger.settings

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
scoreboard players set @s do2.trigger.enable_coop 0

execute unless score @p[tag=do2.received_shulker] do2.utility.runType matches 1 run return 0
execute unless score $dungeon do2.run.active matches 0 run return 0

tellraw @s ["§r§l§aENABLED §r§oCO-OP§r!\nHave your partner join via the spectate NPC in the lobby."]
function do2:external/agronet/game_start

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
execute if score @s do2.trigger.playsound matches 103 run function do2:vanilla_compatability/audio/interface/enable
execute if score @s do2.trigger.playsound matches 102 run function do2:vanilla_compatability/audio/interface/disable
execute if score @s do2.trigger.playsound matches 101 run function do2:vanilla_compatability/audio/interface/config_menu
execute if score @s do2.trigger.playsound matches 1 run function do2:vanilla_compatability/audio/interface/config_menu
execute unless score @s do2.trigger.playsound matches 0 unless score @s do2.trigger.playsound matches 101..103 run function do2:vanilla_compatability/audio/interface/config_menu

scoreboard players set @s do2.trigger.playsound 0
scoreboard players enable @s do2.trigger.playsound
4 changes: 2 additions & 2 deletions Brilliance Datapack/data/do2/functions/version.mcfunction
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# DATAPACK VERSION NUMBER: 0.14.42
# DATAPACK VERSION NUMBER: 0.14.43

tellraw @s ["",{"text":"The §o§n§aBrilliance Datapack§r's version is: [§b0.14.42§r] Check latest version "},{"text":"§o§b§nhere§r","clickEvent":{"action":"open_url","value":"https://github.com/trackedout/Brilliance/blob/main/Brilliance%20Datapack/data/do2/functions/version.mcfunction"}},{"text":"."}]
tellraw @s ["",{"text":"The §o§n§aBrilliance Datapack§r's version is: [§b0.14.43§r] Check latest version "},{"text":"§o§b§nhere§r","clickEvent":{"action":"open_url","value":"https://github.com/trackedout/Brilliance/blob/main/Brilliance%20Datapack/data/do2/functions/version.mcfunction"}},{"text":"."}]

0 comments on commit 612d8de

Please sign in to comment.