Skip to content

Commit

Permalink
skin memory! woo! and some bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
InQuognito committed Feb 7, 2025
1 parent 8ba5455 commit de45fe8
Show file tree
Hide file tree
Showing 15 changed files with 60 additions and 54 deletions.
6 changes: 5 additions & 1 deletion data/ssbrc/function/logic/fighter/select.mcfunction
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
$function ssbrc:logic/player/data/temp/set {mode:"store",key:"fighter",value:"$(name)"}
execute unless entity @s[tag=picking_random] run function ssbrc:logic/player/data/temp/set {mode:"store",key:"skin",value:"default"}

data modify storage ssbrc:temp arguments.uuid set from entity @s UUID
$data modify storage ssbrc:temp arguments.fighter set value "$(name)"
function ssbrc:logic/fighter/skin/get with storage ssbrc:temp arguments
execute unless entity @s[tag=picking_random] run function ssbrc:logic/fighter/skin/load with storage ssbrc:temp arguments

function ssbrc:logic/player/data/temp/copy/check
$execute unless data storage ssbrc:temp player.temp_data{fighter:"team_rocket"} run function ssbrc:logic/player/data/temp/set {mode:"store",key:"form",value:"$(default_form)"}
Expand Down
1 change: 1 addition & 0 deletions data/ssbrc/function/logic/fighter/select_skin.mcfunction
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
$function ssbrc:logic/player/data/temp/set {mode:"store",key:"skin",value:"$(skin)"}
$execute unless entity @s[tag=picking_random] run function ssbrc:logic/player/data/permanent/set {mode:"store",key:"$(fighter)_skin",value:"$(skin)"}

$tellraw @s[tag=!blind_pick,tag=!picking_random] [{"text":"\n"},{"translate":"ssbrc.fighter.menu.skin","color":"white"},{"translate":"ssbrc.skin.$(skin)","color":"$(color)"},{"text":"\n"}]
$execute if entity @s[tag=!blind_pick,tag=!picking_random] run function ssbrc:fighter/$(fighter)/menu/skin/options
Expand Down
4 changes: 4 additions & 0 deletions data/ssbrc/function/logic/fighter/skin/get.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$execute if data storage ssbrc:data player.data."$(uuid)".$(fighter)_skin run return run data modify storage ssbrc:temp arguments.skin set from storage ssbrc:data player.data."$(uuid)".$(fighter)_skin

$function ssbrc:logic/player/data/permanent/set {mode:"store",key:"$(fighter)_skin",value:"default"}
data modify storage ssbrc:temp arguments.skin set value "default"
3 changes: 3 additions & 0 deletions data/ssbrc/function/logic/fighter/skin/load.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$execute if data storage ssbrc:data player.data."$(uuid)".$(fighter)_skin run return run function ssbrc:logic/player/data/temp/set {mode:"store",key:"skin",value:"$(skin)"}

execute unless entity @s[tag=picking_random] run function ssbrc:logic/player/data/temp/set {mode:"store",key:"skin",value:"default"}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ scoreboard objectives add bowser.fire_breath dummy
scoreboard objectives add bowser.fire_breath.target dummy
scoreboard objectives add burning dummy
scoreboard objectives add character_trigger trigger
scoreboard players set @a character_trigger 0
scoreboard players enable @a character_trigger
scoreboard objectives add fighter_picked dummy
scoreboard objectives add charge.1 dummy
scoreboard objectives add charge.2 dummy
Expand All @@ -24,8 +22,6 @@ scoreboard objectives add cooldown.3 dummy
scoreboard objectives add crawling dummy
scoreboard objectives add stats.credits.temp dummy
scoreboard objectives add debug trigger
scoreboard players set @a debug 0
scoreboard players enable @a debug
scoreboard objectives add drop_item minecraft.custom:minecraft.drop
scoreboard objectives add durability dummy
scoreboard objectives add duration.1 dummy
Expand Down Expand Up @@ -76,14 +72,10 @@ scoreboard objectives add mega_man.metal_blade dummy
scoreboard objectives add mega_man.pile_driver dummy
scoreboard objectives add mega_man.remote_mine dummy
scoreboard objectives add menu trigger
scoreboard players set @a menu 0
scoreboard players enable @a menu
scoreboard objectives add motion_x dummy
scoreboard objectives add motion_y dummy
scoreboard objectives add motion_z dummy
scoreboard objectives add options_trigger trigger
scoreboard players set @a options_trigger 0
scoreboard players enable @a options_trigger
scoreboard objectives add pac_maze.scoreboard dummy
scoreboard objectives add petrified dummy
scoreboard objectives add piercing dummy
Expand Down
49 changes: 14 additions & 35 deletions data/ssbrc/function/logic/game/options/trigger.mcfunction
Original file line number Diff line number Diff line change
@@ -1,42 +1,21 @@
execute if score @s options_trigger matches 1 run function ssbrc:logic/game/options/game_mode/stock
execute if score @s options_trigger matches 2 run function ssbrc:logic/game/options/game_mode/time
execute if score @s options_trigger matches 1 run return run function ssbrc:logic/game/options/game_mode/stock
execute if score @s options_trigger matches 2 run return run function ssbrc:logic/game/options/game_mode/time

