mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-30 00:37:58 +03:00
Change InventoryAdd/Remove/GetCount/SetCount and GameScriptInventoryObject to use ItemEnumPair.
This commit is contained in:
parent
05054a05fe
commit
61d9e00e63
3 changed files with 14 additions and 25 deletions
|
@ -1,24 +1,13 @@
|
|||
#include "framework.h"
|
||||
#include "GameScriptInventoryObject.h"
|
||||
|
||||
GameScriptInventoryObject::GameScriptInventoryObject(std::string name, short slot, float yOffset, float scale, float xRot, float yRot, float zRot, short rotationFlags, int meshBits, __int64 operation)
|
||||
{
|
||||
this->name = name;
|
||||
this->slot = slot;
|
||||
this->yOffset = yOffset;
|
||||
this->scale = scale;
|
||||
this->xRot = xRot;
|
||||
this->yRot = yRot;
|
||||
this->zRot = zRot;
|
||||
this->rotationFlags = rotationFlags;
|
||||
this->meshBits = meshBits;
|
||||
this->operation = operation;
|
||||
}
|
||||
GameScriptInventoryObject::GameScriptInventoryObject(std::string const& name, ItemEnumPair slot, float yOffset, float scale, float xRot, float yRot, float zRot, short rotationFlags, int meshBits, __int64 operation) : name{ name }, slot{ slot.m_pair.second }, yOffset{ yOffset }, scale{ scale }, xRot{ xRot }, yRot{ yRot }, zRot{ zRot }, rotationFlags{ rotationFlags }, meshBits{ meshBits }, operation{ operation }
|
||||
{}
|
||||
|
||||
void GameScriptInventoryObject::Register(sol::state * lua)
|
||||
{
|
||||
lua->new_usertype<GameScriptInventoryObject>("InventoryObject",
|
||||
sol::constructors<GameScriptInventoryObject(std::string, short, float, float, float, float, float, short, int, __int64)>(),
|
||||
sol::constructors<GameScriptInventoryObject(std::string const &, ItemEnumPair, float, float, float, float, float, short, int, __int64)>(),
|
||||
"name", &GameScriptInventoryObject::name,
|
||||
"yOffset", &GameScriptInventoryObject::yOffset,
|
||||
"scale", &GameScriptInventoryObject::scale,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue