Merge remote-tracking branch 'origin/demo'

This commit is contained in:
cakipaul 2025-07-31 04:16:39 +08:00
commit 377792c376

View File

@ -664,14 +664,16 @@ func remove_prop_container() -> void:
props_bag.remove_child(container)
container.queue_free()
var invalid_sfx = preload("uid://dph8v3v5mq1xl")
func on_toggle_invalid_prop():
func on_toggle_invalid_prop(play_sfx := true):
if not inventory or not inventory.current_item_key():
return
if GlobalConfig.DEBUG:
print("使用无效道具. invalid_prop shake. current prop:", inventory.current_item_key())
if play_sfx:
invalid_sfx.play()
if shake_tween and shake_tween.is_running():
shake_tween.kill()