diff --git a/scripts/Entity/OnionSprig.gd b/scripts/Entity/OnionSprig.gd index 5681a1b..9a7bcb0 100644 --- a/scripts/Entity/OnionSprig.gd +++ b/scripts/Entity/OnionSprig.gd @@ -1,7 +1,5 @@ class_name OnionSprig extends StaticBody3D -@export var itemType:ItemType = ItemType.ONION; - func _ready() -> void: $Entity/EntityInteractable.onInteract.connect( self.onEntityInteract @@ -20,4 +18,4 @@ func onEntityInteract( # Dispose self get_parent().remove_child(self) - self.queue_free() \ No newline at end of file + self.queue_free() diff --git a/scripts/Item/ItemType.gd b/scripts/Item/ItemType.gd index 9f5247b..e69de29 100644 --- a/scripts/Item/ItemType.gd +++ b/scripts/Item/ItemType.gd @@ -1,4 +0,0 @@ -enum ItemType { - POTION, - ONION -} \ No newline at end of file diff --git a/scripts/Singleton/Item.gd b/scripts/Singleton/Item.gd index 0528d1a..77f7635 100644 --- a/scripts/Singleton/Item.gd +++ b/scripts/Singleton/Item.gd @@ -1,9 +1,14 @@ extends Node const Inventory = preload("res://scripts/Item/Inventory.gd") -# Item Constants -static var POTION = preload("res://scripts/Item/Potion.gd").new(); -static var ONION = preload("res://scripts/Item/Ingredient/Onion.gd").new(); +# # Item Constants +# static var POTION = preload("res://scripts/Item/Potion.gd").new(); +# static var ONION = preload("res://scripts/Item/Ingredient/Onion.gd").new(); + +enum ItemType { + POTION, + ONION +}; # Static inventories static var PLAYER_INVENTORY = Inventory.new();