mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
base mission generation framework
This commit is contained in:
30
theater/controlpoint.py
Normal file
30
theater/controlpoint.py
Normal file
@@ -0,0 +1,30 @@
|
||||
import typing
|
||||
import dcs
|
||||
|
||||
from dcs.mapping import *
|
||||
from dcs.country import *
|
||||
|
||||
from gen.conflictgen import Conflict
|
||||
from .base import *
|
||||
|
||||
class ControlPoint:
|
||||
connected_points = [] # type: typing.Collection[ControlPoint]
|
||||
point = None # type: Point
|
||||
captured = False
|
||||
base = None # type: Base
|
||||
|
||||
def __init__(self, point: Point, size: int, importance: int, captured: bool, base: Base):
|
||||
self.point = point
|
||||
self.size = size
|
||||
self.importance = importance
|
||||
self.captured = captured
|
||||
self.base = base
|
||||
|
||||
def connect(self, to):
|
||||
self.connected_points.append(to)
|
||||
|
||||
def conflict_attack(self, x, attacker: Country, defender: Country) -> Conflict:
|
||||
#heading = heading_between_points(self.point.x, self.point.y, x.point.x, x.point.y)
|
||||
return Conflict(attacker, 0, defender, 90, self.point, self.size)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user