2010-07-26 09:58:49 +00:00
|
|
|
#ifndef GAME_MWMECHANICS_MECHANICSMANAGER_H
|
|
|
|
#define GAME_MWMECHANICS_MECHANICSMANAGER_H
|
2010-07-26 09:15:38 +00:00
|
|
|
|
2010-07-27 12:05:05 +00:00
|
|
|
#include <set>
|
|
|
|
|
|
|
|
#include "../mwworld/ptr.hpp"
|
|
|
|
|
2010-07-27 13:59:41 +00:00
|
|
|
#include "creaturestats.hpp"
|
|
|
|
|
2010-09-15 10:22:06 +00:00
|
|
|
namespace MWWorld
|
2010-07-26 09:15:38 +00:00
|
|
|
{
|
2010-09-15 10:22:06 +00:00
|
|
|
class Environment;
|
2010-07-26 09:15:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
namespace MWMechanics
|
|
|
|
{
|
|
|
|
class MechanicsManager
|
|
|
|
{
|
2010-09-15 10:22:06 +00:00
|
|
|
MWWorld::Environment& mEnvironment;
|
2010-07-27 12:05:05 +00:00
|
|
|
std::set<MWWorld::Ptr> mActors;
|
2010-07-27 13:59:41 +00:00
|
|
|
MWWorld::Ptr mWatched;
|
|
|
|
CreatureStats mWatchedCreature;
|
2010-09-15 10:22:06 +00:00
|
|
|
bool mSetName;
|
2010-09-13 20:59:28 +00:00
|
|
|
|
2010-09-15 11:31:26 +00:00
|
|
|
void buildPlayer();
|
|
|
|
///< build player according to stored class/race/birthsign information. Will
|
|
|
|
/// default to the values of the ESM::NPC object, if no explicit information is given.
|
|
|
|
|
2010-07-26 09:15:38 +00:00
|
|
|
public:
|
2010-09-13 20:59:28 +00:00
|
|
|
|
2010-09-15 10:22:06 +00:00
|
|
|
MechanicsManager (MWWorld::Environment& environment);
|
2010-09-13 20:59:28 +00:00
|
|
|
|
2010-07-26 09:15:38 +00:00
|
|
|
void configureGUI();
|
2010-09-13 20:59:28 +00:00
|
|
|
|
2010-07-27 12:05:05 +00:00
|
|
|
void addActor (const MWWorld::Ptr& ptr);
|
|
|
|
///< Register an actor for stats management
|
2010-07-27 12:43:46 +00:00
|
|
|
|
|
|
|
void removeActor (const MWWorld::Ptr& ptr);
|
|
|
|
///< Deregister an actor for stats management
|
2010-09-13 20:59:28 +00:00
|
|
|
|
2010-07-27 12:05:05 +00:00
|
|
|
void dropActors (const MWWorld::Ptr::CellStore *cellStore);
|
|
|
|
///< Deregister all actors in the given cell.
|
2010-09-13 20:59:28 +00:00
|
|
|
|
2010-07-27 13:59:41 +00:00
|
|
|
void watchActor (const MWWorld::Ptr& ptr);
|
|
|
|
///< On each update look for changes in a previously registered actor and update the
|
|
|
|
/// GUI accordingly.
|
2010-09-13 20:59:28 +00:00
|
|
|
|
2010-07-27 12:46:05 +00:00
|
|
|
void update();
|
|
|
|
///< Update actor stats
|
2010-09-13 20:59:28 +00:00
|
|
|
|
|
|
|
void setPlayerName (const std::string& name);
|
|
|
|
///< Set player name.
|
|
|
|
|
|
|
|
void setPlayerRace (const std::string& id, bool male);
|
|
|
|
///< Set player race.
|
|
|
|
|
|
|
|
void setPlayerBirthsign (const std::string& id);
|
|
|
|
///< Set player birthsign.
|
|
|
|
|
|
|
|
void setPlayerClass (const std::string& id);
|
|
|
|
///< Set player class to stock class.
|
|
|
|
|
|
|
|
void setPlayerClass (const ESM::Class& class_);
|
|
|
|
///< Set player class to custom class.
|
2010-07-26 09:15:38 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|