diff --git a/gen/armor.py b/gen/armor.py index a64cba4b..35fb049c 100644 --- a/gen/armor.py +++ b/gen/armor.py @@ -103,10 +103,8 @@ class ArmorConflictGenerator: attacker_groups = list(db.unitdict_split(attackers, single_fight_attackers_count)) for attacker_group_dict, target_group_dict in zip_longest(attacker_groups, defender_groups): - padding = FRONTLINE_CAS_PADDING if FRONTLINE_CAS_PADDING < self.conflict.distance else 0 - position = self.conflict.position.point_from_heading(self.conflict.heading, - random.randint(padding, int(self.conflict.distance - padding))) + random.randint(0, self.conflict.distance)) self._generate_fight_at(attacker_group_dict, target_group_dict, position) def generate_passengers(self, count: int): diff --git a/resources/caulandmap.p b/resources/caulandmap.p index 6edba188..8fc89015 100644 Binary files a/resources/caulandmap.p and b/resources/caulandmap.p differ diff --git a/resources/tools/cau_terrain.miz b/resources/tools/cau_terrain.miz index b113c0b7..cfd7c7df 100644 Binary files a/resources/tools/cau_terrain.miz and b/resources/tools/cau_terrain.miz differ diff --git a/theater/base.py b/theater/base.py index d88f3995..c9e020f9 100644 --- a/theater/base.py +++ b/theater/base.py @@ -127,9 +127,11 @@ class Base: elif unit_type in self.aa: target_array = self.aa else: + print("Base didn't find event type {}".format(unit_type)) continue if unit_type not in target_array: + print("Base didn't find event type {}".format(unit_type)) continue target_array[unit_type] = max(target_array[unit_type] - count, 0) diff --git a/ui/basemenu.py b/ui/basemenu.py index 9fc1df79..f2f76248 100644 --- a/ui/basemenu.py +++ b/ui/basemenu.py @@ -44,7 +44,6 @@ class BaseMenu(Menu): for i, tasks_column in [(i, tasks[idx:idx+tasks_per_column]) for i, idx in enumerate(range(0, len(tasks), tasks_per_column))]: row = 2 - def purchase_row(unit_type, unit_price): nonlocal row nonlocal column @@ -54,7 +53,7 @@ class BaseMenu(Menu): Label(self.frame, text="{}".format(db.unit_type_name(unit_type)), **STYLES["widget"]).grid(row=row, column=column, sticky=W) - label = Label(self.frame, text="({})".format(existing_units), **STYLES["widget"]) + label = Label(self.frame, text="({}) ".format(existing_units), **STYLES["widget"]) label.grid(column=column + 1, row=row) self.bought_amount_labels[unit_type] = label diff --git a/ui/eventmenu.py b/ui/eventmenu.py index 80eacf91..86e4a3b8 100644 --- a/ui/eventmenu.py +++ b/ui/eventmenu.py @@ -69,15 +69,11 @@ class EventMenu(Menu): row += 1 - threat_descr = self.event.threat_description - if threat_descr: - threat_descr = "Approx. {}".format(threat_descr) - # Header header("Mission Menu", "title") # Mission Description - Label(self.frame, text="{}. {}".format(self.event, threat_descr), **STYLES["mission-preview"]).grid(row=row, column=0, columnspan=5, sticky=S+EW, padx=5, pady=5) + Label(self.frame, text="{}".format(self.event), **STYLES["mission-preview"]).grid(row=row, column=0, columnspan=5, sticky=S+EW, padx=5, pady=5) row += 1 Label(self.frame, text="Amount", **STYLES["widget"]).grid(row=row, column=1, columnspan=2) diff --git a/ui/mainmenu.py b/ui/mainmenu.py index ed0f1721..f4917fa5 100644 --- a/ui/mainmenu.py +++ b/ui/mainmenu.py @@ -74,16 +74,16 @@ class MainMenu(Menu): departure = None deliveries = False for event in events: + if event.from_cp.name != departure: + body = LabelFrame(self.frame, **STYLES["body"]) + body.grid(column=column, row=1, sticky=NSEW) + row = 0 + column += 1 + + departure = event.from_cp.name + departure_header(event.from_cp.name) + if not event.informational: - if event.from_cp.name != departure: - body = LabelFrame(self.frame, **STYLES["body"]) - body.grid(column=column, row=1, sticky=NSEW) - row = 0 - column += 1 - - departure = event.from_cp.name - departure_header(event.from_cp.name) - if self.game.is_player_attack(event): new_destination = "At {}".format(event.to_cp.name) else: diff --git a/ui/window.py b/ui/window.py index a71c83cb..1feff330 100644 --- a/ui/window.py +++ b/ui/window.py @@ -11,7 +11,7 @@ class Window: self.tk = Tk() self.tk.title("DCS Liberation") self.tk.iconbitmap("icon.ico") - self.tk.resizable(True, True) + self.tk.resizable(False, False) self.tk.grid_columnconfigure(0, weight=1) self.tk.grid_rowconfigure(0, weight=1)