mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Stop the execution of the pretense_extra_zone_connections in case no more connected points can be found in the campaign. Should fix an error which prevents campaign generation.
This commit is contained in:
parent
cc7ff3f1c2
commit
7f7821f878
@ -1779,6 +1779,7 @@ class PretenseLuaGenerator(LuaGenerator):
|
|||||||
for extra_connection in range(
|
for extra_connection in range(
|
||||||
self.game.settings.pretense_extra_zone_connections
|
self.game.settings.pretense_extra_zone_connections
|
||||||
):
|
):
|
||||||
|
try:
|
||||||
if (
|
if (
|
||||||
cp.is_fleet
|
cp.is_fleet
|
||||||
and cp.captured
|
and cp.captured
|
||||||
@ -1792,13 +1793,18 @@ class PretenseLuaGenerator(LuaGenerator):
|
|||||||
):
|
):
|
||||||
break
|
break
|
||||||
elif len(closest_cps) > extra_connection:
|
elif len(closest_cps) > extra_connection:
|
||||||
lua_string_connman += self.generate_pretense_zone_connection(
|
lua_string_connman += (
|
||||||
|
self.generate_pretense_zone_connection(
|
||||||
connected_points,
|
connected_points,
|
||||||
cp.name,
|
cp.name,
|
||||||
closest_cps[extra_connection].name,
|
closest_cps[extra_connection].name,
|
||||||
)
|
)
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
|
except IndexError:
|
||||||
|
# No more connected points, so no need to continue the loop
|
||||||
|
break
|
||||||
|
|
||||||
lua_string_supply = "local redSupply = {\n"
|
lua_string_supply = "local redSupply = {\n"
|
||||||
# Generate supply
|
# Generate supply
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user