moved viggen to CAS; tanker position fix on enemy attacks; more logs

This commit is contained in:
Vasyl Horbachenko 2018-07-28 04:58:28 +03:00
parent e93ad8b800
commit 73d4a2d414
5 changed files with 12 additions and 2 deletions

View File

@ -136,7 +136,6 @@ Following tasks are present:
UNIT_BY_TASK = {
CAP: [
C_101CC,
AJS37,
F_5E_3,
Su_27,
Su_33,
@ -151,6 +150,7 @@ UNIT_BY_TASK = {
MiG_15bis,
L_39ZA,
AV8BNA,
AJS37,
A_10A,
A_10C,
Su_25,
@ -347,6 +347,10 @@ PLANE_PAYLOAD_OVERRIDES = {
"*": "R-73*4,R-27R*2,R-27ER*6",
},
AJS37: {
CAS: "CAS (75 GUN): RB-75*2, AKAN",
},
AV8BNA: {
CAS: "AS 2",
},

View File

@ -106,6 +106,7 @@ class AircraftConflictGenerator:
assert count > 0
assert unit is not None
print("airgen: {} for {} at {}".format(unit_type, side.id, airport))
return self.m.flight_group_from_airport(
country=side,
name=name,
@ -129,6 +130,7 @@ class AircraftConflictGenerator:
pos = Point(at.x + random.randint(100, 200), at.y + random.randint(100, 200))
print("airgen: {} for {} at {} at {}".format(unit_type, side.id, alt, speed))
return self.m.flight_group(
country=side,
name=name,
@ -145,6 +147,7 @@ class AircraftConflictGenerator:
assert count > 0
assert unit is not None
print("airgen: {} for {} at carrier {}".format(unit_type, side.id, at))
return self.m.flight_group_from_unit(
country=side,
name=name,

View File

@ -22,9 +22,10 @@ class AirSupportConflictGenerator:
self.game = game
def generate(self, is_awacs_enabled):
player_cp = self.conflict.from_cp if self.conflict.from_cp.captured else self.conflict.to_cp
tanker_unit = db.find_unittype(Refueling, self.conflict.attackers_side.name)[0]
tanker_heading = self.conflict.to_cp.position.heading_between_point(self.conflict.from_cp.position)
tanker_position = self.conflict.from_cp.position.point_from_heading(tanker_heading, TANKER_DISTANCE)
tanker_position = player_cp.position.point_from_heading(tanker_heading, TANKER_DISTANCE)
tanker_group = self.mission.refuel_flight(
country=self.mission.country(self.game.player),
name=namegen.next_tanker_name(self.mission.country(self.game.player)),

View File

@ -34,6 +34,7 @@ class ArmorConflictGenerator:
def _generate_group(self, side: Country, unit: VehicleType, count: int, at: Point, to: Point = None):
for c in range(count):
print("armorgen: {} for {}".format(unit, side.id))
group = self.m.vehicle_group(
side,
namegen.next_unit_name(side, unit),

View File

@ -28,6 +28,7 @@ class ShipGenerator:
def generate_cargo(self, units: db.ShipDict) -> typing.Collection[ShipGroup]:
groups = []
for unit_type, unit_count in units.items():
print("shipgen: {} ({}) for {}".format(unit_type, unit_count, self.conflict.defenders_side))
group = self.m.ship_group(
country=self.conflict.defenders_side,
name=namegen.next_unit_name(self.conflict.defenders_side, unit_type),