diff options
Diffstat (limited to 'src/game/base/faction.h')
-rw-r--r-- | src/game/base/faction.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/game/base/faction.h b/src/game/base/faction.h index 3775043..6f995dc 100644 --- a/src/game/base/faction.h +++ b/src/game/base/faction.h @@ -10,7 +10,9 @@ #include <list> #include "math/color.h" +#include "core/entity.h" #include "core/info.h" +#include "core/reputation.h" namespace game { @@ -34,6 +36,24 @@ public: return faction_lawfull; } + /** + * @brief faction reputation + * */ + inline core::Reputation & reputation() { + return faction_reputation; + } + + /** + * @brief player reputation with a specific faction + * */ + inline const float reputation(const Info *faction) const { + if (faction == this) { + return 100.0f; + } else { + return faction_reputation.reputation(faction); + } + } + /* --- actors ----------------------------------------------------- */ /** @@ -80,9 +100,13 @@ private: bool faction_lawfull; + core::Reputation faction_reputation; + /* --- static ----------------------------------------------------- */ static core::InfoType *faction_infotype; + + static Faction *faction_default; }; } // namespace game |