From 72c233cb0d81c4e61ec5d3c27f521cb728c13741 Mon Sep 17 00:00:00 2001 From: Khopa Date: Thu, 24 Dec 2020 01:47:44 +0100 Subject: [PATCH] Fixed possible assertion error when redeploying units which would lead to ground units not being redeployed. --- game/theater/base.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/game/theater/base.py b/game/theater/base.py index 9f0ebe8f..81512f3e 100644 --- a/game/theater/base.py +++ b/game/theater/base.py @@ -103,11 +103,11 @@ class Base: self.armor = {k: v for k, v in self.armor.items() if k in applicable_units} def commision_units(self, units: typing.Dict[typing.Any, int]): - for value in units.values(): - assert value > 0 - assert value == math.floor(value) for unit_type, unit_count in units.items(): + if unit_count <= 0: + continue + for_task = db.unit_task(unit_type) target_dict = None