execute if score @s options_trigger matches 3 if score game_mode options matches 1 run function ssbrc:logic/game/options/stock_limit {value:"1"}
execute if score @s options_trigger matches 4 if score game_mode options matches 1 run function ssbrc:logic/game/options/stock_limit {value:"2"}
execute if score @s options_trigger matches 5 if score game_mode options matches 1 run function ssbrc:logic/game/options/stock_limit {value:"3"}
execute if score @s options_trigger matches 6 if score game_mode options matches 1 run function ssbrc:logic/game/options/stock_limit {value:"4"}
execute if score @s options_trigger matches 7 if score game_mode options matches 1 run function ssbrc:logic/game/options/stock_limit {value:"5"}
execute if score @s options_trigger matches 8 if score game_mode options matches 1 run function ssbrc:logic/game/options/stock_limit {value:"6"}
execute if score @s options_trigger matches 9 if score game_mode options matches 1 run function ssbrc:logic/game/options/stock_limit {value:"7"}
execute if score @s options_trigger matches 10 if score game_mode options matches 1 run function ssbrc:logic/game/options/stock_limit {value:"8"}
execute if score @s options_trigger matches 11 if score game_mode options matches 1 run function ssbrc:logic/game/options/stock_limit {value:"9"}
execute if score @s options_trigger matches 3..11 run return run function ssbrc:logic/game/options/trigger/check

execute if score @s options_trigger matches 3 if score game_mode options matches 2 run function ssbrc:logic/game/options/time_limit {value:"1"}
execute if score @s options_trigger matches 4 if score game_mode options matches 2 run function ssbrc:logic/game/options/time_limit {value:"2"}
execute if score @s options_trigger matches 5 if score game_mode options matches 2 run function ssbrc:logic/game/options/time_limit {value:"3"}
execute if score @s options_trigger matches 6 if score game_mode options matches 2 run function ssbrc:logic/game/options/time_limit {value:"4"}
execute if score @s options_trigger matches 7 if score game_mode options matches 2 run function ssbrc:logic/game/options/time_limit {value:"5"}
execute if score @s options_trigger matches 8 if score game_mode options matches 2 run function ssbrc:logic/game/options/time_limit {value:"6"}
execute if score @s options_trigger matches 9 if score game_mode options matches 2 run function ssbrc:logic/game/options/time_limit {value:"7"}
execute if score @s options_trigger matches 10 if score game_mode options matches 2 run function ssbrc:logic/game/options/time_limit {value:"8"}
execute if score @s options_trigger matches 11 if score game_mode options matches 2 run function ssbrc:logic/game/options/time_limit {value:"9"}
execute if score @s options_trigger matches 12 run return run function ssbrc:logic/game/options/teams/on
execute if score @s options_trigger matches 13 run return run function ssbrc:logic/game/options/teams/off

execute if score @s options_trigger matches 12 run function ssbrc:logic/game/options/teams/on
execute if score @s options_trigger matches 13 run function ssbrc:logic/game/options/teams/off
execute if score @s options_trigger matches 14 run return run function ssbrc:logic/game/options/friendly_fire/on
execute if score @s options_trigger matches 15 run return run function ssbrc:logic/game/options/friendly_fire/off

execute if score @s options_trigger matches 14 run function ssbrc:logic/game/options/friendly_fire/on
execute if score @s options_trigger matches 15 run function ssbrc:logic/game/options/friendly_fire/off
execute if score @s options_trigger matches 16 run return run function ssbrc:logic/game/options/hazards/on
execute if score @s options_trigger matches 17 run return run function ssbrc:logic/game/options/hazards/off

execute if score @s options_trigger matches 16 run function ssbrc:logic/game/options/hazards/on
execute if score @s options_trigger matches 17 run function ssbrc:logic/game/options/hazards/off
execute if score @s options_trigger matches 18 run return run function ssbrc:logic/game/options/blind_pick/on
execute if score @s options_trigger matches 19 run return run function ssbrc:logic/game/options/blind_pick/off

