diff --git a/gymkhana/items/inventory/turno_cocina_bol_inventario.esc b/gymkhana/items/inventory/turno_cocina_bol_inventario.esc new file mode 100644 index 00000000..db47f32c --- /dev/null +++ b/gymkhana/items/inventory/turno_cocina_bol_inventario.esc @@ -0,0 +1,6 @@ +:action1 +say player "Que cosa tan curiosa" + +:action2 +say player "No lo quiero coger" + diff --git a/gymkhana/items/inventory/turno_cocina_bol_inventario.tscn b/gymkhana/items/inventory/turno_cocina_bol_inventario.tscn new file mode 100644 index 00000000..ff35e0d9 --- /dev/null +++ b/gymkhana/items/inventory/turno_cocina_bol_inventario.tscn @@ -0,0 +1,34 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/esc_item_with_tooltip.gd" type="Script" id=1] +[ext_resource path="res://gymkhana/items/inventory/assets/turno_cocina_bol_inventario.png" type="Texture" id=2] +[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_location.gd" type="Script" id=3] + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 22.5, 12.5 ) + +[node name="turno_cocina_bol_inventario" type="Area2D"] +pause_mode = 1 +script = ExtResource( 1 ) +global_id = "turno_cocina_bol_inventario" +esc_script = "res://gymkhana/items/inventory/turno_cocina_bol_inventario.esc" +inventory_texture = ExtResource( 2 ) +dialog_color = Color( 1, 1, 1, 1 ) +action1_text = "¿Que es esto?" +action2_text = "Coger" +action3_text = "Mirar" +action4_text = "Usar" +animations = null + +[node name="Sprite" type="Sprite" parent="."] +position = Vector2( -2, 0 ) +scale = Vector2( 0.5, 0.5 ) +texture = ExtResource( 2 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +position = Vector2( -1.5, -0.5 ) +shape = SubResource( 1 ) + +[node name="ESCLocation" type="Position2D" parent="."] +position = Vector2( -51, 69 ) +script = ExtResource( 3 ) \ No newline at end of file diff --git a/gymkhana/items/inventory/turno_cocina_patata_grande.esc b/gymkhana/items/inventory/turno_cocina_patata_grande.esc index db47f32c..ed68455d 100644 --- a/gymkhana/items/inventory/turno_cocina_patata_grande.esc +++ b/gymkhana/items/inventory/turno_cocina_patata_grande.esc @@ -1,6 +1,13 @@ :action1 -say player "Que cosa tan curiosa" +say player "Hay una patata!" :action2 -say player "No lo quiero coger" +say current_player "Bieeen!!! una patata!" +set_active turno_cocina_patata_grande false +inventory_add turno_cocina_patata_grande +:action3 +say current_player "Es bien grande" + +:action4 +say current_player "Así no me sirve de nada" \ No newline at end of file diff --git a/gymkhana/items/inventory/turno_cocina_patata_grande.tscn b/gymkhana/items/inventory/turno_cocina_patata_grande.tscn index 59e94229..959846b9 100644 --- a/gymkhana/items/inventory/turno_cocina_patata_grande.tscn +++ b/gymkhana/items/inventory/turno_cocina_patata_grande.tscn @@ -1,17 +1,17 @@ -[gd_scene load_steps=5 format=2] +[gd_scene load_steps=4 format=2] [ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/esc_item_with_tooltip.gd" type="Script" id=1] [ext_resource path="res://gymkhana/items/inventory/assets/turno_cocina_patata_grande.png" type="Texture" id=2] -[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_location.gd" type="Script" id=3] [sub_resource type="RectangleShape2D" id=1] -extents = Vector2( 22.5, 12.5 ) +extents = Vector2( 40.5, 60.5 ) [node name="turno_cocina_patata_grande" type="Area2D"] pause_mode = 1 script = ExtResource( 1 ) global_id = "turno_cocina_patata_grande" esc_script = "res://gymkhana/items/inventory/turno_cocina_patata_grande.esc" +combine_when_selected_action_is_in = [ ] inventory_texture = ExtResource( 2 ) dialog_color = Color( 1, 1, 1, 1 ) action1_text = "¿Que es esto?" @@ -20,15 +20,6 @@ action3_text = "Mirar" action4_text = "Usar" animations = null -[node name="Sprite" type="Sprite" parent="."] -position = Vector2( -2, 0 ) -scale = Vector2( 0.5, 0.5 ) -texture = ExtResource( 2 ) - [node name="CollisionShape2D" type="CollisionShape2D" parent="."] -position = Vector2( -1.5, -0.5 ) +position = Vector2( -2.5, 4 ) shape = SubResource( 1 ) - -[node name="ESCLocation" type="Position2D" parent="."] -position = Vector2( -51, 69 ) -script = ExtResource( 3 ) \ No newline at end of file diff --git a/gymkhana/items/inventory/turno_cocina_peso_bol_inventario.esc b/gymkhana/items/inventory/turno_cocina_peso_bol_inventario.esc new file mode 100644 index 00000000..17c52e64 --- /dev/null +++ b/gymkhana/items/inventory/turno_cocina_peso_bol_inventario.esc @@ -0,0 +1,6 @@ +:action3 +say player "Con esto la clavo con el peso" + +:action4 +say player "Usar" + diff --git a/gymkhana/items/inventory/turno_cocina_peso_bol_inventario.tscn b/gymkhana/items/inventory/turno_cocina_peso_bol_inventario.tscn new file mode 100644 index 00000000..1f0061c4 --- /dev/null +++ b/gymkhana/items/inventory/turno_cocina_peso_bol_inventario.tscn @@ -0,0 +1,36 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/esc_item_with_tooltip.gd" type="Script" id=1] +[ext_resource path="res://gymkhana/items/inventory/assets/turno_cocina_peso_bol_inventario.png" type="Texture" id=2] +[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_location.gd" type="Script" id=3] + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 22.5, 12.5 ) + +[node name="turno_cocina_peso_bol_inventario" type="Area2D"] +pause_mode = 1 +script = ExtResource( 1 ) +global_id = "turno_cocina_peso_bol_inventario" +esc_script = "res://gymkhana/items/inventory/turno_cocina_peso_bol_inventario.esc" +combine_when_selected_action_is_in = [ "action4" ] +target_when_selected_action_is_in = [ "action3" ] +inventory_texture = ExtResource( 2 ) +dialog_color = Color( 1, 1, 1, 1 ) +action1_text = "¿Que es esto?" +action2_text = "Coger" +action3_text = "Mirar" +action4_text = "Usar" +animations = null + +[node name="Sprite" type="Sprite" parent="."] +position = Vector2( -2, 0 ) +scale = Vector2( 0.5, 0.5 ) +texture = ExtResource( 2 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +position = Vector2( -1.5, -0.5 ) +shape = SubResource( 1 ) + +[node name="ESCLocation" type="Position2D" parent="."] +position = Vector2( -51, 69 ) +script = ExtResource( 3 ) diff --git a/gymkhana/items/inventory/turno_cocina_peso_inventario.esc b/gymkhana/items/inventory/turno_cocina_peso_inventario.esc new file mode 100644 index 00000000..db47f32c --- /dev/null +++ b/gymkhana/items/inventory/turno_cocina_peso_inventario.esc @@ -0,0 +1,6 @@ +:action1 +say player "Que cosa tan curiosa" + +:action2 +say player "No lo quiero coger" + diff --git a/gymkhana/items/inventory/turno_cocina_peso_inventario.tscn b/gymkhana/items/inventory/turno_cocina_peso_inventario.tscn new file mode 100644 index 00000000..94714266 --- /dev/null +++ b/gymkhana/items/inventory/turno_cocina_peso_inventario.tscn @@ -0,0 +1,34 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/esc_item_with_tooltip.gd" type="Script" id=1] +[ext_resource path="res://gymkhana/items/inventory/assets/turno_cocina_peso_inventario.png" type="Texture" id=2] +[ext_resource path="res://addons/escoria-core/game/core-scripts/esc_location.gd" type="Script" id=3] + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 22.5, 12.5 ) + +[node name="turno_cocina_peso_inventario" type="Area2D"] +pause_mode = 1 +script = ExtResource( 1 ) +global_id = "turno_cocina_peso_inventario" +esc_script = "res://gymkhana/items/inventory/turno_cocina_peso_inventario.esc" +inventory_texture = ExtResource( 2 ) +dialog_color = Color( 1, 1, 1, 1 ) +action1_text = "¿Que es esto?" +action2_text = "Coger" +action3_text = "Mirar" +action4_text = "Usar" +animations = null + +[node name="Sprite" type="Sprite" parent="."] +position = Vector2( -2, 0 ) +scale = Vector2( 0.5, 0.5 ) +texture = ExtResource( 2 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +position = Vector2( -1.5, -0.5 ) +shape = SubResource( 1 ) + +[node name="ESCLocation" type="Position2D" parent="."] +position = Vector2( -51, 69 ) +script = ExtResource( 3 ) \ No newline at end of file diff --git a/gymkhana/rooms/turno_cocina/despensa/assets/columna.png b/gymkhana/rooms/turno_cocina/despensa/assets/columna.png new file mode 100644 index 00000000..eed7f090 Binary files /dev/null and b/gymkhana/rooms/turno_cocina/despensa/assets/columna.png differ diff --git a/gymkhana/rooms/turno_cocina/despensa/despensa.tscn b/gymkhana/rooms/turno_cocina/despensa/despensa.tscn index ffc5182b..5771fe44 100644 --- a/gymkhana/rooms/turno_cocina/despensa/despensa.tscn +++ b/gymkhana/rooms/turno_cocina/despensa/despensa.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=8 format=2] +[gd_scene load_steps=10 format=2] [ext_resource path="res://addons/escoria-core/game/core-scripts/esc_room.gd" type="Script" id=1] [ext_resource path="res://gymkhana/characters/oier/oier.tscn" type="PackedScene" id=2] @@ -6,36 +6,41 @@ [ext_resource path="res://addons/escoria-core/game/core-scripts/esc_terrain.gd" type="Script" id=4] [ext_resource path="res://addons/escoria-core/game/core-scripts/esc_location.gd" type="Script" id=5] [ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/esc_item_with_tooltip.gd" type="Script" id=6] +[ext_resource path="res://gymkhana/items/inventory/turno_cocina_patata_grande.tscn" type="PackedScene" id=7] +[ext_resource path="res://gymkhana/rooms/turno_cocina/despensa/assets/columna.png" type="Texture" id=8] [sub_resource type="NavigationPolygon" id=60] -vertices = PoolVector2Array( 1137, 615, 1143, 660, 515, 670, 837, 624, 485, 633, 597, 610, 484, 645 ) -polygons = [ PoolIntArray( 0, 1, 2, 3 ), PoolIntArray( 4, 5, 3, 2, 6 ) ] -outlines = [ PoolVector2Array( 484, 645, 485, 633, 597, 610, 837, 624, 1137, 615, 1143, 660, 515, 670 ) ] +vertices = PoolVector2Array( 1137, 615, 1143, 660, 501, 666, 503, 650, 837, 624, 597, 610, 503, 628 ) +polygons = [ PoolIntArray( 0, 1, 2, 3, 4 ), PoolIntArray( 5, 4, 3, 6 ) ] +outlines = [ PoolVector2Array( 503, 650, 503, 628, 597, 610, 837, 624, 1137, 615, 1143, 660, 501, 666 ) ] -[node name="ESCRoom" type="Node2D"] +[node name="ESCRoom2" type="Node2D"] script = ExtResource( 1 ) global_id = "despensa" esc_script = "res://gymkhana/rooms/turno_cocina/despensa/esc/despensa.esc" player_scene = ExtResource( 2 ) -camera_limits = [ Rect2( 0, 0, 2391, 577 ) ] +camera_limits = [ Rect2( 250, 0, 850, 577 ) ] +editor_debug_mode = 1 [node name="background" type="Sprite" parent="."] -position = Vector2( 673, 286.125 ) -scale = Vector2( 0.994367, 0.994367 ) +position = Vector2( 567.561, 290.125 ) +scale = Vector2( 0.994367, 1.00823 ) texture = ExtResource( 3 ) [node name="ESCTerrain" type="Navigation2D" parent="."] +position = Vector2( 137.561, -3 ) script = ExtResource( 4 ) scale_min = 1.0 scale_max = 1.5 player_speed_multiplier = 0.5 [node name="NavigationPolygonInstance" type="NavigationPolygonInstance" parent="ESCTerrain"] -position = Vector2( -46, 114 ) +position = Vector2( -272, 117 ) navpoly = SubResource( 60 ) [node name="puerta_exterior" type="Area2D" parent="."] pause_mode = 1 +position = Vector2( 794.561, 176 ) script = ExtResource( 6 ) global_id = "turno_cocina_despensa_puerta_exterior" esc_script = "res://gymkhana/rooms/turno_cocina/despensa/esc/puerta_exterior.esc" @@ -46,12 +51,16 @@ action1_text = "Salir fuera" animations = null [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="puerta_exterior"] -position = Vector2( 1054, -551 ) +position = Vector2( 129, -721 ) scale = Vector2( 0.963362, 1.99167 ) polygon = PoolVector2Array( -5.19006, 640.474, 5.19019, 273.946, 85.1187, 269.428, 166.085, 311.899, 166.085, 589.367, 84.0806, 639.469 ) +[node name="ESCLocation" type="Position2D" parent="puerta_exterior"] +position = Vector2( 172.439, 568 ) +script = ExtResource( 5 ) + [node name="start" type="Position2D" parent="."] -position = Vector2( 936, 759 ) +position = Vector2( 830.561, 759 ) script = ExtResource( 5 ) global_id = "start" is_start_location = true @@ -59,7 +68,7 @@ player_orients_on_arrival = false [node name="cebolla izq" type="Area2D" parent="."] pause_mode = 1 -position = Vector2( 489, 193 ) +position = Vector2( 383.561, 193 ) script = ExtResource( 6 ) global_id = "turno_cocina_despensa_cebolla_izq" esc_script = "res://gymkhana/rooms/turno_cocina/despensa/esc/cebolla_izq.esc" @@ -70,8 +79,8 @@ action2_text = "Coger cebollas" animations = null [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="cebolla izq"] -position = Vector2( 62.113, -46.1774 ) -scale = Vector2( 0.880435, 0.88735 ) +position = Vector2( 60.6594, -46.582 ) +scale = Vector2( 0.865036, 0.883608 ) polygon = PoolVector2Array( -45, 103, -24, 109, 82, 109, 85, 19, 84, -36, 84, -54, -30, -58, -38, -51, -35, -27, -53, 8 ) [node name="ESCLocation" type="Position2D" parent="cebolla izq"] @@ -80,7 +89,7 @@ script = ExtResource( 5 ) [node name="cebolla der" type="Area2D" parent="."] pause_mode = 1 -position = Vector2( 978, 386 ) +position = Vector2( 872.561, 386 ) script = ExtResource( 6 ) global_id = "turno_cocina_despensa_cebolla_der" esc_script = "res://gymkhana/rooms/turno_cocina/despensa/esc/cebolla_der.esc" @@ -99,9 +108,9 @@ polygon = PoolVector2Array( -45, 103, -24, 109, 82, 109, 95, 16, 72, -39, 63, -5 position = Vector2( -337, 368 ) script = ExtResource( 5 ) -[node name="bidon der" type="Area2D" parent="."] +[node name="bidon_der" type="Area2D" parent="."] pause_mode = 1 -position = Vector2( 978, 386 ) +position = Vector2( 872.561, 386 ) script = ExtResource( 6 ) global_id = "turno_cocina_despensa_bidon_der" esc_script = "res://gymkhana/rooms/turno_cocina/despensa/esc/bidon_der.esc" @@ -111,18 +120,18 @@ action1_text = "Mirar dentro" action2_text = "Coger" animations = null -[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="bidon der"] -position = Vector2( -129.686, 61.0868 ) +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="bidon_der"] +position = Vector2( -129, 84 ) scale = Vector2( 0.9425, 0.837376 ) -polygon = PoolVector2Array( -42, 135, -25, 144, 74, 145, 81, 8, 72, -39, 63, -54, -31, -56, -39, -49, -44, -26, -35, 9 ) +polygon = PoolVector2Array( -42.4403, 130.169, -24.4032, 131.363, 74.2706, 130.169, 81, 8, 72, -39, 63, -54, -31, -56, -39, -49, -44, -26, -35, 9 ) -[node name="ESCLocation" type="Position2D" parent="bidon der"] +[node name="ESCLocation" type="Position2D" parent="bidon_der"] position = Vector2( 23, 375 ) script = ExtResource( 5 ) [node name="bidon_izq" type="Area2D" parent="."] pause_mode = 1 -position = Vector2( 978, 386 ) +position = Vector2( 872.561, 386 ) script = ExtResource( 6 ) global_id = "turno_cocina_despensa_bidon_izq" esc_script = "res://gymkhana/rooms/turno_cocina/despensa/esc/bidon_der.esc" @@ -133,10 +142,49 @@ action2_text = "Coger" animations = null [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="bidon_izq"] -position = Vector2( -241, 88.4102 ) +position = Vector2( -300, 61 ) scale = Vector2( 0.836355, 1.05961 ) -polygon = PoolVector2Array( -44, 96, -28, 94, 76, 90, 70, 18, 66, -26, 40, -38, -21, -42, -37, -37, -51, -31, -55, -4 ) +polygon = PoolVector2Array( -32.2829, -11.3249, 33.4786, -13.2124, 49.0223, -27.3686, 40, -38, -21, -42, -37, -37, -51, -31, -45.4352, -15.0999 ) [node name="ESCLocation" type="Position2D" parent="bidon_izq"] position = Vector2( -314, 364 ) script = ExtResource( 5 ) + +[node name="turno_cocina_patata_grande" parent="." instance=ExtResource( 7 )] +position = Vector2( 371.561, 162 ) +scale = Vector2( 0.880435, 0.88735 ) +action1_text = "Mirar" + +[node name="ESCLocation2" type="Position2D" parent="turno_cocina_patata_grande"] +position = Vector2( 40.8889, 672.79 ) +script = ExtResource( 5 ) + +[node name="foreground" type="Sprite" parent="."] +position = Vector2( 237.561, 441 ) +scale = Vector2( 0.994367, 0.994367 ) +texture = ExtResource( 8 ) + +[node name="bidon_cntr" type="Area2D" parent="."] +pause_mode = 1 +position = Vector2( 872.561, 386 ) +script = ExtResource( 6 ) +global_id = "turno_cocina_despensa_bidon_cntr" +esc_script = "res://gymkhana/rooms/turno_cocina/despensa/esc/bidon_cntr.esc" +combine_when_selected_action_is_in = [ ] +dialog_color = Color( 1, 1, 1, 1 ) +action1_text = "Mirar dentro" +action2_text = "Coger" +action3_target_texts = { +"turno_cocina_peso_bol_inventario": "Coger las lentejas exactas" +} +target_when_selected_action_is_in = [ "action3" ] +animations = null + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="bidon_cntr"] +position = Vector2( -245, 95 ) +scale = Vector2( 0.9425, 0.837376 ) +polygon = PoolVector2Array( -39.2573, 118.226, -23.3422, 117.032, 63.6605, 118.226, 63.6605, 11.942, 57.2944, -7.16528, 59.4164, -32.2436, 41.3793, -48.9625, 11.6711, -57.322, -24.4032, -51.3509, -33.9523, -47.7683, -44, -26, -42.4404, 9.55365, -32.8913, 50.1567 ) + +[node name="ESCLocation" type="Position2D" parent="bidon_cntr"] +position = Vector2( 23, 375 ) +script = ExtResource( 5 ) diff --git a/gymkhana/rooms/turno_cocina/despensa/esc/bidon_cntr.esc b/gymkhana/rooms/turno_cocina/despensa/esc/bidon_cntr.esc new file mode 100644 index 00000000..b0ef0ad0 --- /dev/null +++ b/gymkhana/rooms/turno_cocina/despensa/esc/bidon_cntr.esc @@ -0,0 +1,12 @@ +:action1 + say player "Hay muchas lentejas." + +:action2 + say player "Necesito cogerlas con algo." + +:action3 turno_cocina_peso_bol_inventario + say player "Con esto suficiente" + inventory_remove turno_cocina_peso_bol_inventario + inventory_add turno_cocina_bol_lentejas + inventory_add turno_cocina_peso + diff --git a/project.godot b/project.godot index 20218d38..d71dc266 100644 --- a/project.godot +++ b/project.godot @@ -204,7 +204,7 @@ _global_script_classes=[ { "language": "GDScript", "path": "res://addons/escoria-core/game/scenes/dialogs/esc_dialog_options_chooser.gd" }, { -"base": "StateMachine", +"base": "Node", "class": "ESCDialogPlayer", "language": "GDScript", "path": "res://addons/escoria-core/game/scenes/dialogs/esc_dialog_player.gd" @@ -344,7 +344,7 @@ _global_script_classes=[ { "language": "GDScript", "path": "res://addons/escoria-core/game/esc_project_settings_manager.gd" }, { -"base": "Reference", +"base": "Node", "class": "ESCResourceCache", "language": "GDScript", "path": "res://addons/escoria-core/game/core-scripts/esc_resource_cache.gd" diff --git a/scripts/generate-items.py b/scripts/generate-items.py index 828a5bb8..1aee2ee7 100755 --- a/scripts/generate-items.py +++ b/scripts/generate-items.py @@ -37,9 +37,6 @@ def generateItem(inputFile): generateImage(inputFile, baseName) - if(baseName.find("_inventario") != -1): - return - generateESCScript(baseName) generateScene(baseName)