fix(rtmi-ui): do not outline non interactive items when pushing shift
This commit is contained in:
@@ -14,3 +14,6 @@ func register(custom_data: Dictionary) -> void:
|
|||||||
|
|
||||||
func get_global_id() -> String:
|
func get_global_id() -> String:
|
||||||
return self.get_parent().global_id
|
return self.get_parent().global_id
|
||||||
|
|
||||||
|
func get_object() -> ESCObject:
|
||||||
|
return escoria.object_manager.get_object(get_global_id())
|
||||||
|
|||||||
@@ -28,14 +28,14 @@ func _process(delta: float) -> void:
|
|||||||
_apply_value(output_value)
|
_apply_value(output_value)
|
||||||
|
|
||||||
func _apply_value(output_value):
|
func _apply_value(output_value):
|
||||||
if escoria.object_manager.get_object(get_global_id()) == null:
|
if get_object() == null:
|
||||||
return
|
return
|
||||||
|
|
||||||
if targeted_property == TargetProperty.active:
|
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:
|
elif targeted_property == TargetProperty.visible:
|
||||||
get_parent().visible = output_value
|
get_parent().visible = output_value
|
||||||
|
|
||||||
elif targeted_property == TargetProperty.interactive:
|
elif targeted_property == TargetProperty.interactive:
|
||||||
escoria.object_manager.get_object(get_global_id()).interactive = output_value
|
get_object().interactive = output_value
|
||||||
|
|||||||
@@ -32,6 +32,9 @@ func _input(event) -> void:
|
|||||||
if escoria.current_state != escoria.GAME_STATE.DEFAULT:
|
if escoria.current_state != escoria.GAME_STATE.DEFAULT:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if not get_object().interactive:
|
||||||
|
return
|
||||||
|
|
||||||
# No tool selected
|
# No tool selected
|
||||||
if escoria.action_manager.action_state == escoria.action_manager.ACTION_INPUT_STATE.AWAITING_VERB_OR_ITEM:
|
if escoria.action_manager.action_state == escoria.action_manager.ACTION_INPUT_STATE.AWAITING_VERB_OR_ITEM:
|
||||||
if event.pressed:
|
if event.pressed:
|
||||||
@@ -43,8 +46,6 @@ func _input(event) -> void:
|
|||||||
# Only with tool selected
|
# Only with tool selected
|
||||||
if escoria.action_manager.action_state != escoria.action_manager.ACTION_INPUT_STATE.AWAITING_TARGET_ITEM:
|
if escoria.action_manager.action_state != escoria.action_manager.ACTION_INPUT_STATE.AWAITING_TARGET_ITEM:
|
||||||
return
|
return
|
||||||
|
|
||||||
var id = get_global_id()
|
|
||||||
|
|
||||||
if not gymkhana.has_combination_with_current_tool(get_global_id()):
|
if not gymkhana.has_combination_with_current_tool(get_global_id()):
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ func _process(delta: float) -> void:
|
|||||||
if is_picked == null:
|
if is_picked == null:
|
||||||
return
|
return
|
||||||
|
|
||||||
var esc_object = escoria.object_manager.get_object(get_global_id())
|
var esc_object = get_object()
|
||||||
|
|
||||||
if esc_object == null:
|
if esc_object == null:
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user