execute if score @s options_trigger matches 18 run function ssbrc:logic/game/options/blind_pick/on
execute if score @s options_trigger matches 19 run function ssbrc:logic/game/options/blind_pick/off
execute if score @s options_trigger matches 20 run return run function ssbrc:logic/game/options/music/shuffle
execute if score @s options_trigger matches 21 run return run function ssbrc:logic/game/options/music/loop

execute if score @s options_trigger matches 20 run function ssbrc:logic/game/options/music/shuffle
execute if score @s options_trigger matches 21 run function ssbrc:logic/game/options/music/loop

execute if score @s options_trigger matches 9999 run function ssbrc:logic/game/options/default

scoreboard players reset @s options_trigger
scoreboard players enable @s options_trigger
function ssbrc:logic/game/options/default
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
execute if score game_mode options matches 2 run return run function ssbrc:logic/game/options/trigger/mode_limit {mode:"time"}

function ssbrc:logic/game/options/trigger/mode_limit {mode:"stock"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
$execute if score @s options_trigger matches 3 run return run function ssbrc:logic/game/options/$(mode)_limit {value:"1"}

$execute if score @s options_trigger matches 4 run return run function ssbrc:logic/game/options/$(mode)_limit {value:"2"}

$execute if score @s options_trigger matches 5 run return run function ssbrc:logic/game/options/$(mode)_limit {value:"3"}

$execute if score @s options_trigger matches 6 run return run function ssbrc:logic/game/options/$(mode)_limit {value:"4"}

$execute if score @s options_trigger matches 7 run return run function ssbrc:logic/game/options/$(mode)_limit {value:"5"}

$execute if score @s options_trigger matches 8 run return run function ssbrc:logic/game/options/$(mode)_limit {value:"6"}

$execute if score @s options_trigger matches 9 run return run function ssbrc:logic/game/options/$(mode)_limit {value:"7"}

$execute if score @s options_trigger matches 10 run return run function ssbrc:logic/game/options/$(mode)_limit {value:"8"}

$execute if score @s options_trigger matches 11 run function ssbrc:logic/game/options/$(mode)_limit {value:"9"}
6 changes: 5 additions & 1 deletion data/ssbrc/function/logic/lobby/trigger.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@ scoreboard players set @s menu 0
scoreboard players enable @s menu

execute unless score @s character_trigger matches 0 run function ssbrc:logic/pre_game/fighter_select/trigger/loadout
scoreboard players set @s character_trigger 0
scoreboard players enable @s character_trigger

execute if items entity @s weapon.mainhand minecraft:written_book[minecraft:custom_data~{item:"options"}] run function ssbrc:logic/game/options/trigger
execute if items entity @s weapon.mainhand minecraft:written_book[minecraft:custom_data~{item:"options"}] unless score @s options_trigger matches 0 run function ssbrc:logic/game/options/trigger
scoreboard players set @s options_trigger 0
scoreboard players enable @s options_trigger
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$data modify storage ssbrc:temp player.temp_data set from storage ssbrc:data player.data.$(UUID)
$data modify storage ssbrc:temp player.temp_data set from storage ssbrc:data player.data."$(UUID)"
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$data modify storage ssbrc:data player.data."$(UUID)" set value {mario_skin:"default"}
$data modify storage ssbrc:data player.data."$(UUID)" merge value {mario_skin:"default"}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function ssbrc:logic/player/data/permanent/get
data modify storage ssbrc:temp arguments.uuid set from entity @s UUID

$data modify storage ssbrc:temp arguments.key set value "$(key)"
$data modify storage ssbrc:temp arguments.value set value "$(value)"
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
$data modify storage ssbrc:data player.temp_data[$(index)].$(key) set value "$(value)"
$data modify storage ssbrc:data player.data."$(uuid)".$(key) set value "$(value)"

$say data modify storage ssbrc:data player.data."$(uuid)".$(key) set value "$(value)"
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
execute if data storage ssbrc:temp player.temp_data{fighter:"byleth"} run function ssbrc:fighter/byleth/menu/loadout/trigger

execute if data storage ssbrc:temp player.temp_data{fighter:"snake"} run function ssbrc:fighter/snake/menu/loadout/trigger

scoreboard players set @s character_trigger 0
scoreboard players enable @s character_trigger
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
execute unless score debug options matches 1 run function ssbrc:stage/miiverse/logic/posts/origin/summon/default
execute if score debug options matches 1 run return run function ssbrc:stage/miiverse/logic/posts/origin/summon/debug

execute if score debug options matches 1 run function ssbrc:stage/miiverse/logic/posts/origin/summon/debug
function ssbrc:stage/miiverse/logic/posts/origin/summon/default

0 comments on commit de45fe8

Please sign in to comment.