fix: Corrected variable name (#428)

Co-authored-by: Dennis Ploeger <develop@dieploegers.de>
This commit is contained in:
Dennis Ploeger
2021-11-02 16:32:46 +01:00
committed by GitHub
parent e39483c0f5
commit d42c973369
9 changed files with 11 additions and 12 deletions

View File

@@ -53,7 +53,7 @@ func activate(
# If we're using an action which item requires to combine # If we're using an action which item requires to combine
if target.node is ESCItem\ 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 # Check if object must be in inventory to be used
if target.node.use_from_inventory_only: if target.node.use_from_inventory_only:
if escoria.inventory_manager.inventory_has(target.global_id): if escoria.inventory_manager.inventory_has(target.global_id):

View File

@@ -221,7 +221,7 @@ func _check_item_needs_combine(obj: ESCObject, default_action: bool) -> bool:
if escoria.action_manager.current_action and \ if escoria.action_manager.current_action and \
escoria.action_manager.current_tool: escoria.action_manager.current_tool:
if escoria.action_manager.current_action in escoria.action_manager\ 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 need_combine = true
else: else:
escoria.action_manager.current_tool = obj 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 = \ escoria.action_manager.current_action = \
obj.node.default_action obj.node.default_action
elif escoria.action_manager.current_action in \ 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 escoria.action_manager.current_tool = obj
return need_combine return need_combine

View File

@@ -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 # 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 # click on another item to combine objects together (typical
# `USE <X> WITH <Y>`, `GIVE <X> TO <Y>`) # `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 # If true, combination must be done in the way it is written in ESC script
# ie. :use ON_ITEM # ie. :use ON_ITEM

View File

@@ -65,13 +65,12 @@ tracks/0/keys = {
} }
[node name="button" type="Area2D"] [node name="button" type="Area2D"]
pause_mode = 1
script = ExtResource( 1 ) script = ExtResource( 1 )
tooltip_name = "Button" tooltip_name = "Button"
default_action = "use" default_action = "use"
dialog_color = Color( 1, 1, 1, 1 ) dialog_color = Color( 1, 1, 1, 1 )
interact_positions = { animations = null
"default": Vector2( 0, 0 )
}
[node name="lines" type="Line2D" parent="."] [node name="lines" type="Line2D" parent="."]
position = Vector2( 0, -266.591 ) position = Vector2( 0, -266.591 )

View File

@@ -14,7 +14,7 @@ esc_script = "res://game/items/inventory/empty_sheet.esc"
tooltip_name = "Empty sheet" tooltip_name = "Empty sheet"
default_action = "look" default_action = "look"
default_action_inventory = "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 use_from_inventory_only = true
inventory_texture = ExtResource( 3 ) inventory_texture = ExtResource( 3 )
dialog_color = Color( 1, 1, 1, 1 ) dialog_color = Color( 1, 1, 1, 1 )

View File

@@ -11,7 +11,7 @@ script = ExtResource( 1 )
global_id = "r5_filled_sheet" global_id = "r5_filled_sheet"
esc_script = "res://game/items/inventory/filled_sheet.esc" esc_script = "res://game/items/inventory/filled_sheet.esc"
tooltip_name = "Filled sheet" 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 combine_is_one_way = true
use_from_inventory_only = true use_from_inventory_only = true
inventory_texture = ExtResource( 3 ) inventory_texture = ExtResource( 3 )

View File

@@ -14,7 +14,7 @@ esc_script = "res://game/items/inventory/pen.esc"
tooltip_name = "Pen" tooltip_name = "Pen"
default_action = "look" default_action = "look"
default_action_inventory = "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 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 )

View File

@@ -14,7 +14,7 @@ esc_script = "res://game/items/inventory/wrench.esc"
tooltip_name = "Wrench" tooltip_name = "Wrench"
default_action = "look" default_action = "look"
default_action_inventory = "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 use_from_inventory_only = true
inventory_texture = ExtResource( 3 ) inventory_texture = ExtResource( 3 )
dialog_color = Color( 1, 1, 1, 1 ) dialog_color = Color( 1, 1, 1, 1 )

View File

@@ -15,7 +15,7 @@ esc_script = "res://game/items/inventory/bottle.esc"
tooltip_name = "Bottle" tooltip_name = "Bottle"
default_action = "pickup" default_action = "pickup"
default_action_inventory = "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 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 )