feat: unify authored activity commands
This commit is contained in:
@@ -17,16 +17,19 @@ var _registry: WorldTargetRegistry
|
||||
var _catalog: ContentCatalog
|
||||
var _availability_evaluator: Callable
|
||||
var _last_query_reason_trace: Array[StringName] = []
|
||||
var _require_target_provider := false
|
||||
|
||||
|
||||
func _init(
|
||||
registry: WorldTargetRegistry = null,
|
||||
catalog: ContentCatalog = null,
|
||||
availability_evaluator: Callable = Callable()
|
||||
availability_evaluator: Callable = Callable(),
|
||||
require_target_provider: bool = false
|
||||
) -> void:
|
||||
_registry = registry
|
||||
_catalog = catalog
|
||||
_availability_evaluator = availability_evaluator
|
||||
_require_target_provider = require_target_provider
|
||||
|
||||
|
||||
func is_configured() -> bool:
|
||||
@@ -49,7 +52,7 @@ func get_offers(actor: WorldEntityRef, target: WorldTargetHandle) -> Array[Actio
|
||||
if not _actor_is_supported(actor):
|
||||
_last_query_reason_trace.append(REASON_ACTOR_INVALID)
|
||||
return []
|
||||
if not _registry.is_handle_valid(target):
|
||||
if not _registry.is_handle_valid(target, _require_target_provider):
|
||||
_last_query_reason_trace.append(REASON_TARGET_STALE)
|
||||
return []
|
||||
var descriptor := _registry.resolve_handle(target)
|
||||
|
||||
Reference in New Issue
Block a user