diff --git a/.gitea/workflows/release.yml.wip b/.gitea/workflows/release.yml.wip new file mode 100644 index 00000000..f5bec8eb --- /dev/null +++ b/.gitea/workflows/release.yml.wip @@ -0,0 +1,41 @@ +name: Gymkhana release +run-name: ${{ gitea.actor }} is releasing out Gymkhanikas de Uli 🚀 +on: + push: + branches: [ gymkhana/main ] + +env: + GODOT_VERSION: 3.5.2 + EXPORT_NAME: gymkhana + PROJECT_PATH: gymkhana +jobs: + export-linux: + name: Linux Export + runs-on: ubuntu-latest + container: + image: barichello/godot-ci:3.5.2 + steps: + - uses: actions/setup-node@v3 + with: + # Version Spec of the version to use in SemVer notation. + # It also emits such aliases as lts, latest, nightly and canary builds + # Examples: 12.x, 10.15.1, >=10.15.0, lts/Hydrogen, 16-nightly, latest, node + node-version: '16.x' + - name: Checkout + uses: actions/checkout@v3 + with: + lfs: true + - name: Setup + run: | + mkdir -v -p ~/.local/share/godot/templates + mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable + - name: Linux Build + run: | + mkdir -v -p build/linux + cd $PROJECT_PATH + godot -v --export "Linux/X11" ../build/linux/$EXPORT_NAME.x86_64 + - name: Upload Artifact + uses: actions/upload-artifact@v1 + with: + name: linux + path: build/linux \ No newline at end of file diff --git a/gymkhana/addons/escoria-ui-return-monkey-island/esc_item_with_tooltip.gd b/gymkhana/addons/escoria-ui-return-monkey-island/esc_item_with_tooltip.gd index e68e584d..2f0a22cb 100644 --- a/gymkhana/addons/escoria-ui-return-monkey-island/esc_item_with_tooltip.gd +++ b/gymkhana/addons/escoria-ui-return-monkey-island/esc_item_with_tooltip.gd @@ -22,3 +22,46 @@ export(Dictionary) var action4_target_texts = {} # If action used by player is in this list, this is a valid target (second item in combination) export(Array) var target_when_selected_action_is_in = [] + +var outline: ItemOutline + +# React to the mouse entering the item by emitting the respective signal +func mouse_entered(): + if escoria.action_manager.is_object_actionable(global_id): + #outline.show() + if outline != null: + outline.show() + emit_signal("mouse_entered_item", self) + + +# React to the mouse exiting the item by emitting the respective signal +func mouse_exited(): + if outline != null: + outline.hide() + emit_signal("mouse_exited_item", self) + +func _ready(): + if collision is CollisionPolygon2D: + outline = ItemOutline.new() + outline.polygon = collision.get("polygon") + outline.color = Color(1,1,1,0.2) + outline.set_outline_width(2.0) + outline.set_outline_color(Color(1,1,1,1)) + ##outline.offset = Vector2(1,1) + collision.add_child(outline) + outline.hide() + + + + #elif collision is CollisionShape2D: + # outline = Shape2D.new() + # outline.shape = collision.get_shape() + #outline.set_name("outline") + #outline.shape = collision.get_shape() + #self.add_child(outline) + # self.add_child(outline) + + pass + + + diff --git a/gymkhana/addons/escoria-ui-return-monkey-island/item_outline.gd b/gymkhana/addons/escoria-ui-return-monkey-island/item_outline.gd new file mode 100644 index 00000000..06976567 --- /dev/null +++ b/gymkhana/addons/escoria-ui-return-monkey-island/item_outline.gd @@ -0,0 +1,20 @@ +tool +extends Polygon2D +class_name ItemOutline, "res://addons/escoria-core/design/esc_item.svg" + +export(Color) var OutLine = Color(0,0,0) setget set_outline_color +export(float) var Width = 2.0 setget set_outline_width + +func _draw(): + var poly = get_polygon() + for i in range(1 , poly.size()): + draw_line(poly[i-1] , poly[i], OutLine , Width) + draw_line(poly[poly.size() - 1] , poly[0], OutLine , Width) + +func set_outline_color(color): + OutLine = color + update() + +func set_outline_width(new_width): + Width = new_width + update() \ 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 959846b9..d3582897 100644 --- a/gymkhana/items/inventory/turno_cocina_patata_grande.tscn +++ b/gymkhana/items/inventory/turno_cocina_patata_grande.tscn @@ -1,11 +1,8 @@ -[gd_scene load_steps=4 format=2] +[gd_scene load_steps=3 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] -[sub_resource type="RectangleShape2D" id=1] -extents = Vector2( 40.5, 60.5 ) - [node name="turno_cocina_patata_grande" type="Area2D"] pause_mode = 1 script = ExtResource( 1 ) @@ -19,7 +16,3 @@ action2_text = "Coger" action3_text = "Mirar" action4_text = "Usar" animations = null - -[node name="CollisionShape2D" type="CollisionShape2D" parent="."] -position = Vector2( -2.5, 4 ) -shape = SubResource( 1 ) diff --git a/gymkhana/rooms/trasera_cocina/trasera_cocina.tscn b/gymkhana/rooms/trasera_cocina/trasera_cocina.tscn index 7951ec87..e76cd303 100644 --- a/gymkhana/rooms/trasera_cocina/trasera_cocina.tscn +++ b/gymkhana/rooms/trasera_cocina/trasera_cocina.tscn @@ -1,10 +1,9 @@ -[gd_scene load_steps=19 format=2] +[gd_scene load_steps=17 format=2] [ext_resource path="res://addons/escoria-core/game/core-scripts/esc_room.gd" type="Script" id=1] [ext_resource path="res://addons/escoria-core/game/core-scripts/esc_background.gd" type="Script" id=2] [ext_resource path="res://addons/escoria-core/game/core-scripts/esc_location.gd" type="Script" id=3] [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/resources/esc_animationresource.gd" type="Script" id=5] [ext_resource path="res://gymkhana/rooms/trasera_cocina/assets/background trasera cocina-1500x577-noItems.jpg" type="Texture" id=6] [ext_resource path="res://gymkhana/characters/oier/oier.tscn" type="PackedScene" id=7] [ext_resource path="res://gymkhana/items/inventory/turno_cocina_bol_inventario.tscn" type="PackedScene" id=8] @@ -22,13 +21,6 @@ vertices = PoolVector2Array( 155, 425, 129, 383, 242, 376, 1511, 445, 1512, 574, polygons = [ PoolIntArray( 0, 1, 2 ), PoolIntArray( 3, 4, 5, 6 ), PoolIntArray( 5, 0, 2, 7, 8, 9 ), PoolIntArray( 9, 10, 11, 5 ), PoolIntArray( 5, 11, 12 ), PoolIntArray( 13, 14, 15, 16, 5 ), PoolIntArray( 17, 18, 19, 3 ), PoolIntArray( 13, 20, 14 ), PoolIntArray( 5, 12, 21 ), PoolIntArray( 22, 17, 3 ), PoolIntArray( 5, 21, 13 ), PoolIntArray( 6, 22, 3 ), PoolIntArray( 23, 6, 5 ), PoolIntArray( 5, 16, 23 ) ] outlines = [ PoolVector2Array( 263, 374, 359, 376, 385, 397, 442, 395, 464, 432, 506, 457, 584, 468, 725, 472, 749, 460, 794, 462, 846, 467, 864, 482, 981, 480, 1133, 474, 1249, 454, 1318, 435, 1367, 411, 1425, 417, 1511, 445, 1512, 574, 193, 574, 155, 425, 129, 383, 242, 376 ) ] -[sub_resource type="Resource" id=2] -script = ExtResource( 5 ) -dir_angles = [ ] -directions = [ ] -idles = [ ] -speaks = [ ] - [node name="ESCRoom" type="Node2D"] script = ExtResource( 1 ) global_id = "trasera_cocina" @@ -66,7 +58,6 @@ script = ExtResource( 28 ) global_id = "l_exit" esc_script = "res://gymkhana/rooms/trasera_cocina/esc/entrada_cocina.esc" is_exit = true -combine_when_selected_action_is_in = [ ] dialog_color = Color( 1, 1, 1, 1 ) action1_text = "Esto es una puerta y tiene una descripcion mu larga" action2_text = "Entrar! con descricion..." @@ -77,7 +68,7 @@ action4_target_texts = { "bombona2": "Lanzarla contra la puerta" } target_when_selected_action_is_in = [ "action3", "action4" ] -animations = SubResource( 2 ) +animations = null [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Hotspots/entrada_cocina"] position = Vector2( 725, -125 ) @@ -94,7 +85,6 @@ script = ExtResource( 28 ) global_id = "bombona" esc_script = "res://gymkhana/rooms/trasera_cocina/esc/bombona.esc" tooltip_name = "Mirar bombona" -combine_when_selected_action_is_in = [ ] inventory_texture = ExtResource( 29 ) dialog_color = Color( 1, 1, 1, 1 ) action1_text = "Mirar bombona" @@ -105,7 +95,6 @@ position = Vector2( 355, 409 ) script = ExtResource( 28 ) global_id = "bombona2" esc_script = "res://gymkhana/items/inventory/bombona2.esc" -combine_when_selected_action_is_in = [ "action3" ] inventory_texture = ExtResource( 29 ) dialog_color = Color( 1, 1, 1, 1 ) action1_text = "Mirar bombona" @@ -140,9 +129,11 @@ global_id = "eneko_smoking" [node name="caja_herramientas" parent="." instance=ExtResource( 31 )] position = Vector2( 707, 422 ) +combine_when_selected_action_is_in = PoolStringArray( ) [node name="wrench" parent="." instance=ExtResource( 32 )] position = Vector2( 507, 522 ) +combine_when_selected_action_is_in = PoolStringArray( ) [node name="ESCItemWithTooltip@ESCLocation" type="Position2D" parent="."] position = Vector2( -51, 69 ) @@ -151,4 +142,3 @@ global_id = "caja_herramientas" [node name="turno_cocina_bol_inventario" parent="." instance=ExtResource( 8 )] position = Vector2( 343, 479 ) -combine_when_selected_action_is_in = [ ] diff --git a/gymkhana/rooms/turno_cocina/cocina_detras/cocina_detras.tscn b/gymkhana/rooms/turno_cocina/cocina_detras/cocina_detras.tscn index ec3c3ef5..3e3a1475 100644 --- a/gymkhana/rooms/turno_cocina/cocina_detras/cocina_detras.tscn +++ b/gymkhana/rooms/turno_cocina/cocina_detras/cocina_detras.tscn @@ -42,7 +42,6 @@ script = ExtResource( 6 ) global_id = "cocina_detras_puerta_cocina" esc_script = "res://gymkhana/rooms/turno_cocina/cocina_detras/esc/puerta_cocina.esc" is_exit = true -combine_when_selected_action_is_in = [ ] dialog_color = Color( 1, 1, 1, 1 ) action1_text = "Entrar en la cocina" animations = null @@ -63,7 +62,6 @@ script = ExtResource( 6 ) global_id = "cocina_detras_puerta_delante" esc_script = "res://gymkhana/rooms/turno_cocina/cocina_detras/esc/puerta_delante.esc" is_exit = true -combine_when_selected_action_is_in = [ ] dialog_color = Color( 1, 1, 1, 1 ) action1_text = "Ir delante" animations = null diff --git a/gymkhana/rooms/turno_cocina/despensa/despensa.tscn b/gymkhana/rooms/turno_cocina/despensa/despensa.tscn index 3e49b9df..39bb170b 100644 --- a/gymkhana/rooms/turno_cocina/despensa/despensa.tscn +++ b/gymkhana/rooms/turno_cocina/despensa/despensa.tscn @@ -80,7 +80,7 @@ animations = null [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="cebolla izq"] 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 ) +polygon = PoolVector2Array( -37.755, 99.1186, -24, 109, 82, 109, 85, 19, 81.3152, -29.8979, 77.8471, -43.4786, -26.1948, -36.6882, -35, -27, -38.911, 31.2152 ) [node name="ESCLocation" type="Position2D" parent="cebolla izq"] position = Vector2( 56, 553 ) @@ -101,7 +101,7 @@ animations = null [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="cebolla der"] position = Vector2( -305.617, -238.789 ) scale = Vector2( 0.829392, 0.888258 ) -polygon = PoolVector2Array( -45, 103, -24, 109, 82, 109, 95, 16, 72, -39, 63, -54, -31, -56, -46, -53, -51, -31, -53, 8 ) +polygon = PoolVector2Array( -45, 103, -24, 109, 82, 109, 95, 16, 72, -39, 63, -54, -31, -56, -46, -53, -51, -31, -52.307, 11.0204 ) [node name="ESCLocation" type="Position2D" parent="cebolla der"] position = Vector2( -337, 368 ) @@ -122,7 +122,7 @@ animations = null [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="bidon_der"] position = Vector2( -129, 84 ) scale = Vector2( 0.9425, 0.837376 ) -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 ) +polygon = PoolVector2Array( -42.4403, 130.169, -24.4032, 131.363, 57.2944, 130.169, 62.5995, 109.867, 64.7215, 78.8176, 67.9045, 17.9131, 62.5995, -9.55365, 67.9045, -20.3015, 63.6605, -37.0204, 56.2335, -51.3509, 20.1592, -59.7103, -6.36603, -59.7103, -29.7082, -53.7393, -36.0742, -44.1857, -38.1963, -26.2725, -31.8302, -10.7479, -35, 9, -39.2573, 37.0204 ) [node name="ESCLocation" type="Position2D" parent="bidon_der"] position = Vector2( 23, 375 ) @@ -143,7 +143,7 @@ animations = null [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="bidon_izq"] position = Vector2( -300, 61 ) scale = Vector2( 0.836355, 1.05961 ) -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 ) +polygon = PoolVector2Array( -38.2613, -9.43741, -11.9567, -14.1561, 17.935, -16.0436, 40.6526, -12.2686, 45.4352, -14.1561, 49.0222, -17.9311, 46.6309, -23.5936, 45.4352, -29.256, 41.8483, -33.9748, 35.8699, -36.806, 10.761, -40.581, -19.1306, -40.581, -37, -37, -51, -31, -52.6093, -25.481, -51.4136, -20.7623, -51.4136, -14.1561, -44.2396, -10.3812 ) [node name="ESCLocation" type="Position2D" parent="bidon_izq"] position = Vector2( -314, 364 ) @@ -158,6 +158,9 @@ action1_text = "Mirar" position = Vector2( 40.8889, 672.79 ) script = ExtResource( 5 ) +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="turno_cocina_patata_grande"] +polygon = PoolVector2Array( 21.5802, 76.6327, 32.9383, 42.8241, 37.4815, 21.4121, 37.4815, -25.9199, 36.3457, -61.9823, -39.7531, -63.1093, -42.0247, 80.0135 ) + [node name="foreground" type="Sprite" parent="."] position = Vector2( 304, 351 ) scale = Vector2( 0.994367, 0.994367 ) @@ -183,7 +186,7 @@ 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 ) +polygon = PoolVector2Array( -39.2573, 118.226, -23.3422, 117.032, 63.6605, 118.226, 63.6605, 11.942, 57.2944, -7.16528, 59.4164, -13.1363, 60.4775, -23.8842, 59.4164, -32.2436, 54.1114, -42.9915, 45.6234, -50.1567, 30.7692, -56.1277, 13.7931, -58.5162, -4.24402, -58.5162, -21.2202, -53.7393, -33.9523, -47.7683, -44, -26, -43.5013, -17.9131, -40.3183, -10.7479, -42.4404, 9.55365, -41.3793, 50.1567 ) [node name="ESCLocation" type="Position2D" parent="bidon_cntr"] position = Vector2( 23, 375 ) diff --git a/project.godot b/project.godot index 20218d38..f2d3ab69 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" @@ -494,6 +494,11 @@ _global_script_classes=[ { "language": "GDScript", "path": "res://addons/escoria-core/game/core-scripts/esc/commands/inventory_remove.gd" }, { +"base": "Polygon2D", +"class": "ItemOutline", +"language": "GDScript", +"path": "res://gymkhana/addons/escoria-ui-return-monkey-island/item_outline.gd" +}, { "base": "ESCBaseCommand", "class": "PlaySndCommand", "language": "GDScript", @@ -777,6 +782,7 @@ _global_script_class_icons={ "IncGlobalCommand": "", "InventoryAddCommand": "", "InventoryRemoveCommand": "", +"ItemOutline": "res://addons/escoria-core/design/esc_item.svg", "PlaySndCommand": "", "PrintCommand": "", "QueueEventCommand": "",