mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Require factories for purchasing ground units.
https://github.com/Khopa/dcs_liberation/issues/986
This commit is contained in:
@@ -31,6 +31,7 @@ from game.point_with_heading import PointWithHeading
|
||||
from .theatergroundobject import (
|
||||
BaseDefenseGroundObject,
|
||||
EwrGroundObject,
|
||||
FactoryGroundObject,
|
||||
GenericCarrierGroundObject,
|
||||
SamGroundObject,
|
||||
TheaterGroundObject,
|
||||
@@ -312,6 +313,16 @@ class ControlPoint(MissionTarget, ABC):
|
||||
connected.extend(cp.transitive_connected_friendly_points(seen))
|
||||
return connected
|
||||
|
||||
def can_recruit_ground_units(self, game: Game) -> bool:
|
||||
"""Returns True if this control point is capable of recruiting ground units."""
|
||||
if not game.settings.enable_new_ground_unit_recruitment:
|
||||
return True
|
||||
|
||||
for tgo in self.connected_objectives:
|
||||
if isinstance(tgo, FactoryGroundObject) and not tgo.is_dead:
|
||||
return True
|
||||
return False
|
||||
|
||||
@property
|
||||
def is_carrier(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user