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-10 15:11:49 +0000
committerStijn Buys <ingar@osirion.org>2013-11-10 15:11:49 +0000
commit82f0ac05f5da2d89c4a544ca22ff47e116e6dd97 (patch)
treeae48728db2c85aa68387b942f49055a416d09464 /src/game/base/game.cc
parent4db4ba29453ef17022ab71d99e1029c32687c6da (diff)
Introduced global variables for reputation hostile/friendly thresholds,
do not allow players to dock at hostile bases, indicate target reputation in the hud target info widget.
Diffstat (limited to 'src/game/base/game.cc')
-rw-r--r--src/game/base/game.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/game/base/game.cc b/src/game/base/game.cc
index a628440..fa3e81a 100644
--- a/src/game/base/game.cc
+++ b/src/game/base/game.cc
@@ -236,6 +236,12 @@ void Game::func_target_dock(core::Player *player, core::Entity *entity)
return;
}
+ if (player->reputation(entity->faction()) <= core::range::reputation_hostile) {
+ // FIXME replace with "Denied" voice
+ player->send("Dock denied");
+ return;
+ }
+
Ship * ship = static_cast<Ship *>(player->control());
ship->set_autopilot_target(entity);