mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Limit task type combo box to valid mission types.
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
from typing import List
|
||||
import uuid
|
||||
|
||||
from dcs.mapping import Point
|
||||
|
||||
from .missiontarget import MissionTarget
|
||||
|
||||
|
||||
NAME_BY_CATEGORY = {
|
||||
"power": "Power plant",
|
||||
"ammo": "Ammo depot",
|
||||
@@ -102,3 +100,11 @@ class TheaterGroundObject(MissionTarget):
|
||||
@property
|
||||
def name(self) -> str:
|
||||
return self.obj_name
|
||||
|
||||
def parent_control_point(
|
||||
self, theater: "ConflictTheater") -> "ControlPoint":
|
||||
"""Searches the theater for the parent control point."""
|
||||
for cp in theater.controlpoints:
|
||||
if cp.id == self.cp_id:
|
||||
return cp
|
||||
raise RuntimeError("Could not find matching control point in theater")
|
||||
|
||||
Reference in New Issue
Block a user