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:
@@ -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)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
:action1
|
|
||||||
say player "Que cosa tan curiosa"
|
|
||||||
|
|
||||||
:action2
|
|
||||||
say player "No lo quiero coger"
|
|
||||||
|
|
||||||
@@ -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 )
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
:action1
|
|
||||||
say player "Que cosa tan curiosa"
|
|
||||||
|
|
||||||
:action2
|
|
||||||
say player "No lo quiero coger"
|
|
||||||
|
|
||||||
@@ -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 )
|
|
||||||
@@ -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]
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
:action1
|
|
||||||
say player "Que cosa tan curiosa"
|
|
||||||
|
|
||||||
:action2
|
|
||||||
say player "No lo quiero coger"
|
|
||||||
|
|
||||||
@@ -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 )
|
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -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!!"
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
|
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user