feat(outline): outline targets when using item and pressing shift key

This commit is contained in:
2025-09-06 00:14:17 +02:00
parent 7a113bf151
commit 8fed526fd2
2 changed files with 12 additions and 7 deletions

View File

@@ -36,6 +36,12 @@ func _process(_delta: float):
func _input(event): func _input(event):
if event.is_action_pressed("ui_show_hints") and escoria.current_state == escoria.GAME_STATE.DEFAULT: if event.is_action_pressed("ui_show_hints") and escoria.current_state == escoria.GAME_STATE.DEFAULT:
highlight(true) if escoria.action_manager.action_state == escoria.action_manager.ACTION_INPUT_STATE.AWAITING_TARGET_ITEM:
var item = get_parent()
var current_tool_id = escoria.action_manager.current_tool.global_id
if item.action3_target_texts.get(current_tool_id) or item.action4_target_texts.get(current_tool_id):
highlight(true)
else:
highlight(true)
elif (event.is_action_released("ui_show_hints")): elif (event.is_action_released("ui_show_hints")):
highlight(false) highlight(false)

View File

@@ -10,11 +10,6 @@ size = Vector2(45, 25)
[node name="turno_cocina_patata" type="Area2D"] [node name="turno_cocina_patata" type="Area2D"]
process_mode = 1 process_mode = 1
script = ExtResource("1") script = ExtResource("1")
global_id = "turno_cocina_patata"
esc_script = "res://gymkhana/items/inventory/turno_cocina_patata.esc"
inventory_texture = ExtResource("2")
dialog_color = Color(1, 1, 1, 1)
combine_when_selected_action_is_in = ["action4"]
action3_target_texts = { action3_target_texts = {
"turno_cocina_cuchillo": "tooltip_turno_cocina_patata_action3_turno_cocina_cuchillo" "turno_cocina_cuchillo": "tooltip_turno_cocina_patata_action3_turno_cocina_cuchillo"
} }
@@ -22,7 +17,11 @@ action4_target_texts = {
"turno_cocina_cuchillo": "tooltip_turno_cocina_patata_action4_turno_cocina_cuchillo" "turno_cocina_cuchillo": "tooltip_turno_cocina_patata_action4_turno_cocina_cuchillo"
} }
target_when_selected_action_is_in = ["action3", "action4"] target_when_selected_action_is_in = ["action3", "action4"]
animations = null global_id = "turno_cocina_patata"
esc_script = "res://gymkhana/items/inventory/turno_cocina_patata.esc"
combine_when_selected_action_is_in = PackedStringArray("action4")
inventory_texture = ExtResource("2")
inventory_texture_hovered = ExtResource("2")
custom_data = { custom_data = {
"count_textures": [{ "count_textures": [{
"start": 1, "start": 1,