mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-22 21:53:52 +00:00
Merge branch 'master' of https://github.com/zinnschlag/openmw.git into DialogueSystem
This commit is contained in:
commit
7a1ff61541
3 changed files with 14 additions and 21 deletions
|
@ -390,7 +390,6 @@ namespace MWDialogue
|
||||||
{
|
{
|
||||||
ESMS::LiveCellRef<ESM::NPC, MWWorld::RefData>* npc = actor.get<ESM::NPC>();
|
ESMS::LiveCellRef<ESM::NPC, MWWorld::RefData>* npc = actor.get<ESM::NPC>();
|
||||||
int isRace = int(toLower(npc->base->race) == toLower(name));
|
int isRace = int(toLower(npc->base->race) == toLower(name));
|
||||||
//std::cout << "isRace"<<isRace; mEnvironment.mWorld
|
|
||||||
if(selectCompare<int,int>(comp,!isRace,select.i))
|
if(selectCompare<int,int>(comp,!isRace,select.i))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -522,14 +521,6 @@ namespace MWDialogue
|
||||||
if (!isMatching (actor, *iter))
|
if (!isMatching (actor, *iter))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/*std::cout
|
|
||||||
<< "unchecked entries:" << std::endl
|
|
||||||
<< " player faction: " << info.pcFaction << std::endl
|
|
||||||
<< " disposition: " << info.data.disposition << std::endl
|
|
||||||
<< " NPC rank: " << static_cast<int> (info.data.rank) << std::endl
|
|
||||||
<< " gender: " << static_cast<int> (info.data.gender) << std::endl
|
|
||||||
<< " PC rank: " << static_cast<int> (info.data.PCrank) << std::endl;*/
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -552,7 +543,6 @@ namespace MWDialogue
|
||||||
std::list<std::string>::iterator it;
|
std::list<std::string>::iterator it;
|
||||||
for(it = actorKnownTopics.begin();it != actorKnownTopics.end();it++)
|
for(it = actorKnownTopics.begin();it != actorKnownTopics.end();it++)
|
||||||
{
|
{
|
||||||
MWGui::DialogueWindow* win = mEnvironment.mWindowManager->getDialogueWindow();
|
|
||||||
size_t pos = find_str_ci(text,*it,0);
|
size_t pos = find_str_ci(text,*it,0);
|
||||||
if(pos !=std::string::npos)
|
if(pos !=std::string::npos)
|
||||||
{
|
{
|
||||||
|
@ -573,7 +563,6 @@ namespace MWDialogue
|
||||||
{
|
{
|
||||||
mChoice = -1;
|
mChoice = -1;
|
||||||
mIsInChoice = false;
|
mIsInChoice = false;
|
||||||
std::cout << "talking with " << MWWorld::Class::get (actor).getName (actor) << std::endl;
|
|
||||||
|
|
||||||
mActor = actor;
|
mActor = actor;
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,9 @@
|
||||||
|
|
||||||
#include "../mwworld/environment.hpp"
|
#include "../mwworld/environment.hpp"
|
||||||
|
|
||||||
|
#include "../mwgui/window_manager.hpp"
|
||||||
|
#include "../mwgui/messagebox.hpp"
|
||||||
|
|
||||||
namespace MWDialogue
|
namespace MWDialogue
|
||||||
{
|
{
|
||||||
Quest& Journal::getQuest (const std::string& id)
|
Quest& Journal::getQuest (const std::string& id)
|
||||||
|
@ -34,6 +37,10 @@ namespace MWDialogue
|
||||||
Quest& quest = getQuest (id);
|
Quest& quest = getQuest (id);
|
||||||
|
|
||||||
quest.addEntry (entry, *mEnvironment.mWorld); // we are doing slicing on purpose here
|
quest.addEntry (entry, *mEnvironment.mWorld); // we are doing slicing on purpose here
|
||||||
|
|
||||||
|
std::vector<std::string> empty;
|
||||||
|
std::string notification = "Your Journal has been updated.";
|
||||||
|
mEnvironment.mWindowManager->messageBox (notification, empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Journal::setJournalIndex (const std::string& id, int index)
|
void Journal::setJournalIndex (const std::string& id, int index)
|
||||||
|
|
|
@ -64,7 +64,6 @@ DialogueWindow::DialogueWindow(WindowManager& parWindowManager,MWWorld::Environm
|
||||||
|
|
||||||
getWidget(pDispositionBar, "Disposition");
|
getWidget(pDispositionBar, "Disposition");
|
||||||
getWidget(pDispositionText,"DispositionText");
|
getWidget(pDispositionText,"DispositionText");
|
||||||
std::cout << "creation dialogue";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DialogueWindow::onHistoryClicked(MyGUI::Widget* _sender)
|
void DialogueWindow::onHistoryClicked(MyGUI::Widget* _sender)
|
||||||
|
@ -126,7 +125,6 @@ void DialogueWindow::removeKeyword(std::string keyWord)
|
||||||
{
|
{
|
||||||
if(topicsList->findItemIndexWith(keyWord) != MyGUI::ITEM_NONE)
|
if(topicsList->findItemIndexWith(keyWord) != MyGUI::ITEM_NONE)
|
||||||
{
|
{
|
||||||
std::cout << topicsList->findItemIndexWith(keyWord);
|
|
||||||
topicsList->removeItemAt(topicsList->findItemIndexWith(keyWord));
|
topicsList->removeItemAt(topicsList->findItemIndexWith(keyWord));
|
||||||
pTopicsText.erase(keyWord);
|
pTopicsText.erase(keyWord);
|
||||||
}
|
}
|
||||||
|
@ -200,4 +198,3 @@ void DialogueWindow::updateOptions()
|
||||||
pDispositionText->eraseText(0,pDispositionText->getTextLength());
|
pDispositionText->eraseText(0,pDispositionText->getTextLength());
|
||||||
pDispositionText->addText("#B29154"+std::string("40/100")+"#B29154");
|
pDispositionText->addText("#B29154"+std::string("40/100")+"#B29154");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue