DI proposal

This commit is contained in:
oier committed 2025-03-30 04:15:04 +02:00
1 parent c08e04f00b
commit e8d929bab7
3 files changed
+10 -11

No files matched your search

@@ -1,17 +1,10 @@
# Basic information about an inventory item # Basic information about an inventory item
class_name ESCInventoryItem extends ESCInventoryItem
class_name RTMIESCInventoryItem
# 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
func _init(p_item: ESCItem) -> void: func _init(p_item: ESCItem) -> void:
super._init(p_item)
escoria.logger.info(self, "RTMIESCInventoryItem")
global_id = p_item.global_id global_id = p_item.global_id
texture_normal = p_item._get_inventory_texture() texture_normal = p_item._get_inventory_texture()
texture_hovered = p_item._get_inventory_texture_hovered() 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