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/game.cc
parenta98197b22f592803e5204c0263bb6bfee9a0fc24 (diff)
Load reputation from factions.ini.
Diffstat (limited to 'src/game/base/game.cc')
-rw-r--r--src/game/base/game.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/game/base/game.cc b/src/game/base/game.cc
index f227c2f..cbcafaf 100644
--- a/src/game/base/game.cc
+++ b/src/game/base/game.cc
@@ -100,6 +100,18 @@ void Game::func_join(core::Player *player, std::string const &args)
player->send("^BYou received " + aux::article(Default::shipmodel->name()));
player->sound("game/buy-ship");
+
+ // apply default reputation
+ Faction *faction_default = Faction::find("default");
+ if (faction_default) {
+ player->reputation().assign(faction_default->reputation());
+ }
+ }
+
+
+ // DEBUG
+ for (core::Reputation::FactionReps::iterator rip = player->reputation().factionreps().begin(); rip != player->reputation().factionreps().end(); ++rip) {
+ con_debug << " reputation with " << (*rip)->label() << " " << (*rip)->reputation() << std::endl;
}
player->set_dirty();