mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-19 09:27:22 -04:00
CLEANUP: Update for MR Comments
This commit is contained in:
parent
8ec4fcbf30
commit
943cd765e7
@ -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…
x
Reference in New Issue
Block a user