mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Create a checked, releasable type for laser codes.
The release behavior isn't used yet, but I'm working on pre-allocating laser codes for front lines and flights to make it easier for players to pick the laser codes for their weapons.
This commit is contained in:
@@ -148,7 +148,7 @@ class FlightGroupConfigurator:
|
||||
) -> None:
|
||||
self.set_skill(unit, member)
|
||||
if member.loadout.has_weapon_of_type(WeaponTypeEnum.TGP) and member.is_player:
|
||||
laser_codes.append(self.laser_code_registry.alloc_laser_code())
|
||||
laser_codes.append(self.laser_code_registry.alloc_laser_code().code)
|
||||
else:
|
||||
laser_codes.append(None)
|
||||
settings = self.flight.coalition.game.settings
|
||||
|
||||
@@ -144,13 +144,12 @@ class FlotGenerator:
|
||||
|
||||
# Add JTAC
|
||||
if self.game.blue.faction.has_jtac:
|
||||
code: int
|
||||
freq = self.radio_registry.alloc_uhf()
|
||||
# If the option fc3LaserCode is enabled, force all JTAC
|
||||
# laser codes to 1113 to allow lasing for Su-25 Frogfoots and A-10A Warthogs.
|
||||
# Otherwise use 1688 for the first JTAC, 1687 for the second etc.
|
||||
if self.game.settings.plugins.get("ctld.fc3LaserCode"):
|
||||
code = 1113
|
||||
code = self.laser_code_registry.fc3_code
|
||||
else:
|
||||
code = self.laser_code_registry.alloc_laser_code()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user