From bbe4b2c92fcd1fdd2a995507be89117c638d5b0f Mon Sep 17 00:00:00 2001 From: Eneko Nieto Date: Wed, 15 Feb 2023 23:16:29 +0100 Subject: [PATCH] Moved I_Bombona to gymkhana/items/inventory --- game/rooms/room09/room09.tscn | 5 +++ .../inventory/inventory_ui.tscn | 5 +-- gymkhana/items/inventory/I_Bombona.tscn | 38 +++++++++++++++++++ .../rooms/trasera_cocina/esc/i_bombona.esc | 4 +- .../rooms/trasera_cocina/trasera_cocina.tscn | 34 +---------------- project.godot | 4 +- 6 files changed, 51 insertions(+), 39 deletions(-) create mode 100644 gymkhana/items/inventory/I_Bombona.tscn diff --git a/game/rooms/room09/room09.tscn b/game/rooms/room09/room09.tscn index c1303daa..eb918be7 100644 --- a/game/rooms/room09/room09.tscn +++ b/game/rooms/room09/room09.tscn @@ -467,6 +467,7 @@ esc_script = "res://game/rooms/room09/esc/stand.esc" interaction_direction = 2 tooltip_name = "Stand" default_action = "look" +combine_when_selected_action_is_in = [ ] inventory_texture = ExtResource( 10 ) dialog_color = Color( 1, 1, 1, 1 ) animations = null @@ -533,6 +534,7 @@ global_id = "r9_reset_button" esc_script = "res://game/rooms/room09/esc/button_reset.esc" tooltip_name = "reset button" default_action = "use" +combine_when_selected_action_is_in = [ ] inventory_texture = ExtResource( 5 ) dialog_color = Color( 1, 1, 1, 1 ) animations = null @@ -565,6 +567,7 @@ global_id = "r9_closet_left" esc_script = "res://game/rooms/room09/esc/closet_left.esc" tooltip_name = "closet" default_action = "open" +combine_when_selected_action_is_in = [ ] inventory_texture = ExtResource( 14 ) dialog_color = Color( 1, 1, 1, 1 ) animations = null @@ -606,6 +609,7 @@ global_id = "r9_closet_middle" esc_script = "res://game/rooms/room09/esc/closet_middle.esc" tooltip_name = "closet" default_action = "open" +combine_when_selected_action_is_in = [ ] inventory_texture = ExtResource( 14 ) dialog_color = Color( 1, 1, 1, 1 ) animations = null @@ -648,6 +652,7 @@ global_id = "r9_closet_right" esc_script = "res://game/rooms/room09/esc/closet_right.esc" tooltip_name = "closet" default_action = "open" +combine_when_selected_action_is_in = [ ] inventory_texture = ExtResource( 14 ) dialog_color = Color( 1, 1, 1, 1 ) animations = null diff --git a/gymkhana/addons/escoria-ui-return-monkey-island/inventory/inventory_ui.tscn b/gymkhana/addons/escoria-ui-return-monkey-island/inventory/inventory_ui.tscn index d2c28d72..bd3acf99 100644 --- a/gymkhana/addons/escoria-ui-return-monkey-island/inventory/inventory_ui.tscn +++ b/gymkhana/addons/escoria-ui-return-monkey-island/inventory/inventory_ui.tscn @@ -30,7 +30,7 @@ __meta__ = { [node name="inventory_button" type="TextureButton" parent="HBoxContainer"] margin_right = 1280.0 -margin_bottom = 900.0 +margin_bottom = 796.0 size_flags_horizontal = 3 size_flags_vertical = 3 texture_normal = ExtResource( 6 ) @@ -78,9 +78,6 @@ custom_constants/margin_right = 20 custom_constants/margin_top = 20 custom_constants/margin_left = 20 custom_constants/margin_bottom = 20 -__meta__ = { -"_edit_use_anchors_": false -} [node name="ScrollContainer" type="ScrollContainer" parent="FloatingInventory/panel/MarginContainer"] margin_left = 20.0 diff --git a/gymkhana/items/inventory/I_Bombona.tscn b/gymkhana/items/inventory/I_Bombona.tscn new file mode 100644 index 00000000..7ec7c9b2 --- /dev/null +++ b/gymkhana/items/inventory/I_Bombona.tscn @@ -0,0 +1,38 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_location.gd" type="Script" id=3] +[ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/item.gd" type="Script" id=27] +[ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/tooltip-reworked/tooltip-action2.tscn" type="PackedScene" id=28] +[ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/tooltip-reworked/tooltip-action1.tscn" type="PackedScene" id=29] + +[node name="I_Bombona" type="Area2D"] +pause_mode = 1 +position = Vector2( 557, 408 ) +script = ExtResource( 27 ) +global_id = "i_bombona" +esc_script = "res://gymkhana/rooms/trasera_cocina/esc/i_bombona.esc" +tooltip_name = "TT Mirar bombona" +tooltip2_name = "TT2 Coger bombona" +combine_when_selected_action_is_in = [ ] +dialog_color = Color( 1, 1, 1, 1 ) +action1_text = "Mirar bombona" +action2_text = "Coger bombona" +animations = null + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="I_Bombona"] +polygon = PoolVector2Array( -13, -19, -14, -3, -15, 30, -4, 34, 10, 32, 20, 29, 22, 16, 22, -6, 21, -19, 12, -28, 1, -28 ) + +[node name="action1" parent="I_Bombona" instance=ExtResource( 29 )] +position = Vector2( -53, -48 ) + +[node name="action2" parent="I_Bombona" instance=ExtResource( 28 )] +position = Vector2( -13, 51 ) + +[node name="ESCLocation" type="Position2D" parent="I_Bombona"] +position = Vector2( -65, 57 ) +script = ExtResource( 3 ) + +[connection signal="mouse_entered" from="I_Bombona" to="I_Bombona/action1" method="_on_ESCItemWithTooltip_mouse_entered"] +[connection signal="mouse_entered" from="I_Bombona" to="I_Bombona/action2" method="_on_ESCItemWithTooltip_mouse_entered"] +[connection signal="mouse_exited" from="I_Bombona" to="I_Bombona/action1" method="_on_ESCItemWithTooltip_mouse_exited"] +[connection signal="mouse_exited" from="I_Bombona" to="I_Bombona/action2" method="_on_ESCItemWithTooltip_mouse_exited"] diff --git a/gymkhana/rooms/trasera_cocina/esc/i_bombona.esc b/gymkhana/rooms/trasera_cocina/esc/i_bombona.esc index a25e870a..78f57d90 100644 --- a/gymkhana/rooms/trasera_cocina/esc/i_bombona.esc +++ b/gymkhana/rooms/trasera_cocina/esc/i_bombona.esc @@ -2,4 +2,6 @@ say player "Es naranja" :action2 -say player "Pesa demasiado!" \ No newline at end of file +say player "Voy a cogerla" +inventory_add I_Bombona +set_active I_Bombona false diff --git a/gymkhana/rooms/trasera_cocina/trasera_cocina.tscn b/gymkhana/rooms/trasera_cocina/trasera_cocina.tscn index f6ee8485..f4b6d85e 100644 --- a/gymkhana/rooms/trasera_cocina/trasera_cocina.tscn +++ b/gymkhana/rooms/trasera_cocina/trasera_cocina.tscn @@ -26,9 +26,7 @@ [ext_resource path="res://gymkhana/rooms/trasera_cocina/assets/eneko-anim/unscreen-008.png" type="Texture" id=24] [ext_resource path="res://gymkhana/rooms/trasera_cocina/assets/columna.png" type="Texture" id=25] [ext_resource path="res://gymkhana/rooms/trasera_cocina/assets/background trasera cocina-pix-height.png" type="Texture" id=26] -[ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/item.gd" type="Script" id=27] -[ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/tooltip-reworked/tooltip-action2.tscn" type="PackedScene" id=28] -[ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/tooltip-reworked/tooltip-action1.tscn" type="PackedScene" id=29] +[ext_resource path="res://gymkhana/items/inventory/I_Bombona.tscn" type="PackedScene" id=27] [sub_resource type="SpriteFrames" id=2] animations = [ { @@ -143,36 +141,8 @@ offset = Vector2( -0.09375, 20.0582 ) margin_right = 40.0 margin_bottom = 40.0 -[node name="I_Bombona" type="Area2D" parent="."] -pause_mode = 1 -position = Vector2( 557, 408 ) -script = ExtResource( 27 ) -global_id = "i_bombona" -esc_script = "res://gymkhana/rooms/trasera_cocina/esc/i_bombona.esc" -default_action = "action1" -combine_when_selected_action_is_in = [ ] -dialog_color = Color( 1, 1, 1, 1 ) -action1_text = "Mirar bombona" -action2_text = "Coger bombona" -animations = null - -[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="I_Bombona"] -polygon = PoolVector2Array( -13, -19, -14, -3, -15, 30, -4, 34, 10, 32, 20, 29, 22, 16, 22, -6, 21, -19, 12, -28, 1, -28 ) - -[node name="action1" parent="I_Bombona" instance=ExtResource( 29 )] -position = Vector2( -53, -48 ) - -[node name="action2" parent="I_Bombona" instance=ExtResource( 28 )] -position = Vector2( -13, 51 ) - -[node name="ESCLocation" type="Position2D" parent="I_Bombona"] -position = Vector2( -65, 57 ) -script = ExtResource( 3 ) +[node name="bombona" parent="Hotspots" instance=ExtResource( 27 )] [connection signal="mouse_entered" from="TextureRect" to="Area2D/CollisionPolygon2D" method="_on_TextureRect_mouse_entered"] [connection signal="mouse_entered" from="Area2D" to="Area2D/CollisionPolygon2D" method="_on_Area2D_mouse_entered"] [connection signal="mouse_exited" from="Area2D" to="Area2D/CollisionPolygon2D" method="_on_Area2D_mouse_exited"] -[connection signal="mouse_entered" from="I_Bombona" to="I_Bombona/action1" method="_on_ESCItemWithTooltip_mouse_entered"] -[connection signal="mouse_entered" from="I_Bombona" to="I_Bombona/action2" method="_on_ESCItemWithTooltip_mouse_entered"] -[connection signal="mouse_exited" from="I_Bombona" to="I_Bombona/action1" method="_on_ESCItemWithTooltip_mouse_exited"] -[connection signal="mouse_exited" from="I_Bombona" to="I_Bombona/action2" method="_on_ESCItemWithTooltip_mouse_exited"] diff --git a/project.godot b/project.godot index 2a7195ed..55d3d263 100644 --- a/project.godot +++ b/project.godot @@ -876,7 +876,7 @@ main/game_migration_path="" debug/terminate_on_warnings=false debug/terminate_on_errors=true debug/development_lang="en" -debug/log_level="WARNING" +debug/log_level="INFO" debug/log_file_path="user://" debug/crash_message="We're sorry, but the game crashed. Please send us the following files: @@ -884,7 +884,7 @@ debug/crash_message="We're sorry, but the game crashed. Please send us the follo debug/enable_room_selector=true debug/room_selector_room_dir="res://gymkhana/rooms" ui/game_scene="res://gymkhana/addons/escoria-ui-return-monkey-island/game.tscn" -ui/inventory_items_path="res://game/items/inventory" +ui/inventory_items_path="res://gymkhana/items/inventory" ui/default_transition="instant" ui/transition_paths=[ "res://addons/escoria-core/game/scenes/transitions/shaders/" ] ui/inventory_item_size=Vector2( 72, 72 )