Erase all references to use_from_inventory_only
This commit is contained in:
@@ -55,10 +55,8 @@ func _get_event_to_queue(
|
|||||||
or combine_with):
|
or combine_with):
|
||||||
# or (combine_with && action in combine_with.node.combine_when_selected_action_is_in)):
|
# or (combine_with && action in combine_with.node.combine_when_selected_action_is_in)):
|
||||||
|
|
||||||
# Check if object must be in inventory to be used
|
|
||||||
if target.node.use_from_inventory_only:
|
|
||||||
if escoria.inventory_manager.inventory_has(target.global_id):
|
|
||||||
# Player has item in inventory, we check the element to use on
|
# Player has item in inventory, we check the element to use on
|
||||||
|
if escoria.inventory_manager.inventory_has(target.global_id):
|
||||||
if combine_with:
|
if combine_with:
|
||||||
var target_event = "%s %s" % [
|
var target_event = "%s %s" % [
|
||||||
action,
|
action,
|
||||||
@@ -101,17 +99,6 @@ func _get_event_to_queue(
|
|||||||
self,
|
self,
|
||||||
"Invalid action: " + str(errors)
|
"Invalid action: " + str(errors)
|
||||||
)
|
)
|
||||||
else:
|
|
||||||
escoria.logger.warn(
|
|
||||||
self,
|
|
||||||
"Invalid action on item: " +
|
|
||||||
"Trying to run action %s on object %s, " %
|
|
||||||
[
|
|
||||||
action,
|
|
||||||
target.node.global_id
|
|
||||||
]
|
|
||||||
+ "but item must be in inventory."
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
if target.events.has(action):
|
if target.events.has(action):
|
||||||
event_to_return = target.events[action]
|
event_to_return = target.events[action]
|
||||||
@@ -221,12 +208,7 @@ func perform_inputevent_on_object(
|
|||||||
current_target
|
current_target
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
# Check if object must be in inventory to be used and update
|
if need_combine:
|
||||||
# action state if necessary
|
|
||||||
if obj.node.use_from_inventory_only and \
|
|
||||||
escoria.inventory_manager.inventory_has(obj.global_id) and \
|
|
||||||
need_combine:
|
|
||||||
|
|
||||||
# We're missing a target here for our tool to be used on
|
# We're missing a target here for our tool to be used on
|
||||||
current_tool = obj
|
current_tool = obj
|
||||||
set_action_input_state(
|
set_action_input_state(
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ script = ExtResource( 1 )
|
|||||||
global_id = "caja_herramientas"
|
global_id = "caja_herramientas"
|
||||||
esc_script = "res://gymkhana/items/inventory/caja_herramientas.esc"
|
esc_script = "res://gymkhana/items/inventory/caja_herramientas.esc"
|
||||||
combine_when_selected_action_is_in = [ "action4" ]
|
combine_when_selected_action_is_in = [ "action4" ]
|
||||||
use_from_inventory_only = true
|
|
||||||
inventory_texture = ExtResource( 2 )
|
inventory_texture = ExtResource( 2 )
|
||||||
dialog_color = Color( 1, 1, 1, 1 )
|
dialog_color = Color( 1, 1, 1, 1 )
|
||||||
action1_text = "¿Que es esto?"
|
action1_text = "¿Que es esto?"
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ action2_text = "Coger"
|
|||||||
action3_text = "¿Que es esto?"
|
action3_text = "¿Que es esto?"
|
||||||
action4_text = "Usar"
|
action4_text = "Usar"
|
||||||
combine_when_selected_action_is_in = [ "action4" ]
|
combine_when_selected_action_is_in = [ "action4" ]
|
||||||
use_from_inventory_only = true
|
|
||||||
inventory_texture = ExtResource( 1 )
|
inventory_texture = ExtResource( 1 )
|
||||||
dialog_color = Color( 1, 1, 1, 1 )
|
dialog_color = Color( 1, 1, 1, 1 )
|
||||||
animations = null
|
animations = null
|
||||||
|
|||||||
@@ -3,8 +3,7 @@ say current_player "Tiene pinta de que fuma"
|
|||||||
|
|
||||||
:action2
|
:action2
|
||||||
> [whatsapp_blocked]
|
> [whatsapp_blocked]
|
||||||
say current_player "Hola"
|
say current_player "Hola..."
|
||||||
say current_player "..."
|
|
||||||
say current_player "No me escucha, parece que me tiene bloqueado"
|
say current_player "No me escucha, parece que me tiene bloqueado"
|
||||||
stop
|
stop
|
||||||
|
|
||||||
|
|||||||
@@ -105,7 +105,6 @@ script = ExtResource( 28 )
|
|||||||
global_id = "bombona2"
|
global_id = "bombona2"
|
||||||
esc_script = "res://gymkhana/items/inventory/bombona2.esc"
|
esc_script = "res://gymkhana/items/inventory/bombona2.esc"
|
||||||
combine_when_selected_action_is_in = [ "action3" ]
|
combine_when_selected_action_is_in = [ "action3" ]
|
||||||
use_from_inventory_only = true
|
|
||||||
inventory_texture = ExtResource( 29 )
|
inventory_texture = ExtResource( 29 )
|
||||||
dialog_color = Color( 1, 1, 1, 1 )
|
dialog_color = Color( 1, 1, 1, 1 )
|
||||||
action1_text = "Mirar bombona"
|
action1_text = "Mirar bombona"
|
||||||
|
|||||||
Reference in New Issue
Block a user