Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2013-11-07 13:39:49 +0000
committerStijn Buys <ingar@osirion.org>2013-11-07 13:39:49 +0000
commit703822461023cf09b2e0efa4a1e7a60f47afe602 (patch)
tree469f11c4970a14cff69944b58473bf81e1321309 /src/game/base/faction.h
parenta98197b22f592803e5204c0263bb6bfee9a0fc24 (diff)
Load reputation from factions.ini.
Diffstat (limited to 'src/game/base/faction.h')
-rw-r--r--src/game/base/faction.h24
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