Make GameLogicScript use kInventorySlots. Make InvItem a read-only table. This means we do not need to write an enum directly in the Lua source.

This commit is contained in:
hispidence 2021-07-13 13:21:13 +01:00
parent aa4f7f6526
commit a0ced5c34e
2 changed files with 32 additions and 12 deletions

View file

@ -96,10 +96,10 @@ public:
void Earthquake(int strength);
// Inventory
static void InventoryAdd(int slot, sol::optional<int> count);
static void InventoryRemove(int slot, sol::optional<int> count);
static int InventoryGetCount(int slot);
static void InventorySetCount(int slot, int count);
static void InventoryAdd(GAME_OBJECT_ID slot, sol::optional<int> count);
static void InventoryRemove(GAME_OBJECT_ID slot, sol::optional<int> count);
static int InventoryGetCount(GAME_OBJECT_ID slot);
static void InventorySetCount(GAME_OBJECT_ID slot, int count);
void InventoryCombine(int slot1, int slot2);
void InventorySeparate(int slot);