Merge branch 'gymkhana/main' of git.fosil.eu:gymkhana/gymkhana into gymkhana/main

This commit is contained in:
2023-09-25 23:07:20 +02:00
35 changed files with 410 additions and 70 deletions

View File

@@ -0,0 +1,40 @@
# `item_count_add item_id value`
#
# Add value to the count in a item.
# - item_id: string: id of the item to apply
# - value: int: number to add
#
# @ESC
extends ESCBaseCommand
class_name ItemCountAddCommand
var item_count_manager = ESCItemCountManager.new()
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
1,
[TYPE_STRING, TYPE_INT],
[null, 1]
)
# Validate wether the given arguments match the command descriptor
func validate(arguments: Array):
if not escoria.object_manager.has(arguments[0]):
escoria.logger.error(
self,
"Object %s not registered"
% [arguments[0]]
)
return false
return .validate(arguments)
# Run the command
func run(command_params: Array) -> int:
item_count_manager.add(command_params[0], command_params[1])
return ESCExecution.RC_OK

View File

@@ -0,0 +1,57 @@
# `play_lib_snd`
#
# Plays a sound from the library.
#
# **Parameters**
#
# - *file_name*: File name withot extension
# - *namespace*: Subfolder
#
# @ESC
extends ESCBaseCommand
class_name PlayLibSound
# Return the descriptor of the arguments of this command
func configure() -> ESCCommandArgumentDescriptor:
return ESCCommandArgumentDescriptor.new(
1,
[TYPE_STRING,TYPE_STRING],
[null,""]
)
# Validate whether the given arguments match the command descriptor
func validate(arguments: Array):
if not .validate(arguments):
return false
var subFolder = arguments[1]
if(arguments[1] != ""):
subFolder += "/"
var resourceFile = "res://gymkhana/sounds/" + subFolder + arguments[0] + ".ogg"
if not ResourceLoader.exists(resourceFile):
escoria.logger.error(
self,
"[%s]: invalid parameter. File %s not found."
% [get_command_name(), resourceFile]
)
return false
return true
# Run the command
func run(command_params: Array) -> int:
var resourceFile = "res://gymkhana/sounds/" + command_params[0] + ".ogg"
escoria.object_manager.get_object("_sound").node.set_state(
resourceFile
)
return ESCExecution.RC_OK
# Function called when the command is interrupted.
func interrupt():
# Do nothing
pass

View File

@@ -0,0 +1,75 @@
# A manager for inventory objects
extends Resource
class_name ESCItemCountManager
func add(global_id: String, value:= 1) -> void:
var item = get_item(global_id)
set(global_id, item.count + value)
func remove(global_id: String, value:= 1) -> void:
var item = get_item(global_id)
set(global_id, item.count - value)
func set(global_id: String, value: int) -> void:
var item = get_item(global_id)
item.count = value
updateSprite(item)
escoria.globals_manager.set_global(global_id, value)
func removeFromInventoryIfCountLessThan(global_id: String, value:= 1) -> void:
var item = get_item(global_id)
if item.count < value:
escoria.inventory_manager.remove_item(global_id)
func get_item(global_id: String) -> ESCItem:
var node = escoria.object_manager.get_object(global_id).node
if not node is ESCItem:
escoria.logger.error(
"item_count_add: invalid object",
["Object is not an ESCItem"]
)
return null
return node
func updateSprite(item: ESCItemWithTooltip) -> void:
var child_node = item.get_node("Sprite") as Sprite
if not child_node is Sprite:
escoria.logger.error(
self,
"No Sprite node found"
)
var texture_path = getCountTexturePath(item)
var texture = load(texture_path)
# Update texture in scene
var sprite = child_node as Sprite
sprite.texture = texture
# Update texture in scene
# TODO optional inventory_texture
# TODO change inventory texture without removing and adding the item
# https://github.com/godot-escoria/escoria-issues/issues/364
# https://discord.com/channels/884336424780984330/1124614097917460584/1127151969614696548
item.inventory_texture = texture
if escoria.inventory_manager.inventory_has(item.global_id):
escoria.inventory_manager.remove_item(item.global_id)
escoria.inventory_manager.add_item(item.global_id)
func getCountTexturePath(item: ESCItemWithTooltip) -> String:
var count = item.count
var textures = item.count_textures # TODO sort dictionaries by start key
var i = 0
while (i < textures.size() - 1) and count >= textures[i + 1].start:
i = i + 1
return textures[i].texture

View File

@@ -19,12 +19,26 @@ export(Dictionary) var tooltips = {}
# Action 3 tooltip texts if item is target. Dictionary with tool's global id as key. # Action 3 tooltip texts if item is target. Dictionary with tool's global id as key.
export(Dictionary) var action3_target_texts = {} export(Dictionary) var action3_target_texts = {}
# Action 4 tooltip texts if item is target. Dictionary with tool's global id as key. # Action 4 tooltip texts if item is target. Dictionary with tool's global id as key
export(Dictionary) var action4_target_texts = {} export(Dictionary) var action4_target_texts = {}
# If action used by player is in this list, this is a valid target (second item in combination) # 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 = [] export(Array) var target_when_selected_action_is_in = []
# If item is countable (E.g. money) marks the quantity
export(int) var count = 0
# If item is countable (E.g. money) marks which texture to use depending of count value.
# Each element is a Dictionary with start and texture keys:
# [
# { "start": 0, "texture": "res://gymkhana/items/inventory/assets/no_money.png"},
# { "start": 1, "texture": "res://gymkhana/items/inventory/assets/one_coin.png"},
# { "start": 2, "texture": "res://gymkhana/items/inventory/assets/two_coins.png"},
# { "start": 3, "texture": "res://gymkhana/items/inventory/assets/coins.png"},
# { "start": 10, "texture": "res://gymkhana/items/inventory/assets/bills.png"},
# ]
export(Array) var count_textures = []
var outline: ItemOutline var outline: ItemOutline
var isHighlighted: bool var isHighlighted: bool

View File

