Fix: tried to fix compiling errors in esc_item_with_tooltip.gd
This commit is contained in:
@@ -28,6 +28,11 @@ export(Array) var target_when_selected_action_is_in = []
|
|||||||
# If item is countable (E.g. money) marks the quantity
|
# If item is countable (E.g. money) marks the quantity
|
||||||
export(int) var count = 0
|
export(int) var count = 0
|
||||||
|
|
||||||
|
# ESCItemComponents children of this node
|
||||||
|
var components: Dictionary = {}
|
||||||
|
|
||||||
|
var custom_data: Dictionary = {}
|
||||||
|
|
||||||
# If item is countable (E.g. money) marks which texture to use depending of count value.
|
# If item is countable (E.g. money) marks which texture to use depending of count value.
|
||||||
# Each element is a Dictionary with start and texture keys:
|
# Each element is a Dictionary with start and texture keys:
|
||||||
# [
|
# [
|
||||||
@@ -96,10 +101,10 @@ func _input(event):
|
|||||||
if(!active):
|
if(!active):
|
||||||
highlight(false)
|
highlight(false)
|
||||||
|
|
||||||
func has_component(key: String)->bool:
|
func has_component(key: String)->bool:
|
||||||
return components.has(key)
|
return components.has(key)
|
||||||
|
|
||||||
func get_component(key: String):
|
func get_component(key: String):
|
||||||
if(has_component(key)):
|
if(has_component(key)):
|
||||||
return components[key]
|
return components[key]
|
||||||
return null
|
return null
|
||||||
@@ -110,4 +115,3 @@ func register_components():
|
|||||||
child = child as ESCItemComponent
|
child = child as ESCItemComponent
|
||||||
components[child.get_component_type()] = child
|
components[child.get_component_type()] = child
|
||||||
child.register(custom_data)
|
child.register(custom_data)
|
||||||
|
|
||||||
@@ -284,6 +284,11 @@ _global_script_classes=[ {
|
|||||||
"language": "GDScript",
|
"language": "GDScript",
|
||||||
"path": "res://addons/escoria-core/game/core-scripts/esc_item.gd"
|
"path": "res://addons/escoria-core/game/core-scripts/esc_item.gd"
|
||||||
}, {
|
}, {
|
||||||
|
"base": "Node",
|
||||||
|
"class": "ESCItemComponent",
|
||||||
|
"language": "GDScript",
|
||||||
|
"path": "res://gymkhana/addons/escoria-ui-return-monkey-island/item_components/ESCItemComponent.gd"
|
||||||
|
}, {
|
||||||
"base": "Resource",
|
"base": "Resource",
|
||||||
"class": "ESCItemCountManager",
|
"class": "ESCItemCountManager",
|
||||||
"language": "GDScript",
|
"language": "GDScript",
|
||||||
@@ -785,6 +790,7 @@ _global_script_class_icons={
|
|||||||
"ESCInventoryItem": "",
|
"ESCInventoryItem": "",
|
||||||
"ESCInventoryManager": "",
|
"ESCInventoryManager": "",
|
||||||
"ESCItem": "res://addons/escoria-core/design/esc_item.svg",
|
"ESCItem": "res://addons/escoria-core/design/esc_item.svg",
|
||||||
|
"ESCItemComponent": "",
|
||||||
"ESCItemCountManager": "",
|
"ESCItemCountManager": "",
|
||||||
"ESCItemWithTooltip": "res://addons/escoria-core/design/esc_item.svg",
|
"ESCItemWithTooltip": "res://addons/escoria-core/design/esc_item.svg",
|
||||||
"ESCLocation": "res://addons/escoria-core/design/esc_location.svg",
|
"ESCLocation": "res://addons/escoria-core/design/esc_location.svg",
|
||||||
|
|||||||
Reference in New Issue
Block a user