mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 21:45:33 +00:00
added journal script interface
This commit is contained in:
parent
190f77f6c9
commit
b40117449a
2 changed files with 28 additions and 1 deletions
|
@ -1,10 +1,26 @@
|
||||||
|
|
||||||
#include "journal.hpp"
|
#include "journal.hpp"
|
||||||
|
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
namespace MWDialogue
|
namespace MWDialogue
|
||||||
{
|
{
|
||||||
MWDialogue::Journal::Journal (MWWorld::Environment& environment)
|
Journal::Journal (MWWorld::Environment& environment)
|
||||||
: mEnvironment (environment)
|
: mEnvironment (environment)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
void Journal::addEntry (const std::string& id, int index)
|
||||||
|
{
|
||||||
|
std::cout << "journal: " << id << " at " << index << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Journal::setJournalIndex (const std::string& id, int index)
|
||||||
|
{
|
||||||
|
std::cout << "journal (no entry): " << id << " at " << index << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
int Journal::getJournalIndex (const std::string& id) const
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#ifndef GAME_MMDIALOG_JOURNAL_H
|
#ifndef GAME_MMDIALOG_JOURNAL_H
|
||||||
#define GAME_MWDIALOG_JOURNAL_H
|
#define GAME_MWDIALOG_JOURNAL_H
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
namespace MWWorld
|
namespace MWWorld
|
||||||
{
|
{
|
||||||
struct Environment;
|
struct Environment;
|
||||||
|
@ -15,6 +17,15 @@ namespace MWDialogue
|
||||||
public:
|
public:
|
||||||
|
|
||||||
Journal (MWWorld::Environment& environment);
|
Journal (MWWorld::Environment& environment);
|
||||||
|
|
||||||
|
void addEntry (const std::string& id, int index);
|
||||||
|
///< Add a journal entry.
|
||||||
|
|
||||||
|
void setJournalIndex (const std::string& id, int index);
|
||||||
|
///< Set the journal index without adding an entry.
|
||||||
|
|
||||||
|
int getJournalIndex (const std::string& id) const;
|
||||||
|
///< Get the journal index.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue