From 91faea0a6eb7cb246b67d14bfc85074442b43903 Mon Sep 17 00:00:00 2001 From: Eneko Nieto Date: Fri, 10 Feb 2023 20:08:10 +0100 Subject: [PATCH] CHANGE TO escoria-core. Added ESCItem.tooltip2_name --- addons/escoria-core/game/core-scripts/esc_item.gd | 7 ++----- gymkhana/addons/escoria-ui-return-monkey-island/game.gd | 3 +-- gymkhana/rooms/home/room01.tscn | 5 ++--- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/addons/escoria-core/game/core-scripts/esc_item.gd b/addons/escoria-core/game/core-scripts/esc_item.gd index 8ba313c5..15f37f7c 100644 --- a/addons/escoria-core/game/core-scripts/esc_item.gd +++ b/addons/escoria-core/game/core-scripts/esc_item.gd @@ -98,14 +98,11 @@ export(bool) var player_orients_on_arrival = true # item export(int) var interaction_direction -# The name for the tooltip of this item +# The text for the tooltip of action1 export(String) var tooltip_name -# The text for the tooltip of action1 -export(String) var action1 - # The text for the tooltip of action2 -export(String) var action2 +export(String) var tooltip2_name # Default action to use if object is not in the inventory export(String) var default_action diff --git a/gymkhana/addons/escoria-ui-return-monkey-island/game.gd b/gymkhana/addons/escoria-ui-return-monkey-island/game.gd index 2846c004..74dc7c7b 100644 --- a/gymkhana/addons/escoria-ui-return-monkey-island/game.gd +++ b/gymkhana/addons/escoria-ui-return-monkey-island/game.gd @@ -221,8 +221,7 @@ func element_focused(element_id: String) -> void: ) var target_obj = escoria.object_manager.get_object(element_id).node - $tooltip_layer/tooltip.set_target(target_obj.action1 + " " + target_obj.action2) - # $tooltip_layer/tooltip.set_target(target_obj.tooltip_name) + $tooltip_layer/tooltip.set_target(target_obj.tooltip_name + " " + target_obj.tooltip2_name) if escoria.action_manager.current_action != VERB_USE \ and escoria.action_manager.current_tool == null \ diff --git a/gymkhana/rooms/home/room01.tscn b/gymkhana/rooms/home/room01.tscn index 48c9ce6d..077d1298 100644 --- a/gymkhana/rooms/home/room01.tscn +++ b/gymkhana/rooms/home/room01.tscn @@ -106,9 +106,8 @@ pause_mode = 1 script = ExtResource( 5 ) global_id = "r1_wall_item1" esc_script = "res://gymkhana/rooms/home/esc/wall_item.esc" -tooltip_name = "Artwork" -action1 = "This is action1" -action2 = "This is action2" +tooltip_name = "This is action1" +tooltip2_name = "This is action2" default_action = "action2" combine_when_selected_action_is_in = [ ] inventory_texture = ExtResource( 10 )