| 56 | PlayerCompanions::PlayerCompanions(Json const& config) : m_config(config) {} |
| 57 | |
| 58 | void PlayerCompanions::diskLoad(Json const& diskStore) { |
| 59 | m_scriptComponent.setScriptStorage(diskStore.getObject("scriptStorage", JsonObject{})); |
| 60 | m_companions = jsonToMapV<StringMap<List<CompanionPtr>>>(diskStore.getObject("companions", JsonObject{}), |
| 61 | [](Json const& companions) { |
| 62 | return companions.toArray().transformed([](Json const& json) { return make_shared<Companion>(json); }); |
| 63 | }); |
| 64 | } |
| 65 | |
| 66 | Json PlayerCompanions::diskStore() const { |
| 67 | JsonObject result; |
nothing calls this directly
no test coverage detected