From 921b1ee9fdef316f67b8a65b3dc75b19d630aec4 Mon Sep 17 00:00:00 2001 From: MetalStormGhost Date: Tue, 3 Oct 2023 17:56:21 +0300 Subject: [PATCH] Fixed a bug in SHORAD and SAM generation. --- game/pretense/pretenseluagenerator.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/game/pretense/pretenseluagenerator.py b/game/pretense/pretenseluagenerator.py index 32577ef9..af97601b 100644 --- a/game/pretense/pretenseluagenerator.py +++ b/game/pretense/pretenseluagenerator.py @@ -74,9 +74,7 @@ class PretenseLuaGenerator(LuaGenerator): preset: str, cp_side_str: str, cp_name_trimmed: str ) -> str: lua_string_zones = ( - " presets.defenses." - + cp_side_str - + "." + " presets.defenses.sam." + preset + ":extend({ name='" + cp_name_trimmed @@ -150,8 +148,14 @@ class PretenseLuaGenerator(LuaGenerator): + "',\n" ) lua_string_zones += " products = {\n" - lua_string_zones += self.generate_sam_from_preset( - "shorad", cp_side_str, cp_name_trimmed + lua_string_zones += ( + " presets.defenses." + + cp_side_str + + ".shorad:extend({ name='" + + cp_name_trimmed + + "-shorad-" + + cp_side_str + + "' }),\n" ) lua_string_zones += " }\n" lua_string_zones += " }),\n"