diff options
author | Stijn Buys <ingar@osirion.org> | 2014-07-27 19:04:13 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2014-07-27 19:04:13 +0000 |
commit | dbed606480148f0d686521e701d438eeb3b60212 (patch) | |
tree | c9ce286a5ea6ffbfb9bfbcec7874151ef7d177e2 /src/game/base/faction.h | |
parent | d95f18442ea216a886bfddf75d349362d1e537bc (diff) |
Added faction reputation information to the list_faction engine function.
Diffstat (limited to 'src/game/base/faction.h')
-rw-r--r-- | src/game/base/faction.h | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/src/game/base/faction.h b/src/game/base/faction.h index 551ce7b..0513bc3 100644 --- a/src/game/base/faction.h +++ b/src/game/base/faction.h @@ -24,25 +24,37 @@ public: /* --- inspectors ------------------------------------------------- */ - inline const math::Color & color() const { + inline const math::Color & color() const + { return faction_color; } - inline const math::Color & color_second() const { + inline const math::Color & color_second() const + { return faction_color_second; } - + + /** + * @brief faction reputation + * */ + inline const core::Reputation & reputation() const + { + return faction_reputation; + } + /** * @brief faction reputation * */ - inline core::Reputation & reputation() { + inline core::Reputation & reputation() + { return faction_reputation; } /** * @brief player reputation with a specific faction * */ - inline const float reputation(const core::Info *faction) const { + inline const float reputation(const core::Info *faction) const + { if (faction == this) { return 100.0f; } else { @@ -59,11 +71,13 @@ public: /* --- mutators --------------------------------------------------- */ - inline void set_color(const math::Color &color) { + inline void set_color(const math::Color &color) + { faction_color.assign(color); } - inline void set_color_second(const math::Color &color_second) { + inline void set_color_second(const math::Color &color_second) + { faction_color_second.assign(color_second); } @@ -77,6 +91,8 @@ public: */ void apply_sale(core::Player *player, const float amount) const; + virtual void print() const; + /* --- static ----------------------------------------------------- */ /** |