DI proposal
This commit is contained in:
@@ -1,17 +1,10 @@
|
||||
# Basic information about an inventory item
|
||||
class_name ESCInventoryItem
|
||||
|
||||
# Global ID of the ESCItem that uses this ESCInventoryItem
|
||||
var global_id: String = ""
|
||||
|
||||
# The texture for the item
|
||||
var texture_normal: Texture2D = null
|
||||
|
||||
# The texture for the item when hovered
|
||||
var texture_hovered: Texture2D = null
|
||||
|
||||
extends ESCInventoryItem
|
||||
class_name RTMIESCInventoryItem
|
||||
|
||||
func _init(p_item: ESCItem) -> void:
|
||||
super._init(p_item)
|
||||
escoria.logger.info(self, "RTMIESCInventoryItem")
|
||||
global_id = p_item.global_id
|
||||
texture_normal = p_item._get_inventory_texture()
|
||||
texture_hovered = p_item._get_inventory_texture_hovered()
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
extends ESCDependencyInjector
|
||||
class_name RTMIDependencyInjector
|
||||
|
||||
func esc_inventory_item(p_item: ESCItem):
|
||||
return RTMIESCInventoryItem.new(p_item)
|
||||
@@ -0,0 +1 @@
|
||||
uid://c36wcxfrllwiu
|
||||
Reference in New Issue
Block a user