| 470 | } |
| 471 | |
| 472 | void DialogManager::exportDialogManager(json& j) |
| 473 | { |
| 474 | // Write the information the npc know |
| 475 | const std::map<size_t, std::set<size_t>>& info = |
| 476 | m_World.getDialogManager().getScriptDialogManager()->getKnownNPCInformation(); |
| 477 | |
| 478 | json& npcInfo = j["npcKnowsInfo"]; |
| 479 | for (const auto& p : info) |
| 480 | { |
| 481 | // Converting to string here, because these can get pretty high with huge gaps, |
| 482 | // which would be filled with 'null'. |
| 483 | npcInfo[std::to_string(p.first)] = p.second; |
| 484 | } |
| 485 | } |
| 486 | |
| 487 | void DialogManager::importDialogManager(const json& j) |
| 488 | { |
no test coverage detected