diff --git a/lib/Default/SmrPlayer.class.inc b/lib/Default/SmrPlayer.class.inc
index f50467438..ac142d71b 100644
--- a/lib/Default/SmrPlayer.class.inc
+++ b/lib/Default/SmrPlayer.class.inc
@@ -465,16 +465,17 @@ class SmrPlayer extends AbstractSmrPlayer {
$this->hasChanged=true;
}
- function getAttackColour() {
- return $this->attackColour;
- }
-
- function setAttackColour($colour) {
- if($this->attackColour == $colour)
- return;
- $this->attackColour=$colour;
- $this->hasChanged=true;
-// $this->db->query('UPDATE player SET attack_warning = ' . $this->db->escapeString($this->attackColour) . ' WHERE ' . $this->SQL . ' LIMIT 1');
+ function getPlayerRelationship(&$otherPlayer) {
+ // Returns the CSS class for the relationship between two players
+ if ($otherPlayer->canFight()) {
+ if ($this->traderNAPAlliance($otherPlayer)) {
+ return "friendly";
+ } else {
+ return "enemy";
+ }
+ } else {
+ return "neutral";
+ }
}
function getBank() {
diff --git a/templates/Default/engine/Default/includes/SectorPlayers.inc b/templates/Default/engine/Default/includes/SectorPlayers.inc
index 6f3ca72b1..68694b086 100644
--- a/templates/Default/engine/Default/includes/SectorPlayers.inc
+++ b/templates/Default/engine/Default/includes/SectorPlayers.inc
@@ -58,29 +58,13 @@
if($PlayersContainer instanceof SmrPlanet) {
if($ThisPlanet->getOwnerID() == $ThisPlayer->getAccountID()) {
?> Kick Examine
@@ -94,4 +78,4 @@
?>WARNING: Sensors have detected the presence of cloaked vessels in this sector
-
\ No newline at end of file
+