prompt window with logs on raised exception; minor UI updates; minor fixes

This commit is contained in:
Vasyl Horbachenko
2018-07-29 04:16:39 +03:00
parent 73d4a2d414
commit 9dbc9a8a56
25 changed files with 146 additions and 57 deletions

View File

@@ -17,7 +17,7 @@ class AntiAAStrikeEvent(Event):
targets = None # type: db.ArmorDict
def __str__(self):
return "Anti-AA strike from {} at {}".format(self.from_cp, self.to_cp)
return "Anti-AA strike"
def is_successfull(self, debriefing: Debriefing):
total_targets = sum(self.targets.values())

View File

@@ -16,7 +16,7 @@ class BaseAttackEvent(Event):
STRENGTH_RECOVERY = 0.55
def __str__(self):
return "Base attack from {} to {}".format(self.from_cp, self.to_cp)
return "Base attack"
def is_successfull(self, debriefing: Debriefing):
alive_attackers = sum([v for k, v in debriefing.alive_units[self.attacker_name].items() if db.unit_task(k) == PinpointStrike])

View File

@@ -25,7 +25,7 @@ class FrontlineAttackEvent(Event):
return "{} vehicles".format(self.to_cp.base.assemble_count())
def __str__(self):
return "Frontline attack from {} at {}".format(self.from_cp, self.to_cp)
return "Frontline attack"
def is_successfull(self, debriefing: Debriefing):
alive_attackers = sum([v for k, v in debriefing.alive_units[self.attacker_name].items() if db.unit_task(k) == PinpointStrike])

View File

@@ -23,7 +23,7 @@ class FrontlinePatrolEvent(Event):
return "{} aircraft + ? CAS".format(self.to_cp.base.scramble_count(self.game.settings.multiplier * self.ESCORT_FACTOR, CAP))
def __str__(self):
return "Frontline CAP from {} at {}".format(self.from_cp, self.to_cp)
return "Frontline CAP"
"""
def is_successfull(self, debriefing: Debriefing):

View File

@@ -16,7 +16,7 @@ class InfantryTransportEvent(Event):
STRENGTH_INFLUENCE = 0.3
def __str__(self):
return "Frontline transport troops to {}".format(self.to_cp)
return "Frontline transport troops"
def is_successfull(self, debriefing: Debriefing):
return True

View File

@@ -19,7 +19,7 @@ class InsurgentAttackEvent(Event):
return ""
def __str__(self):
return "Destroy insurgents at {}".format(self.to_cp)
return "Destroy insurgents"
def is_successfull(self, debriefing: Debriefing):
killed_units = sum([v for k, v in debriefing.destroyed_units[self.attacker_name].items() if db.unit_task(k) == PinpointStrike])

View File

@@ -20,7 +20,7 @@ class InterceptEvent(Event):
transport_unit = None # type: FlyingType
def __str__(self):
return "Intercept from {} at {}".format(self.from_cp, self.to_cp)
return "Intercept"
def _enemy_scramble_multiplier(self) -> float:
is_global = self.from_cp.is_global or self.to_cp.is_global

View File

@@ -24,7 +24,7 @@ class NavalInterceptEvent(Event):
return max(int(factor), 1)
def __str__(self) -> str:
return "Naval intercept at {}".format(self.to_cp)
return "Naval intercept"
@property
def threat_description(self):