mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Map cp lines and flight paths are now the color of your coalition (red or blue)
This commit is contained in:
15
game/game.py
15
game/game.py
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user