| 192 | } |
| 193 | |
| 194 | sol::table LuaStorage::initPlayerPackage( |
| 195 | LuaUtil::LuaView& view, LuaStorage* globalStorage, LuaStorage* playerStorage) |
| 196 | { |
| 197 | sol::table res(view.sol(), sol::create); |
| 198 | registerLifeTime(view, res); |
| 199 | |
| 200 | res["globalSection"] = [globalStorage](sol::this_state lua, std::string_view section) { |
| 201 | return globalStorage->getReadOnlySection(lua, section); |
| 202 | }; |
| 203 | res["playerSection"] = [playerStorage](sol::this_state lua, std::string_view section) { |
| 204 | return playerStorage->getMutableSection(lua, section); |
| 205 | }; |
| 206 | res["allPlayerSections"] = [playerStorage](sol::this_state lua) { return playerStorage->getAllSections(lua); }; |
| 207 | return LuaUtil::makeReadOnly(res); |
| 208 | } |
| 209 | |
| 210 | sol::table LuaStorage::initMenuPackage(LuaUtil::LuaView& view, LuaStorage* globalStorage, LuaStorage* playerStorage) |
| 211 | { |
nothing calls this directly
no test coverage detected