item again
This commit is contained in:
@@ -1,36 +1,41 @@
|
||||
class_name Item
|
||||
|
||||
enum ItemType {
|
||||
POTION,
|
||||
ONION
|
||||
};
|
||||
|
||||
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 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;
|
||||
# func getCategory() -> ItemCategory:
|
||||
# push_error("getCategory() must be overriden in derived class");
|
||||
# return ItemCategory.MEDICINE;
|
Reference in New Issue
Block a user