forked from teamnwah/openmw-tes3coop
store year in saved game profile
This commit is contained in:
parent
b0eb5938bf
commit
7e2819c62e
4 changed files with 8 additions and 1 deletions
|
@ -196,6 +196,7 @@ namespace MWBase
|
||||||
|
|
||||||
virtual int getDay() const = 0;
|
virtual int getDay() const = 0;
|
||||||
virtual int getMonth() const = 0;
|
virtual int getMonth() const = 0;
|
||||||
|
virtual int getYear() const = 0;
|
||||||
|
|
||||||
virtual std::string getMonthName (int month = -1) const = 0;
|
virtual std::string getMonthName (int month = -1) const = 0;
|
||||||
///< Return name of month (-1: current month)
|
///< Return name of month (-1: current month)
|
||||||
|
|
|
@ -82,7 +82,7 @@ void MWState::StateManager::saveGame (const std::string& description, const Slot
|
||||||
profile.mInGameTime.mGameHour = world.getTimeStamp().getHour();
|
profile.mInGameTime.mGameHour = world.getTimeStamp().getHour();
|
||||||
profile.mInGameTime.mDay = world.getDay();
|
profile.mInGameTime.mDay = world.getDay();
|
||||||
profile.mInGameTime.mMonth = world.getMonth();
|
profile.mInGameTime.mMonth = world.getMonth();
|
||||||
/// \todo year
|
profile.mInGameTime.mYear = world.getYear();
|
||||||
/// \todo time played
|
/// \todo time played
|
||||||
profile.mDescription = description;
|
profile.mDescription = description;
|
||||||
|
|
||||||
|
|
|
@ -705,6 +705,11 @@ namespace MWWorld
|
||||||
return mGlobalVariables->getInt("month");
|
return mGlobalVariables->getInt("month");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int World::getYear() const
|
||||||
|
{
|
||||||
|
return mGlobalVariables->getInt("year");
|
||||||
|
}
|
||||||
|
|
||||||
std::string World::getMonthName (int month) const
|
std::string World::getMonthName (int month) const
|
||||||
{
|
{
|
||||||
if (month==-1)
|
if (month==-1)
|
||||||
|
|
|
@ -261,6 +261,7 @@ namespace MWWorld
|
||||||
|
|
||||||
virtual int getDay() const;
|
virtual int getDay() const;
|
||||||
virtual int getMonth() const;
|
virtual int getMonth() const;
|
||||||
|
virtual int getYear() const;
|
||||||
|
|
||||||
virtual std::string getMonthName (int month = -1) const;
|
virtual std::string getMonthName (int month = -1) const;
|
||||||
///< Return name of month (-1: current month)
|
///< Return name of month (-1: current month)
|
||||||
|
|
Loading…
Reference in a new issue