Fixing OCA-bug against FOBs

OCA Aircraft should be properly allowed against FOBs given Ghosti's roadbases
This commit is contained in:
Raffson
2023-07-05 23:23:00 +02:00
parent 785ac6eacc
commit 2ec187bc9c
3 changed files with 6 additions and 4 deletions

View File

@@ -3,7 +3,7 @@ from __future__ import annotations
import logging
from typing import Type
from game.theater import Airfield
from game.theater import Airfield, Fob
from .formationattack import (
FormationAttackBuilder,
FormationAttackFlightPlan,
@@ -23,7 +23,7 @@ class Builder(FormationAttackBuilder[OcaAircraftFlightPlan, FormationAttackLayou
def layout(self) -> FormationAttackLayout:
location = self.package.target
if not isinstance(location, Airfield):
if not isinstance(location, Airfield) and not isinstance(location, Fob):
logging.exception(
f"Invalid Objective Location for OCA/Aircraft flight "
f"{self.flight=} at {location=}."