@@ -310,7 +310,9 @@ func click_on_inventory_item(item_global_id: String, event: InputEvent, action:
# If item needs combination with this action, use the item texture as mouse cursor # If item needs combination with this action, use the item texture as mouse cursor
if action in target_obj.combine_when_selected_action_is_in: if action in target_obj.combine_when_selected_action_is_in:
Input.set_custom_mouse_cursor(target_obj.inventory_texture) var texture = target_obj.inventory_texture
var middleOfTheTexture = Vector2(texture.get_width() / 2, texture.get_height() / 2)
Input.set_custom_mouse_cursor(target_obj.inventory_texture, 0, middleOfTheTexture)
escoria.action_manager.do( escoria.action_manager.do(
escoria.action_manager.ACTION.ITEM_LEFT_CLICK, escoria.action_manager.ACTION.ITEM_LEFT_CLICK,

View File

@@ -12,12 +12,25 @@ func get_plugin_name():
func disable_plugin(): func disable_plugin():
print("Disabling plugin Escoria UI Return to Monkey Island.") print("Disabling plugin Escoria UI Return to Monkey Island.")
EscoriaPlugin.deregister_ui("res://gymkhana/addons/escoria-ui-return-monkey-island/game.tscn") EscoriaPlugin.deregister_ui("res://gymkhana/addons/escoria-ui-return-monkey-island/game.tscn")
ESCProjectSettingsManager.remove_setting(
RTMIUiSettings.SOUND_LIBRARY_FOLDER
)
# Register UI with Escoria # Register UI with Escoria
func enable_plugin(): func enable_plugin():
print("Enabling plugin Escoria UI Return to Monkey Island.") print("Enabling plugin Escoria Dialog Simple")
if not EscoriaPlugin.register_ui(self, "res://gymkhana/addons/escoria-ui-return-monkey-island/game.tscn"):
if EscoriaPlugin.register_ui(self, "res://gymkhana/addons/escoria-ui-return-monkey-island/game.tscn"):
ESCProjectSettingsManager.register_setting(
RTMIUiSettings.SOUND_LIBRARY_FOLDER,
"res://game/sounds",
{
"type": TYPE_STRING
}
)
else:
get_editor_interface().set_plugin_enabled( get_editor_interface().set_plugin_enabled(
get_plugin_name(), get_plugin_name(),
false false

View File

@@ -0,0 +1,7 @@
extends Resource
class_name RTMIUiSettings
const SETTINGS_ROOT = "escoria/rtmi_ui"
const SOUND_LIBRARY_FOLDER = "%s/sound_library_folder" % SETTINGS_ROOT

Binary file not shown.

After

Width:  |  Height:  |  Size: 856 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -0,0 +1,2 @@
:action3
say player "Tiene una inscripción: \"Para Uli-Alto de parte de Tronceda\"."

View File

@@ -0,0 +1,18 @@
[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_cuchillo.png" type="Texture" id=2]
[node name="turno_cocina_cuchillo" type="Area2D"]
pause_mode = 1
script = ExtResource( 1 )
global_id = "turno_cocina_cuchillo"
esc_script = "res://gymkhana/items/inventory/turno_cocina_cuchillo.esc"
combine_when_selected_action_is_in = [ "action4" ]
inventory_texture = ExtResource( 2 )
dialog_color = Color( 1, 1, 1, 1 )
animations = null
tooltips = {
"action3": "Mirar",
"action4": "Usar",
}

View File

@@ -1,3 +1,2 @@
:action3 :action3
say player "Es mi frontal de toda la vida, le tengo cariño" say player "Es mi frontal de toda la vida, le tengo cariño"

View File

@@ -1,6 +1,3 @@
:action1 :action3
say player "Que cosa tan curiosa" say player "Tengo que conseguir tres patatas más." [eq turno_cocina_patata 1]
say player "Ya tengo {turno_cocina_patata} patatas!" [!eq turno_cocina_patata 1]
:action2
say player "No lo quiero coger"

View File

@@ -15,12 +15,15 @@ esc_script = "res://gymkhana/items/inventory/turno_cocina_patata.esc"
inventory_texture = ExtResource( 2 ) inventory_texture = ExtResource( 2 )
dialog_color = Color( 1, 1, 1, 1 ) dialog_color = Color( 1, 1, 1, 1 )
tooltips = { tooltips = {
"action1": "¿Que es esto?", "action3": "Contar las patatas",
"action2": "Coger",
"action3": "Mirar",
"action4": "Usar"
} }
animations = null animations = null
count_textures = [
{ "start": 1, "texture": "res://gymkhana/items/inventory/assets/turno_cocina_patata.png" },
{ "start": 2, "texture": "res://gymkhana/items/inventory/assets/turno_cocina_dos_patatas.png" },
{ "start": 3, "texture": "res://gymkhana/items/inventory/assets/turno_cocina_tres_patatas.png" },
{ "start": 4, "texture": "res://gymkhana/items/inventory/assets/turno_cocina_cuatro_patatas.png" },
]
[node name="Sprite" type="Sprite" parent="."] [node name="Sprite" type="Sprite" parent="."]
position = Vector2( -2, 0 ) position = Vector2( -2, 0 )

View File

@@ -1,13 +1,19 @@
:action1 :action1
say player "Hay una patata!" say player "Solo veo pieles de cebollas."
:action2 :action2
say current_player "Bieeen!!! una patata!" say current_player "Bieeen!!! Había una patata!"
set_active turno_cocina_patata_grande false set_active turno_cocina_patata_grande false
inventory_add turno_cocina_patata_grande inventory_add turno_cocina_patata_grande
:action3 :action3
say current_player "Es bien grande" say current_player "Es la segunda patata más grande que he visto nunca."
:action3 turno_cocina_cuchillo
item_count_add turno_cocina_patata 2
inventory_add turno_cocina_patata
inventory_remove turno_cocina_patata_grande
say current_player "Toma ya, ahora son dos patatas!"
:action4 :action4
say current_player "Así no me sirve de nada" say current_player "Creo que necesito patatas normales, no patatas gigantes..."

View File

@@ -11,10 +11,8 @@ esc_script = "res://gymkhana/items/inventory/turno_cocina_patata_grande.esc"
combine_when_selected_action_is_in = [ ] combine_when_selected_action_is_in = [ ]
inventory_texture = ExtResource( 2 ) inventory_texture = ExtResource( 2 )
dialog_color = Color( 1, 1, 1, 1 ) dialog_color = Color( 1, 1, 1, 1 )
tooltips = {
"action1": "¿Que es esto?",
"action2": "Coger",
"action3": "Mirar",
"action4": "Usar"
}
animations = null animations = null
action3_target_texts = {
"turno_cocina_cuchillo": "Partir la patata en dos"
}
target_when_selected_action_is_in = [ "action3" ]

View File

@@ -1,5 +1,5 @@
:action1 :action1
say player "Es un peso, con esto podría coger la cantidad exacta de algún ingrediente" say player "Es un peso, con esto podría coger la cantidad exacta de algún ingrediente"
:action2 :action2
say current_player "Podria ser útil!!" say current_player "Podria ser útil!!"

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=13 format=2] [gd_scene load_steps=14 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_room.gd" type="Script" id=1]
[ext_resource path="res://gymkhana/characters/oier/oier.tscn" type="PackedScene" id=2] [ext_resource path="res://gymkhana/characters/oier/oier.tscn" type="PackedScene" id=2]
@@ -11,6 +11,7 @@
[ext_resource path="res://gymkhana/rooms/turno_cocina/cocina/assets/foreground-silla.png" type="Texture" id=9] [ext_resource path="res://gymkhana/rooms/turno_cocina/cocina/assets/foreground-silla.png" type="Texture" id=9]
[ext_resource path="res://gymkhana/items/inventory/turno_cocina_peso.tscn" type="PackedScene" id=10] [ext_resource path="res://gymkhana/items/inventory/turno_cocina_peso.tscn" type="PackedScene" id=10]
[ext_resource path="res://gymkhana/items/inventory/turno_cocina_bol.tscn" type="PackedScene" id=11] [ext_resource path="res://gymkhana/items/inventory/turno_cocina_bol.tscn" type="PackedScene" id=11]
[ext_resource path="res://gymkhana/items/inventory/assets/turno_cocina_patata.png" type="Texture" id=13]
[sub_resource type="NavigationPolygon" id=3] [sub_resource type="NavigationPolygon" id=3]
vertices = PoolVector2Array( 2398, 485, 2442, 499, 2446, 617, 2409, 597, 2283, 493, 144, 568, 3, 570, -56, 524, 111, 445, 162, 471, 229, 445, 200, 465, 252, 478, 305, 524, 273, 570, 2287, 687, 2062, 635, 2113, 565, 696, 737, 512, 591, 703, 699, 1269, 739, 1241, 699, 1502, 646, 1409, 752, 1345, 667, 1489, 627, 1347, 563, 1480, 587, 1466, 514, 1345, 505, 1382, 439, 2109, 424, 2238, 386, 1788, 325, 2018, 419, 1787, 383, 1466, 412, 1493, 479, 1305.5, 467, 1337.5, 449, 1306.5, 498 ) vertices = PoolVector2Array( 2398, 485, 2442, 499, 2446, 617, 2409, 597, 2283, 493, 144, 568, 3, 570, -56, 524, 111, 445, 162, 471, 229, 445, 200, 465, 252, 478, 305, 524, 273, 570, 2287, 687, 2062, 635, 2113, 565, 696, 737, 512, 591, 703, 699, 1269, 739, 1241, 699, 1502, 646, 1409, 752, 1345, 667, 1489, 627, 1347, 563, 1480, 587, 1466, 514, 1345, 505, 1382, 439, 2109, 424, 2238, 386, 1788, 325, 2018, 419, 1787, 383, 1466, 412, 1493, 479, 1305.5, 467, 1337.5, 449, 1306.5, 498 )
@@ -39,7 +40,7 @@ player_doubleclick_speed_multiplier = 2.0
[node name="Foreground-mesa" type="Sprite" parent="ESCTerrain"] [node name="Foreground-mesa" type="Sprite" parent="ESCTerrain"]
position = Vector2( 1786, 424 ) position = Vector2( 1786, 424 )
z_index = 4096 z_index = 1000
texture = ExtResource( 8 ) texture = ExtResource( 8 )
[node name="NavigationPolygonInstance" type="NavigationPolygonInstance" parent="ESCTerrain"] [node name="NavigationPolygonInstance" type="NavigationPolygonInstance" parent="ESCTerrain"]
@@ -60,7 +61,7 @@ is_exit = true
combine_when_selected_action_is_in = [ ] combine_when_selected_action_is_in = [ ]
dialog_color = Color( 1, 1, 1, 1 ) dialog_color = Color( 1, 1, 1, 1 )
tooltips = { tooltips = {
"action1": "Ir detrás" "action1": "Ir detrás"
} }
animations = null animations = null
@@ -84,7 +85,7 @@ is_exit = true
combine_when_selected_action_is_in = [ ] combine_when_selected_action_is_in = [ ]
dialog_color = Color( 1, 1, 1, 1 ) dialog_color = Color( 1, 1, 1, 1 )
tooltips = { tooltips = {
"action1": "Salir de la cocina" "action1": "Salir de la cocina"
} }
animations = null animations = null
@@ -130,8 +131,8 @@ esc_script = "res://gymkhana/rooms/turno_cocina/cocina/esc/fregadero_der.esc"
combine_when_selected_action_is_in = [ ] combine_when_selected_action_is_in = [ ]
dialog_color = Color( 1, 1, 1, 1 ) dialog_color = Color( 1, 1, 1, 1 )
tooltips = { tooltips = {
"action1": "Mirar fregadero", "action1": "Mirar fregadero",
"action2": "Usar" "action2": "Usar"
} }
action3_target_texts = { action3_target_texts = {
"turno_cocina_bol": "Llenar el bol de agua", "turno_cocina_bol": "Llenar el bol de agua",
@@ -155,8 +156,8 @@ esc_script = "res://gymkhana/rooms/turno_cocina/cocina/esc/fregadero_izq.esc"
combine_when_selected_action_is_in = [ ] combine_when_selected_action_is_in = [ ]
dialog_color = Color( 1, 1, 1, 1 ) dialog_color = Color( 1, 1, 1, 1 )
tooltips = { tooltips = {
"action1": "Mirar fregadero", "action1": "Mirar el fregadero",
"action2": "Usar" "action2": "Usar"
} }
action3_target_texts = { action3_target_texts = {
"turno_cocina_bol": "Llenar el bol de agua", "turno_cocina_bol": "Llenar el bol de agua",
@@ -172,6 +173,27 @@ polygon = PoolVector2Array( 1800, 276, 1804, 280, 1895, 273, 1883, 266, 1863, 26
position = Vector2( 1800, 300 ) position = Vector2( 1800, 300 )
script = ExtResource( 5 ) script = ExtResource( 5 )
[node name="cuchillos" type="Area2D" parent="."]
pause_mode = 1
script = ExtResource( 6 )
global_id = "cocina_cuchillos"
esc_script = "res://gymkhana/rooms/turno_cocina/cocina/esc/cuchillos.esc"
combine_when_selected_action_is_in = [ ]
dialog_color = Color( 1, 1, 1, 1 )
tooltips = {
"action1": "Contar los cuchillos",
"action2": "Coger un buen cuchillo"
}
animations = null
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="cuchillos"]
position = Vector2( 1452, -245 )
polygon = PoolVector2Array( 469, 375, 454, 391, 508, 399, 530, 385 )
[node name="ESCLocation" type="Position2D" parent="cuchillos"]
position = Vector2( 1987, 370 )
script = ExtResource( 5 )
[node name="debajo_sofa" type="Area2D" parent="."] [node name="debajo_sofa" type="Area2D" parent="."]
pause_mode = 1 pause_mode = 1
script = ExtResource( 6 ) script = ExtResource( 6 )
@@ -180,11 +202,11 @@ esc_script = "res://gymkhana/rooms/turno_cocina/cocina/esc/debajo_sofa.esc"
combine_when_selected_action_is_in = [ "action4" ] combine_when_selected_action_is_in = [ "action4" ]
dialog_color = Color( 1, 1, 1, 1 ) dialog_color = Color( 1, 1, 1, 1 )
tooltips = { tooltips = {
"action1": "Mirar debajo del sofa", "action1": "Mirar debajo del sofa",
"action2": "Meter la mano" "action2": "Meter la mano"
} }
action3_target_texts = { action3_target_texts = {
"turno_cocina_frontal": "Mirar denajo del sofa" "turno_cocina_frontal": "Alumbrar debajo del sofa"
} }
target_when_selected_action_is_in = [ "action3" ] target_when_selected_action_is_in = [ "action3" ]
animations = null animations = null
@@ -195,3 +217,48 @@ polygon = PoolVector2Array( 484, 406, 485, 421, 556, 423, 551, 415, 550, 409, 55
[node name="ESCLocation" type="Position2D" parent="debajo_sofa"] [node name="ESCLocation" type="Position2D" parent="debajo_sofa"]
position = Vector2( 420, 494 ) position = Vector2( 420, 494 )
script = ExtResource( 5 ) script = ExtResource( 5 )
[node name="cocina_patata" type="Area2D" parent="."]
pause_mode = 1
position = Vector2( 2202, 343 )
rotation = -0.270526
scale = Vector2( 0.35, 0.35 )
z_index = 1001
script = ExtResource( 6 )
global_id = "cocina_patata"
esc_script = "res://gymkhana/rooms/turno_cocina/cocina/esc/patata.esc"
combine_when_selected_action_is_in = [ ]
inventory_texture = ExtResource( 13 )
dialog_color = Color( 1, 1, 1, 1 )
tooltips = {
"action1": "Admirar la patata",
"action2": "Cogerla",
}
count_textures = [ {
"start": 1,
"texture": "res://gymkhana/items/inventory/assets/turno_cocina_patata.png"
}, {
"start": 2,
"texture": "res://gymkhana/items/inventory/assets/turno_cocina_dos_patatas.png"
}, {
"start": 3,
"texture": "res://gymkhana/items/inventory/assets/turno_cocina_tres_patatas.png"
}, {
"start": 4,
"texture": "res://gymkhana/items/inventory/assets/turno_cocina_cuatro_patatas.png"
} ]
animations = null
[node name="Sprite" type="Sprite" parent="cocina_patata"]
position = Vector2( -2, 0 )
scale = Vector2( 0.5, 0.5 )
texture = ExtResource( 13 )
[node name="turno_cocina_patata_collision" type="CollisionPolygon2D" parent="cocina_patata"]
position = Vector2( 9.0867, -13.5233 )
z_index = 1001
polygon = PoolVector2Array( 6.50781, 0.0583801, 20.7368, 12.8992, 7.896, 27.1279, -19.937, 31.269, -42.4258, 16.1375, -26.0684, -0.0810547 )
[node name="turno_cocina_patata_location" type="Position2D" parent="cocina_patata"]
position = Vector2( 93.1357, 65.3632 )
script = ExtResource( 5 )

View File

@@ -0,0 +1,12 @@
:action1
say player "Uno, dos, tres, cuatro, cinco, seis, siete, ocho, nueve, diez y once." [!turno_cocina_cuchillo_en_inventario]
say player "Uno, dos, tres, cuatro, cinco, seis, siete, ocho, nueve, diez y once." [turno_cocina_cuchillo_en_inventario]
say player "Que raro, sigue habiendo once cuchillos." [turno_cocina_cuchillo_en_inventario]
:action2
> [turno_cocina_cuchillo_en_inventario]
say player "¿Qué puedo hacer con dos cuchillos que no pueda hacer con solo uno?"
stop
say player "Este parece bien afilado."
set_global turno_cocina_cuchillo_en_inventario true
inventory_add turno_cocina_cuchillo

View File

@@ -1,22 +1,18 @@
:action1 :action1
say player "No se ve nada." [!turno_cocina_frontal_debajo_sofa] say player "No se ve nada." [!turno_cocina_frontal_debajo_sofa]
say player "No la veo pero se que hay una patata." [turno_cocina_frontal_debajo_sofa] say player "No la veo pero se que hay una patata." [turno_cocina_frontal_debajo_sofa]
:action2 :action2
> [!turno_cocina_frontal_debajo_sofa] > [!turno_cocina_frontal_debajo_sofa]
say player "No pienso meter la mano está muy oscuro." say player "No pienso meter la mano está muy oscuro."
stop stop
say player "Bieen! una patata!" say player "Otra patata!" [i/turno_cocina_patata]
inventory_add turno_cocina_patata say player "Bien! La primera patata!" [!i/turno_cocina_patata]
set_active cocina_debajo_sofa false inventory_add turno_cocina_patata
item_count_add turno_cocina_patata
:action3 turno_cocina_bol_lentejas set_active cocina_debajo_sofa false
say player "Agua a ojo... en su justa medida."
inventory_remove turno_cocina_peso_bol
inventory_add turno_cocina_bol_lentejas
inventory_add turno_cocina_peso
:action3 turno_cocina_frontal :action3 turno_cocina_frontal
say player "Veo una patata!!" say player "Veo una patata!!"
set_global turno_cocina_frontal_debajo_sofa true set_global turno_cocina_frontal_debajo_sofa true

View File

@@ -0,0 +1,9 @@
:action1
say player "Que patata más bonita, cómo se nota que es de la huerta."
:action2
say player "Otra patata!" [i/turno_cocina_patata]
say player "Bien! La primera patata!" [!i/turno_cocina_patata]
set_active cocina_patata false
inventory_add turno_cocina_patata
item_count_add turno_cocina_patata

View File

@@ -1,3 +1,3 @@
:action1 :action1
play_snd res://gymkhana/sounds/cocina_delante_open.ogg play_lib_snd puerta_cocina_delante
change_scene "res://gymkhana/rooms/turno_cocina/cocina_delante/cocina_delante.tscn" change_scene "res://gymkhana/rooms/turno_cocina/cocina_delante/cocina_delante.tscn"

View File

@@ -1,3 +1,3 @@
:action1 :action1
play_snd res://gymkhana/sounds/cocina_detras_open.ogg play_lib_snd puerta_cocina_detras
change_scene "res://gymkhana/rooms/turno_cocina/cocina_detras/cocina_detras.tscn" change_scene "res://gymkhana/rooms/turno_cocina/cocina_detras/cocina_detras.tscn"

View File

@@ -1,6 +1,3 @@
:action1 :action1
accept_input SKIP play_lib_snd puerta_cocina_delante
play_video res://gymkhana/videos/test_video.ogv
accept_input ALL
play_snd res://gymkhana/sounds/cocina_delante_open.ogg
change_scene "res://gymkhana/rooms/turno_cocina/cocina/cocina.tscn" change_scene "res://gymkhana/rooms/turno_cocina/cocina/cocina.tscn"

View File

@@ -1,3 +1,3 @@
:action1 :action1
play_snd res://gymkhana/sounds/despensa_open.ogg play_lib_snd puerta_despensa
change_scene "res://gymkhana/rooms/turno_cocina/despensa/despensa.tscn" change_scene "res://gymkhana/rooms/turno_cocina/despensa/despensa.tscn"

View File

@@ -1,3 +1,3 @@
:action1 :action1
play_snd res://gymkhana/sounds/cocina_detras_open.ogg play__lib_snd puerta_cocina_detras
change_scene "res://gymkhana/rooms/turno_cocina/cocina/cocina.tscn" change_scene "res://gymkhana/rooms/turno_cocina/cocina/cocina.tscn"

View File

@@ -141,7 +141,7 @@ pause_mode = 1
position = Vector2( 941, 385 ) position = Vector2( 941, 385 )
script = ExtResource( 6 ) script = ExtResource( 6 )
global_id = "turno_cocina_despensa_bidon_izq" global_id = "turno_cocina_despensa_bidon_izq"
esc_script = "res://gymkhana/rooms/turno_cocina/despensa/esc/bidon_der.esc" esc_script = "res://gymkhana/rooms/turno_cocina/despensa/esc/bidon_izq.esc"
combine_when_selected_action_is_in = [ ] combine_when_selected_action_is_in = [ ]
dialog_color = Color( 1, 1, 1, 1 ) dialog_color = Color( 1, 1, 1, 1 )
tooltips = { tooltips = {
@@ -163,7 +163,10 @@ script = ExtResource( 5 )
position = Vector2( 440, 161 ) position = Vector2( 440, 161 )
scale = Vector2( 0.880435, 0.88735 ) scale = Vector2( 0.880435, 0.88735 )
tooltips = { tooltips = {
"action1": "Mirar" "action1": "Mirar",
"action2": "Rascar por el fondo",
"action3": "Mirar",
"action4": "Usar"
} }
[node name="ESCLocation2" type="Position2D" parent="turno_cocina_patata_grande"] [node name="ESCLocation2" type="Position2D" parent="turno_cocina_patata_grande"]

View File

@@ -1,5 +1,5 @@
:action1 :action1
say player "Está lleno de algo que no se que es." say player "Está lleno de algo que no sé que es."
:action2 :action2
say player "Lo que hay dentro no lo necesito para nada." say player "Lo que hay dentro no lo necesito para nada."

View File

@@ -1,3 +1,3 @@
:action1 :action1
play_snd res://gymkhana/sounds/despensa_open.ogg play_lib_snd puerta_despensa
change_scene "res://gymkhana/rooms/turno_cocina/cocina_delante/cocina_delante.tscn" change_scene "res://gymkhana/rooms/turno_cocina/cocina_delante/cocina_delante.tscn"

View File

@@ -209,7 +209,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"
@@ -289,6 +289,11 @@ _global_script_classes=[ {
"language": "GDScript", "language": "GDScript",
"path": "res://addons/escoria-core/game/core-scripts/esc_item.gd" "path": "res://addons/escoria-core/game/core-scripts/esc_item.gd"
}, { }, {
"base": "Resource",
"class": "ESCItemCountManager",
"language": "GDScript",
"path": "res://gymkhana/addons/escoria-ui-return-monkey-island/esc/esc_item_count_manager.gd"
}, {
"base": "ESCItem", "base": "ESCItem",
"class": "ESCItemWithTooltip", "class": "ESCItemWithTooltip",
"language": "GDScript", "language": "GDScript",
@@ -504,12 +509,22 @@ _global_script_classes=[ {
"language": "GDScript", "language": "GDScript",
"path": "res://addons/escoria-core/game/core-scripts/esc/commands/inventory_remove.gd" "path": "res://addons/escoria-core/game/core-scripts/esc/commands/inventory_remove.gd"
}, { }, {
"base": "ESCBaseCommand",
"class": "ItemCountAddCommand",
"language": "GDScript",
"path": "res://gymkhana/addons/escoria-ui-return-monkey-island/esc/commands/item_count_add.gd"
}, {
"base": "Polygon2D", "base": "Polygon2D",
"class": "ItemOutline", "class": "ItemOutline",
"language": "GDScript", "language": "GDScript",
"path": "res://gymkhana/addons/escoria-ui-return-monkey-island/item_outline.gd" "path": "res://gymkhana/addons/escoria-ui-return-monkey-island/item_outline.gd"
}, { }, {
"base": "ESCBaseCommand", "base": "ESCBaseCommand",
"class": "PlayLibSound",
"language": "GDScript",
"path": "res://gymkhana/addons/escoria-ui-return-monkey-island/esc/commands/play_lib_snd.gd"
}, {
"base": "ESCBaseCommand",
"class": "PlaySndCommand", "class": "PlaySndCommand",
"language": "GDScript", "language": "GDScript",
"path": "res://addons/escoria-core/game/core-scripts/esc/commands/play_snd.gd" "path": "res://addons/escoria-core/game/core-scripts/esc/commands/play_snd.gd"
@@ -544,6 +559,11 @@ _global_script_classes=[ {
"language": "GDScript", "language": "GDScript",
"path": "res://gymkhana/addons/escoria-ui-return-monkey-island-dialog-simple/rtmi_dialog_simple_settings.gd" "path": "res://gymkhana/addons/escoria-ui-return-monkey-island-dialog-simple/rtmi_dialog_simple_settings.gd"
}, { }, {
"base": "Resource",
"class": "RTMIUiSettings",
"language": "GDScript",
"path": "res://gymkhana/addons/escoria-ui-return-monkey-island/rtmi_ui_settings.gd"
}, {
"base": "ESCBaseCommand", "base": "ESCBaseCommand",
"class": "RandGlobalCommand", "class": "RandGlobalCommand",
"language": "GDScript", "language": "GDScript",
@@ -766,6 +786,7 @@ _global_script_class_icons={
"ESCInventoryItem": "", "ESCInventoryItem": "",
"ESCInventoryManager": "", "ESCInventoryManager": "",
"ESCItem": "res://addons/escoria-core/design/esc_item.svg", "ESCItem": "res://addons/escoria-core/design/esc_item.svg",
"ESCItemCountManager": "",
"ESCItemWithTooltip": "res://addons/escoria-core/design/esc_item.svg", "ESCItemWithTooltip": "res://addons/escoria-core/design/esc_item.svg",
"ESCLocation": "res://addons/escoria-core/design/esc_location.svg", "ESCLocation": "res://addons/escoria-core/design/esc_location.svg",
"ESCMain": "", "ESCMain": "",
@@ -809,7 +830,9 @@ _global_script_class_icons={
"IncGlobalCommand": "", "IncGlobalCommand": "",
"InventoryAddCommand": "", "InventoryAddCommand": "",
"InventoryRemoveCommand": "", "InventoryRemoveCommand": "",
"ItemCountAddCommand": "",
"ItemOutline": "res://addons/escoria-core/design/esc_item.svg", "ItemOutline": "res://addons/escoria-core/design/esc_item.svg",
"PlayLibSound": "",
"PlaySndCommand": "", "PlaySndCommand": "",
"PlayVideoCommand": "", "PlayVideoCommand": "",
"PrintCommand": "", "PrintCommand": "",
@@ -817,6 +840,7 @@ _global_script_class_icons={
"QueueResourceCommand": "", "QueueResourceCommand": "",
"RTMISimpleDialogPlugin": "", "RTMISimpleDialogPlugin": "",
"RTMISimpleDialogSettings": "", "RTMISimpleDialogSettings": "",
"RTMIUiSettings": "",
"RandGlobalCommand": "", "RandGlobalCommand": "",
"RepeatCommand": "", "RepeatCommand": "",
"SayCommand": "", "SayCommand": "",
@@ -938,6 +962,7 @@ rtmi_dialog_simple/left_click_action="Speed up"
rtmi_dialog_simple/stop_talking_animation_on="End of audio" rtmi_dialog_simple/stop_talking_animation_on="End of audio"
debug/enable_hover_stack_viewer=true debug/enable_hover_stack_viewer=true
ui/dialogs_chooser="res://addons/escoria-core/game/scenes/dialogs/esc_dialog_options_chooser.gd" ui/dialogs_chooser="res://addons/escoria-core/game/scenes/dialogs/esc_dialog_options_chooser.gd"
rtmi_ui/sound_library_folder="res://gymkhana/sounds/"
[input] [input]