[Server] Rename property cell into description, initialize Cells type

new-script-api
David Cernat 7 years ago
parent 5653d07c7b
commit 71c921faa7

@ -14,7 +14,7 @@ using namespace std;
void Cells::Init(LuaState &lua) void Cells::Init(LuaState &lua)
{ {
lua.getState()->new_usertype<Cells>("Cell", lua.getState()->new_usertype<Cells>("Cell",
"cell", sol::property(&Cells::getCell, &Cells::setCell), "description", sol::property(&Cells::getCell, &Cells::setCell),
"getExterior", &Cells::getExterior, "getExterior", &Cells::getExterior,
"setExterior", &Cells::setExterior, "setExterior", &Cells::setExterior,
"getRegion", &Cells::getRegion, "getRegion", &Cells::getRegion,

@ -72,6 +72,7 @@ LuaState::LuaState()
cmdCtrl = make_unique<CommandController>(); cmdCtrl = make_unique<CommandController>();
Player::Init(*this); Player::Init(*this);
Cells::Init(*this);
CharClass::Init(*this); CharClass::Init(*this);
Inventory::Init(*this); Inventory::Init(*this);
GameSettings::Init(*this); GameSettings::Init(*this);

Loading…
Cancel
Save