From 01344a9d1d2c8b4b7e9b0a0067830693f1203424 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Thu, 18 Jan 2024 01:56:41 +0300 Subject: [PATCH] added ItemDef.stackSize --- src/content/ContentLoader.cpp | 1 + src/items/ItemDef.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/content/ContentLoader.cpp b/src/content/ContentLoader.cpp index d0cd7e90..20050e58 100644 --- a/src/content/ContentLoader.cpp +++ b/src/content/ContentLoader.cpp @@ -233,6 +233,7 @@ void ContentLoader::loadItem(ItemDef* def, std::string name, fs::path file) { } root->str("icon", def->icon); root->str("placing-block", def->placingBlock); + root->num("stack-size", def->stackSize); // item light emission [r, g, b] where r,g,b in range [0..15] auto emissionarr = root->list("emission"); diff --git a/src/items/ItemDef.h b/src/items/ItemDef.h index 5bfe4d9b..1bcb97df 100644 --- a/src/items/ItemDef.h +++ b/src/items/ItemDef.h @@ -22,6 +22,7 @@ class ItemDef { public: std::string const name; + itemcount_t stackSize = 64; bool generated = false; uint8_t emission[4] {0, 0, 0, 0};