diff options
author | Stijn Buys <ingar@osirion.org> | 2013-11-07 13:39:49 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2013-11-07 13:39:49 +0000 |
commit | 703822461023cf09b2e0efa4a1e7a60f47afe602 (patch) | |
tree | 469f11c4970a14cff69944b58473bf81e1321309 /src/game/base/game.cc | |
parent | a98197b22f592803e5204c0263bb6bfee9a0fc24 (diff) |
Load reputation from factions.ini.
Diffstat (limited to 'src/game/base/game.cc')
-rw-r--r-- | src/game/base/game.cc | 12 |
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(); |