MCPcopy Create free account
hub / github.com/REGoth-project/REGoth / exportDialogManager

Method exportDialogManager

src/logic/DialogManager.cpp:472–485  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

470}
471
472void 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
487void DialogManager::importDialogManager(const json& j)
488{

Callers 1

saveToSlotMethod · 0.80

Calls 1

Tested by

no test coverage detected