This commit is contained in:
2025-05-14 22:52:12 -05:00
parent 151d93e433
commit 7f61528100
3 changed files with 9 additions and 10 deletions

View File

@@ -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()
self.queue_free()

View File

@@ -1,4 +0,0 @@
enum ItemType {
POTION,
ONION
}

View File

@@ -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();