Map cp lines and flight paths are now the color of your coalition (red or blue)

This commit is contained in:
Donnie
2020-06-30 16:44:04 -04:00
parent 04e77a97f2
commit ae3518f450
4 changed files with 73 additions and 41 deletions

View File

@@ -175,6 +175,7 @@ class Game:
else:
return event.name == self.player_name
# 1 = red, 2 = blue
def get_player_coalition_id(self):
if self.player_country in db.BLUEFOR_FACTIONS:
return 2
@@ -187,6 +188,20 @@ class Game:
else:
return 1
def get_player_color(self):
if self.get_player_coalition_id() == 1:
return "red"
else:
return "blue"
def get_enemy_color(self):
if self.get_player_coalition_id() == 1:
return "blue"
else:
return "red"
def pass_turn(self, no_action=False, ignored_cps: typing.Collection[ControlPoint] = None):
logging.info("Pass turn")