| 485 | } |
| 486 | |
| 487 | void DialogManager::importDialogManager(const json& j) |
| 488 | { |
| 489 | for (auto it = j["npcKnowsInfo"].begin(); it != j["npcKnowsInfo"].end(); it++) |
| 490 | { |
| 491 | // Map of indices -> array of numbers |
| 492 | int npcInstance = std::stoi(it.key()); |
| 493 | |
| 494 | for (int info : it.value()) |
| 495 | m_World.getDialogManager().getScriptDialogManager()->setNpcInfoKnown((unsigned int)npcInstance, (unsigned int)info); |
| 496 | } |
| 497 | } |
| 498 | |
| 499 | void DialogManager::onInputAction(Engine::ActionType action) |
| 500 | { |