fix(rtmi-ui): do not outline non interactive items when pushing shift

This commit is contained in:
2025-10-26 13:22:01 +01:00
parent 57db233d4e
commit debf48ad15
4 changed files with 10 additions and 6 deletions

View File

@@ -14,3 +14,6 @@ func register(custom_data: Dictionary) -> void:
func get_global_id() -> String:
return self.get_parent().global_id
func get_object() -> ESCObject:
return escoria.object_manager.get_object(get_global_id())

View File

@@ -28,14 +28,14 @@ func _process(delta: float) -> void:
_apply_value(output_value)
func _apply_value(output_value):
if escoria.object_manager.get_object(get_global_id()) == null:
if get_object() == null:
return
if targeted_property == TargetProperty.active:
escoria.object_manager.get_object(get_global_id()).active = output_value
get_object().active = output_value
elif targeted_property == TargetProperty.visible:
get_parent().visible = output_value
elif targeted_property == TargetProperty.interactive:
escoria.object_manager.get_object(get_global_id()).interactive = output_value
get_object().interactive = output_value

View File

@@ -32,6 +32,9 @@ func _input(event) -> void:
if escoria.current_state != escoria.GAME_STATE.DEFAULT:
return
if not get_object().interactive:
return
# No tool selected
if escoria.action_manager.action_state == escoria.action_manager.ACTION_INPUT_STATE.AWAITING_VERB_OR_ITEM:
if event.pressed:
@@ -43,8 +46,6 @@ func _input(event) -> void:
# Only with tool selected
if escoria.action_manager.action_state != escoria.action_manager.ACTION_INPUT_STATE.AWAITING_TARGET_ITEM:
return
var id = get_global_id()
if not gymkhana.has_combination_with_current_tool(get_global_id()):
return

View File

@@ -13,7 +13,7 @@ func _process(delta: float) -> void:
if is_picked == null:
return
var esc_object = escoria.object_manager.get_object(get_global_id())
var esc_object = get_object()
if esc_object == null:
return