You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
617 B
C++
30 lines
617 B
C++
7 years ago
|
//
|
||
|
// Created by koncord on 25.08.17.
|
||
|
//
|
||
|
|
||
|
#include "CellState.hpp"
|
||
|
|
||
|
#include "Script/LuaState.hpp"
|
||
|
|
||
|
void CellState::Init(LuaState &lua)
|
||
|
{
|
||
|
lua.getState()->new_usertype<CellState>("CellState",
|
||
|
"type", sol::property(&CellState::getStateType),
|
||
|
"description", sol::property(&CellState::getDescription)
|
||
|
);
|
||
|
}
|
||
|
|
||
|
CellState::CellState(mwmp::CellState state) : state(state)
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
int CellState::getStateType() const
|
||
|
{
|
||
|
return state.type;
|
||
|
}
|
||
|
|
||
|
std::string CellState::getDescription() const
|
||
|
{
|
||
|
return state.cell.getDescription();
|
||
|
}
|