feat: Oier does not speak to Eneko at startup, now the game has no story and is very boring

fix: remember picked items to avoid appering in scene again
fix: counting potatoes
This commit is contained in:
2023-10-06 00:08:33 +02:00
parent a857d326ce
commit d1fc5995d4
16 changed files with 32 additions and 138 deletions

View File

@@ -5,19 +5,18 @@ class_name ESCItemCountManager
func add(global_id: String, value:= 1) -> void: func add(global_id: String, value:= 1) -> void:
var item = get_item(global_id) var item = get_item(global_id)
item.count = item.count + value set(global_id, item.count + value)
updateSprite(item)
func remove(global_id: String, value:= 1) -> void: func remove(global_id: String, value:= 1) -> void:
var item = get_item(global_id) var item = get_item(global_id)
item.count = item.count - value set(global_id, item.count - value)
updateSprite(item)
func set(global_id: String, value: int) -> void: func set(global_id: String, value: int) -> void:
var item = get_item(global_id) var item = get_item(global_id)
item.count = value item.count = value
escoria.globals_manager.set_global("count/%s" % global_id, value)
updateSprite(item) updateSprite(item)

View File

@@ -1,6 +0,0 @@
:action1
say player "Que cosa tan curiosa"
:action2
say player "No lo quiero coger"

View File

