Actions in caja_herramientas
This commit is contained in:
@@ -52,7 +52,8 @@ func _get_event_to_queue(
|
|||||||
if target.node is ESCItem \
|
if target.node is ESCItem \
|
||||||
and (action in target.node.combine_when_selected_action_is_in
|
and (action in target.node.combine_when_selected_action_is_in
|
||||||
# MODIFIED FOR RETURN TO MONKEY UI
|
# MODIFIED FOR RETURN TO MONKEY UI
|
||||||
or (combine_with && action in combine_with.node.combine_when_selected_action_is_in)):
|
or combine_with):
|
||||||
|
# or (combine_with && action in combine_with.node.combine_when_selected_action_is_in)):
|
||||||
|
|
||||||
# Check if object must be in inventory to be used
|
# Check if object must be in inventory to be used
|
||||||
if target.node.use_from_inventory_only:
|
if target.node.use_from_inventory_only:
|
||||||
@@ -204,7 +205,7 @@ func perform_inputevent_on_object(
|
|||||||
# depending on the used action verb.
|
# depending on the used action verb.
|
||||||
var tool_just_set = _set_tool_and_action(obj, default_action)
|
var tool_just_set = _set_tool_and_action(obj, default_action)
|
||||||
# MODIFIED FOR RETURN TO MONKEY UI
|
# MODIFIED FOR RETURN TO MONKEY UI
|
||||||
var need_combine = _check_item_needs_combine_obj(obj)
|
var need_combine = _check_item_needs_combine_obj(obj, tool_just_set)
|
||||||
|
|
||||||
# If the current tool was not set, this is our first item, make it the tool
|
# If the current tool was not set, this is our first item, make it the tool
|
||||||
if not current_tool or (current_tool and not need_combine):
|
if not current_tool or (current_tool and not need_combine):
|
||||||
@@ -356,9 +357,10 @@ func _set_tool_and_action(obj: ESCObject, default_action: bool):
|
|||||||
#
|
#
|
||||||
# *Returns* True if current action on "obj" requires a combination
|
# *Returns* True if current action on "obj" requires a combination
|
||||||
# MODIFIED FOR RETURN TO MONKEY UI
|
# MODIFIED FOR RETURN TO MONKEY UI
|
||||||
func _check_item_needs_combine_obj(obj: ESCObject) -> bool:
|
func _check_item_needs_combine_obj(obj: ESCObject, tool_just_set: bool) -> bool:
|
||||||
return current_action \
|
return current_action \
|
||||||
and current_tool \
|
and current_tool \
|
||||||
and (current_action in current_tool.node.combine_when_selected_action_is_in
|
and (current_action in current_tool.node.combine_when_selected_action_is_in
|
||||||
# MODIFIED FOR RETURN TO MONKEY UI
|
# MODIFIED FOR RETURN TO MONKEY UI
|
||||||
or current_action in obj.node.combine_when_selected_action_is_in)
|
or !tool_just_set)
|
||||||
|
# or current_action in obj.node.combine_when_selected_action_is_in)
|
||||||
|
|||||||
@@ -285,6 +285,8 @@ func click_on_inventory_item(item_global_id: String, event: InputEvent, action:
|
|||||||
true
|
true
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Hide tooltip if some action is being performed
|
||||||
|
# if escoria.action_manager.action_state == ESCActionManager.ACTION_INPUT_STATE.COMPLETED:
|
||||||
if (target_obj is ESCItemWithTooltip) && (action == ACTION3 && target_obj.action3_text != "") || (action == ACTION4 && target_obj.action4_text != ""):
|
if (target_obj is ESCItemWithTooltip) && (action == ACTION3 && target_obj.action3_text != "") || (action == ACTION4 && target_obj.action4_text != ""):
|
||||||
$tooltip_layer/tooltip.hide()
|
$tooltip_layer/tooltip.hide()
|
||||||
|
|
||||||
|
|||||||
@@ -10,10 +10,15 @@ extents = Vector2( 22.5, 12.5 )
|
|||||||
pause_mode = 1
|
pause_mode = 1
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
global_id = "i_caja_herramientas"
|
global_id = "i_caja_herramientas"
|
||||||
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 )
|
||||||
animations = null
|
animations = null
|
||||||
|
combine_when_selected_action_is_in = [ "action4" ]
|
||||||
|
use_from_inventory_only = true
|
||||||
|
action1_text = "¿Que es esto?"
|
||||||
|
action2_text = "Coger"
|
||||||
|
action3_text = "Mirar dentro"
|
||||||
|
action4_text = "Usar"
|
||||||
|
|
||||||
[node name="Sprite" type="Sprite" parent="."]
|
[node name="Sprite" type="Sprite" parent="."]
|
||||||
position = Vector2( -2, 0 )
|
position = Vector2( -2, 0 )
|
||||||
|
|||||||
@@ -10,5 +10,3 @@ say player "Es el segundo bolsillo más grande que he visto nunca"
|
|||||||
|
|
||||||
:action4
|
:action4
|
||||||
say player "¡¡Al meterla en mi bolsillo se ha convertido en un dibujo animado!!"
|
say player "¡¡Al meterla en mi bolsillo se ha convertido en un dibujo animado!!"
|
||||||
say player "¿Esto es real?"
|
|
||||||
say player "¿Vivo en Matrix?"
|
|
||||||
|
|||||||
@@ -8,6 +8,3 @@ inventory_add i_caja_herramientas
|
|||||||
|
|
||||||
:action3
|
:action3
|
||||||
say current_player "Hay de too!"
|
say current_player "Hay de too!"
|
||||||
|
|
||||||
:action4
|
|
||||||
say current_player "Hay de too!"
|
|
||||||
@@ -44,9 +44,18 @@ set_global loom_conversation_done false
|
|||||||
!
|
!
|
||||||
#set_gui_visible true
|
#set_gui_visible true
|
||||||
|
|
||||||
|
:action3 i_caja_herramientas
|
||||||
|
say eneko_smoking "No quiero una caja vacía 3"
|
||||||
|
|
||||||
|
:action3
|
||||||
|
say eneko_smoking "Nada"
|
||||||
|
|
||||||
|
:action4 i_caja_herramientas
|
||||||
|
say eneko_smoking "No quiero una caja vacía 4"
|
||||||
|
|
||||||
:action3 i_bombona2
|
:action3 i_bombona2
|
||||||
> [bombona2_offered]
|
> [bombona2_offered]
|
||||||
say eneko_smoking "¡SE ACABÓ, TE HE BLOQUEADO EN WHATSAPP!"
|
say eneko_smoking "¡SE ACABÓ, TE HE BLOQUEADO EN WHATSAPP!"
|
||||||
stop
|
stop
|
||||||
say eneko_smoking "¿Estás loco? ¿No ves que estoy fumando? "
|
say eneko_smoking "¿Estás loco? ¿No ves que estoy fumando?"
|
||||||
set_global bombona2_offered true
|
set_global bombona2_offered true
|
||||||
|
|||||||
@@ -64,8 +64,6 @@ script = ExtResource( 28 )
|
|||||||
global_id = "l_exit"
|
global_id = "l_exit"
|
||||||
esc_script = "res://gymkhana/rooms/trasera_cocina/esc/entrada_cocina.esc"
|
esc_script = "res://gymkhana/rooms/trasera_cocina/esc/entrada_cocina.esc"
|
||||||
is_exit = true
|
is_exit = true
|
||||||
tooltip_name = "Esto es una puerta y tiene una descripcion mu larga"
|
|
||||||
combine_when_selected_action_is_in = [ "action4" ]
|
|
||||||
dialog_color = Color( 1, 1, 1, 1 )
|
dialog_color = Color( 1, 1, 1, 1 )
|
||||||
action1_text = "Esto es una puerta y tiene una descripcion mu larga"
|
action1_text = "Esto es una puerta y tiene una descripcion mu larga"
|
||||||
action2_text = "Entrar! con descricion..."
|
action2_text = "Entrar! con descricion..."
|
||||||
@@ -121,7 +119,7 @@ tooltip_name = "Objervar sujeto"
|
|||||||
dialog_color = Color( 0, 1, 0.462745, 1 )
|
dialog_color = Color( 0, 1, 0.462745, 1 )
|
||||||
action1_text = "Objervar sujeto"
|
action1_text = "Objervar sujeto"
|
||||||
action2_text = "Hablar"
|
action2_text = "Hablar"
|
||||||
action3_target_texts = { "i_bombona2": "Toma, un regalo" }
|
action3_target_texts = { "i_bombona2": "Toma, un regalo", "i_caja_herramientas": "Regalar" }
|
||||||
selectable = true
|
selectable = true
|
||||||
|
|
||||||
[node name="ESCLocation" type="Position2D" parent="EnekoSmoking"]
|
[node name="ESCLocation" type="Position2D" parent="EnekoSmoking"]
|
||||||
@@ -129,14 +127,9 @@ position = Vector2( -169, 179 )
|
|||||||
script = ExtResource( 3 )
|
script = ExtResource( 3 )
|
||||||
global_id = "eneko_smoking"
|
global_id = "eneko_smoking"
|
||||||
|
|
||||||
[node name="ESCItemWithTooltip" parent="." instance=ExtResource( 31 )]
|
[node name="caja_herramientas" parent="." instance=ExtResource( 31 )]
|
||||||
position = Vector2( 707, 422 )
|
|
||||||
esc_script = "res://gymkhana/rooms/trasera_cocina/esc/i_caja_herramientas.esc"
|
esc_script = "res://gymkhana/rooms/trasera_cocina/esc/i_caja_herramientas.esc"
|
||||||
tooltip_name = "¿Que es esto?"
|
position = Vector2( 707, 522 )
|
||||||
action1_text = "¿Que es esto?"
|
|
||||||
action2_text = "Coger"
|
|
||||||
action3_text = "Mirar dentro"
|
|
||||||
action4_text = "Usar"
|
|
||||||
|
|
||||||
[node name="ESCLocation" type="Position2D" parent="ESCItemWithTooltip"]
|
[node name="ESCLocation" type="Position2D" parent="ESCItemWithTooltip"]
|
||||||
position = Vector2( -51, 69 )
|
position = Vector2( -51, 69 )
|
||||||
|
|||||||
Reference in New Issue
Block a user