mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Disabled the base Retribution plugin in pretenseluagenerator.py and disabled adding zones for OffMapSpawns.
This commit is contained in:
parent
13e7e976c3
commit
0b8fa9099c
@ -15,7 +15,7 @@ from game.ato import FlightType
|
||||
from game.dcs.aircrafttype import AircraftType
|
||||
from game.missiongenerator.luagenerator import LuaGenerator
|
||||
from game.plugins import LuaPluginManager
|
||||
from game.theater import TheaterGroundObject, Airfield
|
||||
from game.theater import TheaterGroundObject, Airfield, OffMapSpawn
|
||||
from game.theater.iadsnetwork.iadsrole import IadsRole
|
||||
from game.utils import escape_string_for_lua
|
||||
from game.missiongenerator.missiondata import MissionData
|
||||
@ -68,6 +68,9 @@ class PretenseLuaGenerator(LuaGenerator):
|
||||
lua_string_zones = ""
|
||||
|
||||
for cp in self.game.theater.controlpoints:
|
||||
if isinstance(cp, OffMapSpawn):
|
||||
continue
|
||||
|
||||
cp_name_trimmed = "".join([i for i in cp.name.lower() if i.isalnum()])
|
||||
cp_side = 2 if cp.captured else 1
|
||||
for side in range(1, 3):
|
||||
@ -401,7 +404,7 @@ class PretenseLuaGenerator(LuaGenerator):
|
||||
|
||||
def inject_plugins(self) -> None:
|
||||
for plugin in LuaPluginManager.plugins():
|
||||
if plugin.enabled:
|
||||
if plugin.enabled and plugin.identifier not in ("base"):
|
||||
plugin.inject_scripts(self)
|
||||
plugin.inject_configuration(self)
|
||||
|
||||
|
||||
@ -219,14 +219,11 @@ class ConflictTheater:
|
||||
for other_cp in control_points:
|
||||
if cp == other_cp:
|
||||
continue
|
||||
print(f"{cp}: {other_cp} being evaluated...")
|
||||
|
||||
dist = other_cp.position.distance_to_point(cp.position)
|
||||
print(f" {other_cp} is at {dist} meters")
|
||||
distances_to_cp[dist] = other_cp
|
||||
for i in sorted(distances_to_cp.keys()):
|
||||
other_cp = distances_to_cp[i]
|
||||
print(f" {other_cp} is at {i} meters")
|
||||
if closest_cp is None:
|
||||
closest_cp = other_cp
|
||||
continue
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user