Revert "Empty"

This reverts commit b98fdd0f29.
This commit is contained in:
2025-05-01 19:08:20 -05:00
parent b98fdd0f29
commit dd5ba6f414
137 changed files with 2021 additions and 0 deletions

36
scripts/Item/Item.gd Normal file
View File

@@ -0,0 +1,36 @@
class_name Item
enum ItemCategory {
MEDICINE,
KEY_ITEM,
INGREDIENT
};
func getName() -> String:
push_error("getName() must be overridden in derived classes");
return "";
func isStackable() -> bool:
return true;
func isDroppable() -> bool:
return true;
func isSellable() -> bool:
return true;
func getSellPrice() -> int:
return 0;
func getBuyPrice() -> int:
return 0;
func isConsumable() -> bool:
return false;
func consume() -> void:
pass
func getCategory() -> ItemCategory:
push_error("getCategory() must be overriden in derived class");
return ItemCategory.MEDICINE;

1
scripts/Item/Item.gd.uid Normal file
View File

@@ -0,0 +1 @@
uid://c6t5tprnd23t0

View File

@@ -0,0 +1,8 @@
class_name ItemStack
var item:Item;
var quantity:int;
func _init(item:Item, quantity:int = 1):
self.item = item;
self.quantity = quantity;

View File

@@ -0,0 +1 @@
uid://re7dg4hpp804

13
scripts/Item/Potion.gd Normal file
View File

@@ -0,0 +1,13 @@
class_name Potion extends "res://scripts/Item/Item.gd"
func getName() -> String:
return "Potion"
func getCategory() -> ItemCategory:
return ItemCategory.MEDICINE;
func isConsumable() -> bool:
return true;
func consume() -> void:
print("Consuming Potion");

View File

@@ -0,0 +1 @@
uid://dpns5iesd08rl