Save The Tree implementation and acceptance work in progress
Preserve production code, regression fixtures, audio assets and provenance, test infrastructure, and the original-completion plan and progress ledger. Final game and Windows acceptance remain pending; excluded local artifacts and native experiments are not part of this snapshot.
This commit is contained in:
@@ -11,6 +11,7 @@ const LABELS := {
|
||||
&"important_rank_5":"重要クエスト", &"main_chapter_complete":"本編の章目標",
|
||||
}
|
||||
var _runtime: Variant
|
||||
var _audio_submitter := Callable()
|
||||
var _target := -1
|
||||
var _pending_id := 0
|
||||
var _queue_id := 0
|
||||
@@ -62,7 +63,7 @@ func refresh() -> void:
|
||||
get_ok_button().disabled=rank>=ProgressionService.MAX_RANK or not evaluation.get(&"eligible",false) or _pending_id!=0
|
||||
func _promote() -> void:
|
||||
if _pending_id!=0 or _target<2:return
|
||||
var result: CommandResult=_runtime.submit_command(&"set_world_tree_rank",{&"rank":_target,&"request_id":StringName("ui_rank_%d" % _target)})
|
||||
var result: CommandResult=_submit_ui_command(&"set_world_tree_rank",{&"rank":_target,&"request_id":StringName("ui_rank_%d" % _target)})
|
||||
for command: Dictionary in _runtime.command_queue.create_snapshot().get("pending",[]):
|
||||
if result.is_success() and int(command["command_id"])==result.command_id:
|
||||
_pending_id=result.command_id
|
||||
@@ -121,3 +122,17 @@ func apply_layer_skin(layer: int) -> void:
|
||||
LayerSkin.register_text(get_label(), layer)
|
||||
for button: Button in [get_ok_button(), get_cancel_button()]:
|
||||
LayerSkin.register_toggle_text(button, layer)
|
||||
|
||||
|
||||
func configure_audio(submitter: Callable) -> void:
|
||||
_audio_submitter = submitter
|
||||
|
||||
|
||||
func _submit_ui_command(
|
||||
command_type: StringName, payload: Dictionary = {}, actor_id: StringName = &"player",
|
||||
target_id: StringName = &"", priority := 0, execute_at := -1,
|
||||
idempotency_key: StringName = &""
|
||||
) -> Variant:
|
||||
if _audio_submitter.is_valid():
|
||||
return _audio_submitter.call(command_type, payload, actor_id, target_id, priority, execute_at, idempotency_key)
|
||||
return _runtime.call(&"submit_command", command_type, payload, actor_id, target_id, priority, execute_at, idempotency_key)
|
||||
|
||||
Reference in New Issue
Block a user