Cleaned up some code.

This commit is contained in:
MetalStormGhost 2023-09-17 16:06:17 +03:00
parent 51a4b6603d
commit 77060031da
2 changed files with 2 additions and 2 deletions

View File

@ -56,7 +56,7 @@ class PretenseLuaGenerator(LuaGenerator):
self.mission.triggerrules.triggers.remove(t) self.mission.triggerrules.triggers.remove(t)
self.mission.triggerrules.triggers.append(t) self.mission.triggerrules.triggers.append(t)
def generate_pretense_land_upgrade_supply(self, cp_name: str, cp_side: int): def generate_pretense_land_upgrade_supply(self, cp_name: str, cp_side: int) -> str:
lua_string_zones = "" lua_string_zones = ""
cp_name_trimmed = "".join([i for i in cp_name.lower() if i.isalnum()]) cp_name_trimmed = "".join([i for i in cp_name.lower() if i.isalnum()])
cp_side_str = "blue" if cp_side == PRETENSE_BLUE_SIDE else "red" cp_side_str = "blue" if cp_side == PRETENSE_BLUE_SIDE else "red"

View File

@ -450,8 +450,8 @@ class PretenseTgoGenerator(TgoGenerator):
else: else:
other_coalition = coalition other_coalition = coalition
country = self.m.country(other_coalition.faction.country.name) country = self.m.country(other_coalition.faction.country.name)
new_ground_object: TheaterGroundObject
for ground_object in cp.ground_objects: for ground_object in cp.ground_objects:
generator: GroundObjectGenerator
if isinstance(ground_object, BuildingGroundObject): if isinstance(ground_object, BuildingGroundObject):
new_ground_object = BuildingGroundObject( new_ground_object = BuildingGroundObject(
name=ground_object.name, name=ground_object.name,