Skip to content

Commit

Permalink
🧑‍💻 その他のフラグ処理を追加
Browse files Browse the repository at this point in the history
  • Loading branch information
haiiro2gou committed Nov 17, 2024
1 parent 9f5167d commit d68c492
Show file tree
Hide file tree
Showing 17 changed files with 206 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

#> Trigger検知用
# @within function
# asset_manager:artifact/triggers/**
# asset_manager:artifact/triggers/
# asset_manager:artifact/triggers/*/
# core:handler/**
#declare tag TriggerFlag.ClickCarrot
#declare tag TriggerFlag.UseItem
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#> asset_manager:artifact/triggers/click/
#
#
#
# @within function asset_manager:artifact/triggers/trigger/foreach/call.m

# フラグが存在しているか確認する
execute if entity @s[tag=!TriggerFlag.ClickCarrot] run return fail
# 使用条件を満たしているか確認する
function asset_manager:artifact/check/
function asset_manager:artifact/triggers/click/check.m with storage asset:context
# 条件を満たしていれば使用する
execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/click/use

# リセット
tag @s remove CanUsed
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset_manager:artifact/triggers/click/check.m
#
#
#
# @input args id : int
# @within function asset_manager:artifact/triggers/click/

$function asset:artifact/alias/$(id)/click/check
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset_manager:artifact/triggers/click/click.m
#
#
#
# @input args id : int
# @within function asset_manager:artifact/triggers/click/use

$function asset:artifact/alias/$(id)/click/
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#> asset_manager:artifact/triggers/click/use
#
#
#
# @within function asset_manager:artifact/triggers/click/

# 共通処理
# アイテムを破壊するとBrokeItemが追加される
function asset_manager:artifact/use/

# 処理対象の神器の重複数を取得する
execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[]

# 神器を呼び出し
function asset_manager:artifact/triggers/click/click.m with storage asset:context

# リセット
data remove storage asset:context BrokeItem
data remove storage asset:context Count
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#> asset_manager:artifact/triggers/keep_click/
#
#
#
# @within function asset_manager:artifact/triggers/trigger/foreach/call.m

# フラグが存在しているか確認する
execute if entity @s[tag=!TriggerFlag.UsingItem] run return fail
# 使用条件を満たしているか確認する
function asset_manager:artifact/check/
function asset_manager:artifact/triggers/keep_click/check.m with storage asset:context
# 条件を満たしていれば使用する
execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/keep_click/use

# リセット
tag @s remove CanUsed
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset_manager:artifact/triggers/keep_click/check.m
#
#
#
# @input args id : int
# @within function asset_manager:artifact/triggers/keep_click/

$function asset:artifact/alias/$(id)/keep_click/check
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset_manager:artifact/triggers/keep_click/keep_click.m
#
#
#
# @input args id : int
# @within function asset_manager:artifact/triggers/keep_click/use

$function asset:artifact/alias/$(id)/keep_click/
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#> asset_manager:artifact/triggers/keep_click/use
#
#
#
# @within function asset_manager:artifact/triggers/keep_click/

# 共通処理
# アイテムを破壊するとBrokeItemが追加される
function asset_manager:artifact/use/

# 処理対象の神器の重複数を取得する
execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[]

# 神器を呼び出し
function asset_manager:artifact/triggers/keep_click/keep_click.m with storage asset:context

# リセット
data remove storage asset:context BrokeItem
data remove storage asset:context Count
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#> asset_manager:artifact/triggers/tick/
#
#
#
# @within function asset_manager:artifact/triggers/trigger/foreach/call.m

# フラグが存在しているか確認する
# return fail
# 使用条件を満たしているか確認する
function asset_manager:artifact/check/
function asset_manager:artifact/triggers/tick/check.m with storage asset:context
# 条件を満たしていれば使用する
execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/tick/use

# リセット
tag @s remove CanUsed
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset_manager:artifact/triggers/tick/check.m
#
#
#
# @input args id : int
# @within function asset_manager:artifact/triggers/tick/

$function asset:artifact/alias/$(id)/tick/check
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset_manager:artifact/triggers/tick/tick.m
#
#
#
# @input args id : int
# @within function asset_manager:artifact/triggers/tick/use

$function asset:artifact/alias/$(id)/tick/
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#> asset_manager:artifact/triggers/tick/use
#
#
#
# @within function asset_manager:artifact/triggers/tick/

# 共通処理
# アイテムを破壊するとBrokeItemが追加される
function asset_manager:artifact/use/

# 処理対象の神器の重複数を取得する
execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[]

# 神器を呼び出し
function asset_manager:artifact/triggers/tick/tick.m with storage asset:context

# リセット
data remove storage asset:context BrokeItem
data remove storage asset:context Count
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#> asset_manager:artifact/triggers/use_item/
#
#
#
# @within function asset_manager:artifact/triggers/trigger/foreach/call.m

# フラグが存在しているか確認する
execute if entity @s[tag=!TriggerFlag.UseItem] run return fail
# 使用条件を満たしているか確認する
function asset_manager:artifact/check/
function asset_manager:artifact/triggers/use_item/check.m with storage asset:context
# 条件を満たしていれば使用する
execute if entity @s[tag=CanUsed] run function asset_manager:artifact/triggers/use_item/use

# リセット
tag @s remove CanUsed
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset_manager:artifact/triggers/use_item/check.m
#
#
#
# @input args id : int
# @within function asset_manager:artifact/triggers/use_item/

$function asset:artifact/alias/$(id)/use_item/check
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#> asset_manager:artifact/triggers/use_item/use
#
#
#
# @within function asset_manager:artifact/triggers/use_item/

# 共通処理
# アイテムを破壊するとBrokeItemが追加される
function asset_manager:artifact/use/

# 処理対象の神器の重複数を取得する
execute store result storage asset:context Count int 1 if data storage asset:artifact TargetItemList[]

# 神器を呼び出し
function asset_manager:artifact/triggers/use_item/use_item.m with storage asset:context

# リセット
data remove storage asset:context BrokeItem
data remove storage asset:context Count
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#> asset_manager:artifact/triggers/use_item/use_item.m
#
#
#
# @input args id : int
# @within function asset_manager:artifact/triggers/use_item/use

$function asset:artifact/alias/$(id)/use_item/

0 comments on commit d68c492

Please sign in to comment.