@@ -1,36 +0,0 @@
[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_cuatro_patatas.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_cuatro_patatas" type="Area2D"]
pause_mode = 1
script = ExtResource( 1 )
global_id = "turno_cocina_cuatro_patatas"
esc_script = "res://gymkhana/items/inventory/turno_cocina_cuatro_patatas.esc"
inventory_texture = ExtResource( 2 )
dialog_color = Color( 1, 1, 1, 1 )
tooltips = {
"action1": "¿Que es esto?",
"action2": "Coger",
"action3": "Mirar",
"action4": "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 )

View File

@@ -1,6 +0,0 @@
:action1
say player "Que cosa tan curiosa"
:action2
say player "No lo quiero coger"

View File

@@ -1,36 +0,0 @@
[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_dos_patatas.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_dos_patatas" type="Area2D"]
pause_mode = 1
script = ExtResource( 1 )
global_id = "turno_cocina_dos_patatas"
esc_script = "res://gymkhana/items/inventory/turno_cocina_dos_patatas.esc"
inventory_texture = ExtResource( 2 )
dialog_color = Color( 1, 1, 1, 1 )
tooltips = {
"action1": "¿Que es esto?",
"action2": "Coger",
"action3": "Mirar",
"action4": "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 )

View File

@@ -1,3 +1,3 @@
:action3 :action3
say player "Tengo que conseguir tres patatas más." [eq turno_cocina_patata 1] say player "Tengo que conseguir tres patatas más." [eq count/turno_cocina_patata 1]
say player "Ya tengo {turno_cocina_patata} patatas!" [!eq turno_cocina_patata 1] say player "Ya tengo {count/turno_cocina_patata} patatas!" [!eq count/turno_cocina_patata 1]

View File

@@ -4,6 +4,7 @@ say player "Solo veo pieles de cebollas."
:action2 :action2
say current_player "Bieeen!!! Había una patata!" say current_player "Bieeen!!! Había una patata!"
set_active turno_cocina_patata_grande false set_active turno_cocina_patata_grande false
set_global turno_cocina_patata_grande_picked true
inventory_add turno_cocina_patata_grande inventory_add turno_cocina_patata_grande
:action3 :action3

View File

@@ -1,6 +0,0 @@
:action1
say player "Que cosa tan curiosa"
:action2
say player "No lo quiero coger"

View File

@@ -1,36 +0,0 @@
[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_tres_patatas.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_tres_patatas" type="Area2D"]
pause_mode = 1
script = ExtResource( 1 )
global_id = "turno_cocina_tres_patatas"
esc_script = "res://gymkhana/items/inventory/turno_cocina_tres_patatas.esc"
inventory_texture = ExtResource( 2 )
dialog_color = Color( 1, 1, 1, 1 )
tooltips = {
"action1": "¿Que es esto?",
"action2": "Coger",
"action3": "Mirar",
"action4": "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 )

View File

@@ -1,4 +1,20 @@
:setup :setup
# Disable turno_cocina_peso if already in inventory
> [i/turno_cocina_peso]
set_active turno_cocina_peso false
# Disable cocina_patata if already picked.
# We cannot look in inventory because the countable item is a different item.
> [cocina_patata_picked]
set_active cocina_patata false
# Disable cocina_debajo_sofa if already picked.
# We cannot look in inventory because the countable item is a different item.
> [cocina_debajo_sofa_picked]
set_active cocina_debajo_sofa false
# Position player depending of last scene
> [eq ESC_LAST_SCENE cocina_detras] > [eq ESC_LAST_SCENE cocina_detras]
teleport player puerta_detras_start teleport player puerta_detras_start
set_angle player 180 set_angle player 180

View File

@@ -12,6 +12,7 @@ say player "Bien! La primera patata!" [!i/turno_cocina_patata]
inventory_add turno_cocina_patata inventory_add turno_cocina_patata
item_count_add turno_cocina_patata item_count_add turno_cocina_patata
set_active cocina_debajo_sofa false set_active cocina_debajo_sofa false
set_global cocina_debajo_sofa_picked true
:action3 turno_cocina_frontal :action3 turno_cocina_frontal
say player "Veo una patata!!" say player "Veo una patata!!"

View File

@@ -5,5 +5,6 @@ say player "Que patata más bonita, cómo se nota que es de la huerta."
say player "Otra patata!" [i/turno_cocina_patata] say player "Otra patata!" [i/turno_cocina_patata]
say player "Bien! La primera patata!" [!i/turno_cocina_patata] say player "Bien! La primera patata!" [!i/turno_cocina_patata]
set_active cocina_patata false set_active cocina_patata false
set_global cocina_patata_picked true
inventory_add turno_cocina_patata inventory_add turno_cocina_patata
item_count_add turno_cocina_patata item_count_add turno_cocina_patata

View File

@@ -24,9 +24,7 @@ set_angle player 180
accept_input SKIP accept_input SKIP
set_gui_visible false set_gui_visible false
walk_block player puerta_cocina_start walk_block player puerta_cocina_start
set_angle player 90 # set_angle player 90
# say current_player hello_start_game:"Alo Uli!" # queue_event eneko_smoking talk
# say current_player cocina_delante_start_2:"Cuéntame un chiste"
queue_event eneko_smoking talk
set_gui_visible true set_gui_visible true
accept_input ALL accept_input ALL

View File

@@ -1,3 +1,8 @@
:setup :setup
teleport player start teleport player start
set_angle player 270 set_angle player 270
# Disable turno_cocina_patata_grande if already picked.
# We cannot look in inventory because the countable item is a different item.
> [turno_cocina_patata_grande_picked]
set_active turno_cocina_patata_grande false

View File

@@ -1,6 +1,5 @@
keys,en,fr,es keys,en,fr,es
hello_start_game,Alo Uli!,Alo Uli!,Alo Uli! hello_start_game,Alo Uli!,Alo Uli!,Alo Uli!
cocina_delante_start_2,Tell me a joke,,Cuéntame un chiste
frontal_action3,Admire,Admire,Admirar frontal_action3,Admire,Admire,Admirar
frontal_action3_say,"It's my lifelong headlight, I love it","C'est ma lampe frontale de toujours, je l'adore","Es mi frontal de toda la vida, le tengo cariño" frontal_action3_say,"It's my lifelong headlight, I love it","C'est ma lampe frontale de toujours, je l'adore","Es mi frontal de toda la vida, le tengo cariño"
frontal_action4,Use,Utiliser,Usar frontal_action4,Use,Utiliser,Usar
1 keys en fr es
2 hello_start_game Alo Uli! Alo Uli! Alo Uli!
cocina_delante_start_2 Tell me a joke Cuéntame un chiste
3 frontal_action3 Admire Admire Admirar
4 frontal_action3_say It's my lifelong headlight, I love it C'est ma lampe frontale de toujours, je l'adore Es mi frontal de toda la vida, le tengo cariño
5 frontal_action4 Use Utiliser Usar

View File

@@ -204,7 +204,7 @@ _global_script_classes=[ {
"language": "GDScript", "language": "GDScript",
"path": "res://addons/escoria-core/game/scenes/dialogs/esc_dialog_options_chooser.gd" "path": "res://addons/escoria-core/game/scenes/dialogs/esc_dialog_options_chooser.gd"
}, { }, {
"base": "Node", "base": "StateMachine",
"class": "ESCDialogPlayer", "class": "ESCDialogPlayer",
"language": "GDScript", "language": "GDScript",
"path": "res://addons/escoria-core/game/scenes/dialogs/esc_dialog_player.gd" "path": "res://addons/escoria-core/game/scenes/dialogs/esc_dialog_player.gd"