mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-10 20:46:47 +03:00
Make InventoryAdd and InventoryRemove static. Add them as Lua functions.
This commit is contained in:
parent
de165aaa04
commit
34859c154f
2 changed files with 7 additions and 4 deletions
|
@ -21,6 +21,9 @@ GameScript::GameScript(sol::state* lua) : LuaHandler{ lua }
|
||||||
m_lua->set_function("SetAmbientTrack", &GameScript::SetAmbientTrack);
|
m_lua->set_function("SetAmbientTrack", &GameScript::SetAmbientTrack);
|
||||||
m_lua->set_function("PlayAudioTrack", &GameScript::PlayAudioTrack);
|
m_lua->set_function("PlayAudioTrack", &GameScript::PlayAudioTrack);
|
||||||
|
|
||||||
|
m_lua->set_function("InventoryAdd", &GameScript::InventoryAdd);
|
||||||
|
m_lua->set_function("InventoryRemove", &GameScript::InventoryRemove);
|
||||||
|
|
||||||
GameScriptItemInfo::Register(m_lua);
|
GameScriptItemInfo::Register(m_lua);
|
||||||
GameScriptPosition::Register(m_lua);
|
GameScriptPosition::Register(m_lua);
|
||||||
GameScriptRotation::Register(m_lua);
|
GameScriptRotation::Register(m_lua);
|
||||||
|
@ -328,7 +331,7 @@ void GameScript::InventoryCombine(int slot1, int slot2)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameScript::InventorySepare(int slot)
|
void GameScript::InventorySeparate(int slot)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,12 +96,12 @@ public:
|
||||||
void Earthquake(int strength);
|
void Earthquake(int strength);
|
||||||
|
|
||||||
// Inventory
|
// Inventory
|
||||||
void InventoryAdd(int slot, int count);
|
static void InventoryAdd(int slot, int count);
|
||||||
void InventoryRemove(int slot, int count);
|
static void InventoryRemove(int slot, int count);
|
||||||
void InventoryGetCount(int slot);
|
void InventoryGetCount(int slot);
|
||||||
void InventorySetCount(int slot, int count);
|
void InventorySetCount(int slot, int count);
|
||||||
void InventoryCombine(int slot1, int slot2);
|
void InventoryCombine(int slot1, int slot2);
|
||||||
void InventorySepare(int slot);
|
void InventorySeparate(int slot);
|
||||||
|
|
||||||
// Misc
|
// Misc
|
||||||
void PrintString(std::string key, GameScriptPosition pos, GameScriptColor color, int lifetime, int flags);
|
void PrintString(std::string key, GameScriptPosition pos, GameScriptColor color, int lifetime, int flags);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue