Skip to content

Commit

Permalink
🩹 リセットされていないTemporaryがリセットされるように修正 (#1296)
Browse files Browse the repository at this point in the history
Co-authored-by: blanoir3298 <mrashen.2gou@gmail.com>
  • Loading branch information
Lapis-LJA and haiiro2gou committed Jun 26, 2023
1 parent 465c039 commit 66ee2a6
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@
# 0~2の値を4~6になるように4加算
scoreboard players add @s Temporary 4
# 保持
scoreboard players operation @s CU.RandomCount = @s Temporary
scoreboard players operation @s CU.RandomCount = @s Temporary

# リセット
scoreboard players reset @s Temporary
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,9 @@
#declare score_holder $Cooldown
#declare score_holder $Value
#declare score_holder $NormalizedValue
#declare score_holder $Max
#declare score_holder $Max

#> リセット用
# @within function asset_manager:artifact/triggers/equipments/update_cooldown/*
#declare score_holder $Tick
#declare score_holder $LatestUsedTick
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,6 @@
data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].LocalCoolDown set from storage lib: Array
# リセット
function lib:array/session/close
data remove storage asset:artifact ItemData
data remove storage asset:artifact ItemData
scoreboard players reset $Tick Temporary
scoreboard players reset $LatestUsedTick Temporary
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@

#> Private
# @private
#declare score_holder $Tick
#declare score_holder $Max
#declare score_holder $LatestUsedTick

# データ取得
execute store result score $Tick Temporary run time query gametime
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
#
# @within function core:tick/6_distributed_interval

execute if data storage global {IsProduction:1b} if score $DistributeGroup Temporary matches 0 run function #asset:spawner/register/a
execute if data storage global {IsProduction:1b} if score $DistributeGroup Temporary matches 1 run function #asset:spawner/register/b
execute if data storage global {IsProduction:1b} if score $DistributeGroup Temporary matches 2 run function #asset:spawner/register/c
execute if data storage global {IsProduction:1b} if score $DistributeGroup Temporary matches 3 run function #asset:spawner/register/d
execute if data storage global {IsProduction:1b} if score $DistributeGroup Temporary matches 4 run function #asset:spawner/register/e
execute if data storage global {IsProduction:1b} if score $DistributeGroup Temporary matches 5 run function #asset:spawner/register/f
execute if data storage global {IsProduction:1b} if score $DistributeGroup Global matches 0 run function #asset:spawner/register/a
execute if data storage global {IsProduction:1b} if score $DistributeGroup Global matches 1 run function #asset:spawner/register/b
execute if data storage global {IsProduction:1b} if score $DistributeGroup Global matches 2 run function #asset:spawner/register/c
execute if data storage global {IsProduction:1b} if score $DistributeGroup Global matches 3 run function #asset:spawner/register/d
execute if data storage global {IsProduction:1b} if score $DistributeGroup Global matches 4 run function #asset:spawner/register/e
execute if data storage global {IsProduction:1b} if score $DistributeGroup Global matches 5 run function #asset:spawner/register/f
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@


# 次のtickのグループを決める
scoreboard players add $DistributeGroup Temporary 1
scoreboard players operation $DistributeGroup Temporary %= $6 Const
scoreboard players add $DistributeGroup Global 1
scoreboard players operation $DistributeGroup Global %= $6 Const
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
execute store result score $Index Temporary if data storage lib: Array[]
function lib:array/core/move
data modify storage lib: Array set from storage lib: Cache
data remove storage lib: Cache
data remove storage lib: Cache
scoreboard players reset $Index Temporary
5 changes: 4 additions & 1 deletion TheSkyBlessing/data/lib/functions/array/move.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,7 @@
scoreboard players remove $Index Temporary 1
scoreboard players operation $Index Temporary -= $Argument.Index Lib
# 再帰的に動かす
execute if score $Index Temporary matches 1.. run function lib:array/core/move
execute if score $Index Temporary matches 1.. run function lib:array/core/move

# リセット
scoreboard players reset $Index Temporary
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
# 再帰的に計算
function lib:bit_array_to_integer/core/recursive
# リセット
function lib:array/session/close
function lib:array/session/close
scoreboard players reset $bit Temporary
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@
# クールダウンリセット
scoreboard players set @s MPRegenCooldown 0
# リセット
scoreboard players reset $AmountFloat Temporary
scoreboard players reset $AmountFloat Temporary
scoreboard players reset $isNegative Temporary

0 comments on commit 66ee2a6

Please sign in to comment.