mirror of
https://github.com/OpenMW/openmw.git
synced 2025-12-04 17:04:35 +00:00
CLEANUP: Update for MR Comments
This commit is contained in:
parent
8ec4fcbf30
commit
943cd765e7
1 changed files with 5 additions and 7 deletions
|
|
@ -1,13 +1,12 @@
|
|||
#include "types.hpp"
|
||||
|
||||
#include <apps/openmw/mwbase/dialoguemanager.hpp>
|
||||
#include <components/esm3/loadbsgn.hpp>
|
||||
#include <components/esm3/loadfact.hpp>
|
||||
#include <components/misc/strings/format.hpp>
|
||||
|
||||
#include "../birthsignbindings.hpp"
|
||||
#include "../luamanagerimp.hpp"
|
||||
|
||||
#include "apps/openmw/mwbase/dialoguemanager.hpp"
|
||||
#include "apps/openmw/mwbase/inputmanager.hpp"
|
||||
#include "apps/openmw/mwbase/journal.hpp"
|
||||
#include "apps/openmw/mwbase/mechanicsmanager.hpp"
|
||||
|
|
@ -205,11 +204,10 @@ namespace MWLua
|
|||
= MWBase::Environment::get().getESMStore()->get<ESM::Dialogue>().search(topic);
|
||||
|
||||
if (!dialogueRecord)
|
||||
throw std::runtime_error(
|
||||
Misc::StringUtils::format("Failed to add topic ", topicId, ": topic record not found"));
|
||||
else if (dialogueRecord->mType != ESM::Dialogue::Topic)
|
||||
throw std::runtime_error(
|
||||
Misc::StringUtils::format("Failed to add topic ", topicId, ": record is not a topic"));
|
||||
throw std::runtime_error("Failed to add topic " + std::string(topicId) + ": topic record not found");
|
||||
|
||||
if (dialogueRecord->mType != ESM::Dialogue::Topic)
|
||||
throw std::runtime_error("Failed to add topic " + std::string(topicId) + ": record is not a topic");
|
||||
|
||||
MWBase::Environment::get().getDialogueManager()->addTopic(topic);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue