| 208 | } |
| 209 | |
| 210 | sol::table LuaStorage::initMenuPackage(LuaUtil::LuaView& view, LuaStorage* globalStorage, LuaStorage* playerStorage) |
| 211 | { |
| 212 | sol::table res(view.sol(), sol::create); |
| 213 | registerLifeTime(view, res); |
| 214 | |
| 215 | res["playerSection"] = [playerStorage](sol::this_state lua, std::string_view section) { |
| 216 | return playerStorage->getMutableSection(lua, section, /*forMenuScripts=*/true); |
| 217 | }; |
| 218 | res["globalSection"] = [globalStorage](sol::this_state lua, std::string_view section) { |
| 219 | return globalStorage->getReadOnlySection(lua, section); |
| 220 | }; |
| 221 | res["allPlayerSections"] = [playerStorage](sol::this_state lua) { return playerStorage->getAllSections(lua); }; |
| 222 | return LuaUtil::makeReadOnly(res); |
| 223 | } |
| 224 | |
| 225 | sol::table LuaStorage::initLoadPackage(LuaUtil::LuaView& view, LuaStorage* playerStorage) |
| 226 | { |
nothing calls this directly
no test coverage detected