fix: Corrected variable name (#428)
Co-authored-by: Dennis Ploeger <develop@dieploegers.de>
This commit is contained in:
@@ -53,7 +53,7 @@ func activate(
|
||||
|
||||
# If we're using an action which item requires to combine
|
||||
if target.node is ESCItem\
|
||||
and action in target.node.combine_if_action_used_among:
|
||||
and action in target.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):
|
||||
|
||||
@@ -221,7 +221,7 @@ func _check_item_needs_combine(obj: ESCObject, default_action: bool) -> bool:
|
||||
if escoria.action_manager.current_action and \
|
||||
escoria.action_manager.current_tool:
|
||||
if escoria.action_manager.current_action in escoria.action_manager\
|
||||
.current_tool.node.combine_if_action_used_among:
|
||||
.current_tool.node.combine_when_selected_action_is_in:
|
||||
need_combine = true
|
||||
else:
|
||||
escoria.action_manager.current_tool = obj
|
||||
@@ -233,7 +233,7 @@ func _check_item_needs_combine(obj: ESCObject, default_action: bool) -> bool:
|
||||
escoria.action_manager.current_action = \
|
||||
obj.node.default_action
|
||||
elif escoria.action_manager.current_action in \
|
||||
obj.node.combine_if_action_used_among:
|
||||
obj.node.combine_when_selected_action_is_in:
|
||||
escoria.action_manager.current_tool = obj
|
||||
return need_combine
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ export(String) var default_action_inventory
|
||||
# If action used by player is in this list, the game will wait for a second
|
||||
# click on another item to combine objects together (typical
|
||||
# `USE <X> WITH <Y>`, `GIVE <X> TO <Y>`)
|
||||
export(PoolStringArray) var combine_if_action_used_among = []
|
||||
export(PoolStringArray) var combine_when_selected_action_is_in = []
|
||||
|
||||
# If true, combination must be done in the way it is written in ESC script
|
||||
# ie. :use ON_ITEM
|
||||
|
||||
@@ -65,13 +65,12 @@ tracks/0/keys = {
|
||||
}
|
||||
|
||||
[node name="button" type="Area2D"]
|
||||
pause_mode = 1
|
||||
script = ExtResource( 1 )
|
||||
tooltip_name = "Button"
|
||||
default_action = "use"
|
||||
dialog_color = Color( 1, 1, 1, 1 )
|
||||
interact_positions = {
|
||||
"default": Vector2( 0, 0 )
|
||||
}
|
||||
animations = null
|
||||
|
||||
[node name="lines" type="Line2D" parent="."]
|
||||
position = Vector2( 0, -266.591 )
|
||||
|
||||
@@ -14,7 +14,7 @@ esc_script = "res://game/items/inventory/empty_sheet.esc"
|
||||
tooltip_name = "Empty sheet"
|
||||
default_action = "look"
|
||||
default_action_inventory = "look"
|
||||
combine_if_action_used_among = PoolStringArray( "use", "give" )
|
||||
combine_when_selected_action_is_in = PoolStringArray( "use", "give" )
|
||||
use_from_inventory_only = true
|
||||
inventory_texture = ExtResource( 3 )
|
||||
dialog_color = Color( 1, 1, 1, 1 )
|
||||
|
||||
@@ -11,7 +11,7 @@ script = ExtResource( 1 )
|
||||
global_id = "r5_filled_sheet"
|
||||
esc_script = "res://game/items/inventory/filled_sheet.esc"
|
||||
tooltip_name = "Filled sheet"
|
||||
combine_if_action_used_among = PoolStringArray( "use", "give" )
|
||||
combine_when_selected_action_is_in = PoolStringArray( "use", "give" )
|
||||
combine_is_one_way = true
|
||||
use_from_inventory_only = true
|
||||
inventory_texture = ExtResource( 3 )
|
||||
|
||||
@@ -14,7 +14,7 @@ esc_script = "res://game/items/inventory/pen.esc"
|
||||
tooltip_name = "Pen"
|
||||
default_action = "look"
|
||||
default_action_inventory = "look"
|
||||
combine_if_action_used_among = PoolStringArray( "use", "give" )
|
||||
combine_when_selected_action_is_in = PoolStringArray( "use", "give" )
|
||||
use_from_inventory_only = true
|
||||
inventory_texture = ExtResource( 1 )
|
||||
dialog_color = Color( 1, 1, 1, 1 )
|
||||
|
||||
@@ -14,7 +14,7 @@ esc_script = "res://game/items/inventory/wrench.esc"
|
||||
tooltip_name = "Wrench"
|
||||
default_action = "look"
|
||||
default_action_inventory = "look"
|
||||
combine_if_action_used_among = PoolStringArray( "use" )
|
||||
combine_when_selected_action_is_in = PoolStringArray( "use" )
|
||||
use_from_inventory_only = true
|
||||
inventory_texture = ExtResource( 3 )
|
||||
dialog_color = Color( 1, 1, 1, 1 )
|
||||
|
||||
@@ -15,7 +15,7 @@ esc_script = "res://game/items/inventory/bottle.esc"
|
||||
tooltip_name = "Bottle"
|
||||
default_action = "pickup"
|
||||
default_action_inventory = "look"
|
||||
combine_if_action_used_among = PoolStringArray( "use" )
|
||||
combine_when_selected_action_is_in = PoolStringArray( "use" )
|
||||
use_from_inventory_only = true
|
||||
inventory_texture = ExtResource( 1 )
|
||||
dialog_color = Color( 1, 1, 1, 1 )
|
||||
|
||||
Reference in New Issue
Block a user