Se nos viene la olla
This commit is contained in:
@@ -7,35 +7,35 @@ var isHighlighted: bool
|
||||
var lastHighlightState: bool
|
||||
|
||||
func get_component_type():
|
||||
return "outline"
|
||||
return "outline"
|
||||
|
||||
func _ready():
|
||||
var collision = get_parent().collision
|
||||
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))
|
||||
collision.add_child(outline)
|
||||
outline.hide()
|
||||
var collision = get_parent().collision
|
||||
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))
|
||||
collision.add_child(outline)
|
||||
outline.hide()
|
||||
|
||||
|
||||
func highlight(value: bool):
|
||||
isHighlighted = value
|
||||
isHighlighted = value
|
||||
|
||||
func _process(_delta: float):
|
||||
if not escoria.action_manager.is_object_actionable(get_global_id()):
|
||||
return
|
||||
if isHighlighted != lastHighlightState:
|
||||
if isHighlighted:
|
||||
outline.show()
|
||||
else:
|
||||
outline.hide()
|
||||
lastHighlightState = isHighlighted
|
||||
# if not escoria.action_manager.is_object_actionable(get_global_id()):
|
||||
# return
|
||||
if isHighlighted != lastHighlightState:
|
||||
if isHighlighted:
|
||||
outline.show()
|
||||
else:
|
||||
outline.hide()
|
||||
lastHighlightState = isHighlighted
|
||||
|
||||
func _input(event):
|
||||
if(event.is_action_pressed("ui_show_hints")):
|
||||
highlight(true)
|
||||
elif (event.is_action_released("ui_show_hints")):
|
||||
highlight(false)
|
||||
if(event.is_action_pressed("ui_show_hints")):
|
||||
highlight(true)
|
||||
elif (event.is_action_released("ui_show_hints")):
|
||||
highlight(false)
|
||||
|
||||
2
gymkhana/items/inventory/turno_cocina_olla_llena.esc
Normal file
2
gymkhana/items/inventory/turno_cocina_olla_llena.esc
Normal file
@@ -0,0 +1,2 @@
|
||||
:action3
|
||||
say player "Está llena de agua."
|
||||
29
gymkhana/items/inventory/turno_cocina_olla_llena.tscn
Normal file
29
gymkhana/items/inventory/turno_cocina_olla_llena.tscn
Normal file
@@ -0,0 +1,29 @@
|
||||
[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_olla_inv_con_agua.png" type="Texture" id=2]
|
||||
|
||||
[node name="turno_cocina_olla_llena" type="Area2D"]
|
||||
pause_mode = 1
|
||||
script = ExtResource( 1 )
|
||||
global_id = "turno_cocina_olla_llena"
|
||||
esc_script = "res://gymkhana/items/inventory/turno_cocina_olla_llena.esc"
|
||||
combine_when_selected_action_is_in = [ "action4" ]
|
||||
inventory_texture = ExtResource( 2 )
|
||||
dialog_color = Color( 1, 1, 1, 1 )
|
||||
tooltips = {
|
||||
"action1": "Mirar dentro",
|
||||
"action3": "Mirar",
|
||||
"action4": "Poner encima de la económica"
|
||||
}
|
||||
action4_target_texts = {
|
||||
"turno_cocina_ajo": "Echar en la olla.",
|
||||
"turno_cocina_bol_lentejas": "Echar en la olla.",
|
||||
"turno_cocina_patata": "Echar en la olla.",
|
||||
"turno_cocina_romero": "Echar en la olla."
|
||||
}
|
||||
target_when_selected_action_is_in = [ "action4" ]
|
||||
animations = null
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
|
||||
polygon = PoolVector2Array( -18, -4, -5, 18, 17, 4, 20, -13, -12, -29 )
|
||||
12
gymkhana/items/inventory/turno_cocina_olla_vacia.esc
Normal file
12
gymkhana/items/inventory/turno_cocina_olla_vacia.esc
Normal file
@@ -0,0 +1,12 @@
|
||||
:action1
|
||||
say player "Una olla estupenda para hacer lentejas."
|
||||
|
||||
:action2
|
||||
say current_player "Podria ser útil!!"
|
||||
set_active turno_cocina_olla_vacia false
|
||||
inventory_add turno_cocina_olla_vacia
|
||||
|
||||
:action3
|
||||
say player "Está vacia."
|
||||
|
||||
|
||||
27
gymkhana/items/inventory/turno_cocina_olla_vacia.tscn
Normal file
27
gymkhana/items/inventory/turno_cocina_olla_vacia.tscn
Normal file
@@ -0,0 +1,27 @@
|
||||
[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_olla_inv_vacia.png" type="Texture" id=2]
|
||||
[ext_resource path="res://gymkhana/items/inventory/assets/turno_cocina_olla.png" type="Texture" id=3]
|
||||
|
||||
[node name="turno_cocina_olla_vacia" type="Area2D"]
|
||||
pause_mode = 1
|
||||
script = ExtResource( 1 )
|
||||
global_id = "turno_cocina_olla_vacia"
|
||||
esc_script = "res://gymkhana/items/inventory/turno_cocina_olla_vacia.esc"
|
||||
combine_when_selected_action_is_in = [ "action4" ]
|
||||
inventory_texture = ExtResource( 2 )
|
||||
dialog_color = Color( 1, 1, 1, 1 )
|
||||
tooltips = {
|
||||
"action1": "Mirar",
|
||||
"action2": "Coger",
|
||||
"action3": "Mirar",
|
||||
"action4": "Llenar de agua"
|
||||
}
|
||||
animations = null
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
texture = ExtResource( 3 )
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
|
||||
polygon = PoolVector2Array( -59, 41, -59, -44, -63, -48, -62, -52, -59, -54, -49, -58, -34, -60, -16, -62, 1, -61, 21, -60, 44, -57, 57, -53, 61, -47, 58, -41, 56, -29, 62, -29, 64, -27, 58, -25, 56, -21, 53, 33, 50, 44, 44, 52, 33, 55, 12, 59, -12, 59, -40, 56, -54, 50 )
|
||||
@@ -135,8 +135,7 @@ tooltips = {
|
||||
"action2": "Usar"
|
||||
}
|
||||
action3_target_texts = {
|
||||
"turno_cocina_bol": "Llenar el bol de agua",
|
||||
"turno_cocina_bol_lentejas": "Llenar el bol de agua"
|
||||
"turno_cocina_olla_vacia": "Llenar la olla de agua"
|
||||
}
|
||||
target_when_selected_action_is_in = [ "action3" ]
|
||||
animations = null
|
||||
@@ -145,7 +144,7 @@ animations = null
|
||||
polygon = PoolVector2Array( 2327, 294, 2395, 296, 2401, 290, 2367, 286, 2365, 260, 2362, 259, 2362, 278, 2356, 286, 2334, 286 )
|
||||
|
||||
[node name="ESCLocation" type="Position2D" parent="fregadero_der"]
|
||||
position = Vector2( 2322, 300 )
|
||||
position = Vector2( 1855, 400 )
|
||||
script = ExtResource( 5 )
|
||||
|
||||
[node name="fregadero_izq" type="Area2D" parent="."]
|
||||
@@ -153,15 +152,14 @@ pause_mode = 1
|
||||
script = ExtResource( 6 )
|
||||
global_id = "cocina_fregadero_izq"
|
||||
esc_script = "res://gymkhana/rooms/turno_cocina/cocina/esc/fregadero_izq.esc"
|
||||
combine_when_selected_action_is_in = [ ]
|
||||
combine_when_selected_action_is_in = [ "action4" ]
|
||||
dialog_color = Color( 1, 1, 1, 1 )
|
||||
tooltips = {
|
||||
"action1": "Mirar el fregadero",
|
||||
"action2": "Usar"
|
||||
}
|
||||
action3_target_texts = {
|
||||
"turno_cocina_bol": "Llenar el bol de agua",
|
||||
"turno_cocina_bol_lentejas": "Llenar el bol de agua"
|
||||
"turno_cocina_olla_vacia": "Llenar la olla de agua"
|
||||
}
|
||||
target_when_selected_action_is_in = [ "action3" ]
|
||||
animations = null
|
||||
@@ -170,7 +168,7 @@ animations = null
|
||||
polygon = PoolVector2Array( 1800, 276, 1804, 280, 1895, 273, 1883, 266, 1863, 267, 1839, 268, 1835, 264, 1835, 259, 1838, 254, 1848, 248, 1854, 252, 1858, 252, 1856, 246, 1851, 244, 1843, 247, 1836, 251, 1831, 258, 1830, 263, 1828, 265, 1826, 264, 1823, 265, 1822, 269, 1824, 270, 1822, 272, 1809, 272, 1798, 273 )
|
||||
|
||||
[node name="ESCLocation" type="Position2D" parent="fregadero_izq"]
|
||||
position = Vector2( 1800, 300 )
|
||||
position = Vector2( 2370, 395 )
|
||||
script = ExtResource( 5 )
|
||||
|
||||
[node name="cuchillos" type="Area2D" parent="."]
|
||||
|
||||
@@ -2,12 +2,9 @@
|
||||
say player "Parece que funciona."
|
||||
:action2
|
||||
say player "No tengo donde meter el agua."
|
||||
:action3 turno_cocina_bol_lentejas
|
||||
play_lib_snd cocina_fregader_der
|
||||
|
||||
:action3 turno_cocina_olla_vacia
|
||||
# play_lib_snd cocina_fregader_izq
|
||||
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
|
||||
set_active cocina_fregadero_izq false
|
||||
:action3 turno_cocina_bol
|
||||
say player "Mejor meter las lentejas primero."
|
||||
inventory_remove turno_cocina_olla_vacia
|
||||
inventory_add turno_cocina_olla_llena
|
||||
@@ -1,13 +1,11 @@
|
||||
:action1
|
||||
say player "Parece que funciona."
|
||||
|
||||
:action2
|
||||
say player "No tengo donde meter el agua."
|
||||
:action3 turno_cocina_bol_lentejas
|
||||
play_lib_snd cocina_fregader_izq
|
||||
|
||||
:action3 turno_cocina_olla_vacia
|
||||
# play_lib_snd cocina_fregader_izq
|
||||
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
|
||||
set_active cocina_fregadero_izq false
|
||||
:action3 turno_cocina_bol
|
||||
say player "Mejor meter las lentejas primero."
|
||||
inventory_remove turno_cocina_olla_vacia
|
||||
inventory_add turno_cocina_olla_llena
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=10 format=2]
|
||||
[gd_scene load_steps=11 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]
|
||||
@@ -8,6 +8,7 @@
|
||||
[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/rooms/turno_cocina/cocina_detras/assets/depth.png" type="Texture" id=7]
|
||||
[ext_resource path="res://gymkhana/rooms/turno_cocina/cocina_detras/assets/columna.png" type="Texture" id=8]
|
||||
[ext_resource path="res://gymkhana/items/inventory/turno_cocina_olla_vacia.tscn" type="PackedScene" id=9]
|
||||
|
||||
[sub_resource type="NavigationPolygon" id=1]
|
||||
vertices = PoolVector2Array( -1104, 183, -1146, 112, -1013, 114, -864, 131, -787, 150, -717, 189, 44, 171, 37, 137, 169, 158, 177, 170, 184, 248, 169, 316, 246, 170, 246, 233, -236, 229, -1093, 316, -598, 200, -852, 111, -790, 115, -519, 186, -392, 198 )
|
||||
@@ -42,9 +43,10 @@ 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 )
|
||||
tooltips = {
|
||||
"action1": "Entrar en la cocina"
|
||||
"action1": "Entrar en la cocina"
|
||||
}
|
||||
animations = null
|
||||
|
||||
@@ -64,9 +66,10 @@ 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 )
|
||||
tooltips = {
|
||||
"action1": "Ir delante"
|
||||
"action1": "Ir delante"
|
||||
}
|
||||
animations = null
|
||||
|
||||
@@ -84,3 +87,11 @@ global_id = "puerta_delante_start"
|
||||
position = Vector2( 235, 294 )
|
||||
z_index = 400
|
||||
texture = ExtResource( 8 )
|
||||
|
||||
[node name="turno_cocina_olla_vacia" parent="." instance=ExtResource( 9 )]
|
||||
position = Vector2( 883, 451 )
|
||||
scale = Vector2( 0.5, 0.5 )
|
||||
|
||||
[node name="ESCLocation" type="Position2D" parent="turno_cocina_olla_vacia"]
|
||||
position = Vector2( 1, 96 )
|
||||
script = ExtResource( 5 )
|
||||
|
||||
Reference in New Issue
Block a user