signature
stringlengths
8
3.44k
body
stringlengths
0
1.41M
docstring
stringlengths
1
122k
id
stringlengths
5
17
def error(self, error_msg):
if self.logger is not None:<EOL><INDENT>self.logger.error(error_msg)<EOL><DEDENT>if self.exc is not None:<EOL><INDENT>raise self.exc(error_msg)<EOL><DEDENT>
Outputs error message on own logger. Also raises exceptions if need be. Args: error_msg: message to output
f11775:c0:m2
@staticmethod<EOL><INDENT>def from_datetime(datetime_: base_datetime.datetime) -> '<STR_LIT>':<DEDENT>
return MissionTime(<EOL>datetime_.year,<EOL>datetime_.month,<EOL>datetime_.day,<EOL>datetime_.hour,<EOL>datetime_.minute,<EOL>datetime_.second<EOL>)<EOL>
Creates MissionTime from datetime.Datetime object :param datetime_: source datetime.datetime :type datetime_: datetime.datetime :return: MissionTime object :rtype: MissionTime
f11778:c0:m0
@staticmethod<EOL><INDENT>def now() -> '<STR_LIT>':<DEDENT>
return MissionTime.from_datetime(base_datetime.datetime.utcnow())<EOL>
Creates a MissionTime object from the current UTC time :return: MissionTime object :rtype: MissionTime
f11778:c0:m1
@staticmethod<EOL><INDENT>def from_miz(miz_file_path: str) -> '<STR_LIT>':<DEDENT>
_miz_file_path = Path(miz_file_path).absolute()<EOL>if not _miz_file_path.exists():<EOL><INDENT>raise MizFileNotFoundError(str(_miz_file_path))<EOL><DEDENT>with Miz(str(_miz_file_path)) as miz:<EOL><INDENT>_year = miz.mission.year<EOL>_month = miz.mission.month<EOL>_day = miz.mission.day<EOL>_minute, _second = divmod(m...
Creates a MissionTime object from a MIZ file :param miz_file_path: path to the source MIZ file :type miz_file_path: str :return: MissionTime object :rtype: MissionTime
f11778:c0:m2
@staticmethod<EOL><INDENT>def from_string(datetime_str: str) -> '<STR_LIT>':<DEDENT>
match = RE_INPUT_STRING.match(datetime_str)<EOL>if not match:<EOL><INDENT>raise InvalidDateTimeString(datetime_str)<EOL><DEDENT>return MissionTime(<EOL>int(match.group('<STR_LIT>')),<EOL>int(match.group('<STR_LIT>')),<EOL>int(match.group('<STR_LIT>')),<EOL>int(match.group('<STR_LIT>')),<EOL>int(match.group('<STR_LIT>')...
Create a MissionTime object from a given string String format must be: YYYYMMDDhhmmss :param datetime_str: source string :type datetime_str: str :return: MissionTime object :rtype: MissionTime
f11778:c0:m3
@property<EOL><INDENT>def datetime(self) -> base_datetime.datetime:<DEDENT>
if not hasattr(self, '<STR_LIT>'):<EOL><INDENT>dt_obj = base_datetime.datetime(self.year, self.month, self.day, self.hour, self.minute, self.second)<EOL>setattr(self, '<STR_LIT>', dt_obj)<EOL><DEDENT>return getattr(self, '<STR_LIT>')<EOL>
:return: datetime object representing this MissionTime :rtype: datetime.datetime
f11778:c0:m4
@property<EOL><INDENT>def mission_start_time(self) -> int:<DEDENT>
return self.hour * <NUM_LIT> + self.minute * <NUM_LIT> + self.second<EOL>
:return: mission start time as per DCS standards :rtype: int
f11778:c0:m5
@property<EOL><INDENT>def iso_format(self) -> str:<DEDENT>
return self.datetime.isoformat()<EOL>
:return: this MissionTime in ISO8601 format :rtype: str
f11778:c0:m6
def apply_to_miz(self, source_miz_file: str, out_miz_file: str, overwrite: bool = False) -> None:
_source_miz_file_path = Path(source_miz_file).absolute()<EOL>_out_miz_file_path = Path(out_miz_file).absolute()<EOL>if not _source_miz_file_path.exists():<EOL><INDENT>raise MizFileNotFoundError(str(_source_miz_file_path))<EOL><DEDENT>if _out_miz_file_path.exists() and not overwrite:<EOL><INDENT>raise MizFileAlreadyExis...
Applies this MissionTime to a MIZ file :param source_miz_file: path to the source MIZ file :type source_miz_file: str :param out_miz_file: path to the target MIZ file :type out_miz_file: str :param overwrite: whether or not to overwrite an existing target file :type overwrite: bool
f11778:c0:m7
def decode(self, text):
LOGGER.debug('<STR_LIT>')<EOL>if not text or type(text) is not str:<EOL><INDENT>raise SLTPParsingError(ERRORS['<STR_LIT>'])<EOL><DEDENT>LOGGER.debug('<STR_LIT>')<EOL>qual = re.compile(r'<STR_LIT>')<EOL>match = qual.match(text)<EOL>if match is None:<EOL><INDENT>raise ValueError('<STR_LIT>'.format(text.split('<STR_LIT:\n...
Decode a Lua string to an dictionary :type text: str :rtype: dict :param text: string to decode :return: dictionary
f11780:c3:m1
def encode(self, obj, qualifier: str):
LOGGER.debug('<STR_LIT>')<EOL>if not obj:<EOL><INDENT>if qualifier.replace('<STR_LIT:=>', '<STR_LIT>').rstrip() == '<STR_LIT>':<EOL><INDENT>return '<STR_LIT>'.format(qualifier, qualifier.replace('<STR_LIT:=>', '<STR_LIT>').rstrip())<EOL><DEDENT>else:<EOL><INDENT>LOGGER.error('<STR_LIT>'.format(qualifier, qualifier.repl...
Encodes a dictionary-like object to a Lua string :param qualifier: :param obj: object to encode :return: valid Lua string
f11780:c3:m2
def get_country_by_name(self, country_name: str) -> typing.Optional['<STR_LIT>']:
VALID_STR.validate(country_name, '<STR_LIT>', exc=ValueError)<EOL>if country_name not in self._countries_by_name.keys():<EOL><INDENT>for country in self.countries:<EOL><INDENT>if country.country_name == country_name:<EOL><INDENT>self._countries_by_name[country_name] = country<EOL>return country<EOL><DEDENT><DEDENT>rais...
Gets a country from its name Args: country_name: country name Returns: Country
f11781:c0:m1
def get_country_by_id(self, country_id: int) -> typing.Optional['<STR_LIT>']:
VALID_POSITIVE_INT.validate(country_id, '<STR_LIT>')<EOL>if country_id not in self._countries_by_id.keys():<EOL><INDENT>for country in self.countries:<EOL><INDENT>if country.country_id == country_id:<EOL><INDENT>self._countries_by_id[country_id] = country<EOL>return country<EOL><DEDENT><DEDENT>raise ValueError(country_...
Gets a country from its name Args: country_id: country id Returns: Country
f11781:c0:m2
def get_groups_from_category(self, category: str) -> typing.Iterator['<STR_LIT>']:
Mission.validator_group_category.validate(category, '<STR_LIT>')<EOL>for group in self.groups:<EOL><INDENT>if group.group_category == category:<EOL><INDENT>yield group<EOL><DEDENT><DEDENT>
Gets all groups from a category Args: category: category Returns: generator of Groups
f11781:c0:m3
def get_units_from_category(self, category: str) -> typing.Iterator['<STR_LIT>']:
Mission.validator_group_category.validate(category, '<STR_LIT>')<EOL>for unit in self.units:<EOL><INDENT>if unit.group_category == category:<EOL><INDENT>yield unit<EOL><DEDENT><DEDENT>
Gets all units from a category Args: category: category Returns: generator of BaseUnit
f11781:c0:m4
def get_group_by_id(self, group_id: str) -> typing.Optional['<STR_LIT>']:
VALID_POSITIVE_INT.validate(group_id, '<STR_LIT>', exc=ValueError)<EOL>for group in self.groups:<EOL><INDENT>if group.group_id == group_id:<EOL><INDENT>return group<EOL><DEDENT><DEDENT>return None<EOL>
Gets a group by id Args: group_id: group id Returns: Group
f11781:c0:m5
def get_clients_groups(self) -> typing.Iterator['<STR_LIT>']:
for group in self.groups:<EOL><INDENT>if group.group_is_client_group:<EOL><INDENT>yield group<EOL><DEDENT><DEDENT>
Gets all clients groups Returns: generator of Groups
f11781:c0:m6
def get_group_by_name(self, group_name: str) -> typing.Optional['<STR_LIT>']:
VALID_STR.validate(group_name, '<STR_LIT>')<EOL>for group in self.groups:<EOL><INDENT>if group.group_name == group_name:<EOL><INDENT>return group<EOL><DEDENT><DEDENT>return None<EOL>
Gets a group from its name Args: group_name: Returns: Group
f11781:c0:m7
def get_unit_by_name(self, unit_name: str) -> typing.Optional['<STR_LIT>']:
VALID_STR.validate(unit_name, '<STR_LIT>')<EOL>for unit in self.units:<EOL><INDENT>if unit.unit_name == unit_name:<EOL><INDENT>return unit<EOL><DEDENT><DEDENT>return None<EOL>
Gets a unit from its name Args: unit_name: unit name Returns:
f11781:c0:m8
def get_unit_by_id(self, unit_id: str) -> typing.Optional['<STR_LIT>']:
VALID_POSITIVE_INT.validate(unit_id, '<STR_LIT>')<EOL>for unit in self.units:<EOL><INDENT>if unit.unit_id == unit_id:<EOL><INDENT>return unit<EOL><DEDENT><DEDENT>return None<EOL>
Gets a unit from its ID Args: unit_id: unit id Returns: Unit
f11781:c0:m9
@property<EOL><INDENT>def units(self) -> typing.Iterator['<STR_LIT>']:<DEDENT>
for group in self.groups:<EOL><INDENT>for unit in group.units:<EOL><INDENT>yield unit<EOL><DEDENT><DEDENT>
Iterates over all units Returns: generator of Unit
f11781:c0:m10
@property<EOL><INDENT>def groups(self) -> typing.Iterator['<STR_LIT>']:<DEDENT>
for country in self.countries:<EOL><INDENT>for group in country.groups:<EOL><INDENT>yield group<EOL><DEDENT><DEDENT>
Iterates over all groups Returns: generator of Group
f11781:c0:m11
@property<EOL><INDENT>def next_group_id(self) -> int:<DEDENT>
ids: typing.Set[int] = set()<EOL>for group in chain(self._blue_coa.groups, self._red_coa.groups): <EOL><INDENT>id_ = group.group_id<EOL>if id_ in ids:<EOL><INDENT>raise IndexError(group.group_name)<EOL><DEDENT>ids.add(id_)<EOL><DEDENT>return max(ids) + <NUM_LIT:1><EOL>
Returns: next free GroupId
f11781:c0:m12
@property<EOL><INDENT>def next_unit_id(self) -> int:<DEDENT>
ids: typing.Set[int] = set()<EOL>for unit in chain(self._blue_coa.units, self._red_coa.units): <EOL><INDENT>id_ = unit.unit_id<EOL>if id_ in ids:<EOL><INDENT>raise IndexError(unit.unit_name)<EOL><DEDENT>ids.add(id_)<EOL><DEDENT>return max(ids) + <NUM_LIT:1><EOL>
Returns: next free Unit ID
f11781:c0:m13
@property<EOL><INDENT>def coalitions(self) -> typing.Iterator['<STR_LIT>']:<DEDENT>
for coalition in [self._blue_coa, self._red_coa]:<EOL><INDENT>yield coalition<EOL><DEDENT>
Returns: generator over all coalitions
f11781:c0:m14
@property<EOL><INDENT>def countries(self) -> typing.Iterator['<STR_LIT>']:<DEDENT>
for coalition in self.coalitions:<EOL><INDENT>for country in coalition.countries:<EOL><INDENT>yield country<EOL><DEDENT><DEDENT>
Returns: generator over all countries
f11781:c0:m15
@property<EOL><INDENT>def day(self) -> int:<DEDENT>
return self._section_date['<STR_LIT>']<EOL>
Returns: return "day" part of the mission start time
f11781:c0:m23
@property<EOL><INDENT>def month(self) -> int:<DEDENT>
return self._section_date['<STR_LIT>']<EOL>
Returns: return "month" part of the mission start time
f11781:c0:m25
@property<EOL><INDENT>def year(self) -> int:<DEDENT>
return self._section_date['<STR_LIT>']<EOL>
Returns: return "year" part of the mission start time
f11781:c0:m27
@property<EOL><INDENT>def mission_start_time(self) -> int:<DEDENT>
return self.d['<STR_LIT>']<EOL>
Returns: raw mission start time
f11781:c0:m29
@property<EOL><INDENT>def mission_start_time_as_string(self) -> str:<DEDENT>
return self._start_time_as_string(self.mission_start_time)<EOL>
Returns: mission start time as string
f11781:c0:m34
@property<EOL><INDENT>def mission_start_date_as_string(self) -> str:<DEDENT>
return self._start_date_as_string(self.day, self.month, self.year)<EOL>
Returns: mission start date as string
f11781:c0:m35
@property<EOL><INDENT>def mission_start_datetime_as_string(self) -> str:<DEDENT>
return f'<STR_LIT>'<EOL>
Returns: mission start time and date as string
f11781:c0:m36
@property<EOL><INDENT>def sortie_name(self):<DEDENT>
return self.l10n[self._sortie_name_key]<EOL>
Returns: sortie name
f11781:c0:m38
@property<EOL><INDENT>def theatre(self) -> str:<DEDENT>
return self.d['<STR_LIT>']<EOL>
:return: mission theater :rtype: str
f11781:c1:m2
@property<EOL><INDENT>def blue_coa(self) -> '<STR_LIT>':<DEDENT>
return self._blue_coa<EOL>
Returns: blue coalition
f11781:c1:m3
@property<EOL><INDENT>def red_coa(self) -> '<STR_LIT>':<DEDENT>
return self._red_coa<EOL>
Returns: red coalitions
f11781:c1:m4
def farps(self) -> typing.Iterator['<STR_LIT>']:
for coa in [self._blue_coa, self._red_coa]:<EOL><INDENT>if coa is not None:<EOL><INDENT>for farp in coa.farps:<EOL><INDENT>yield farp<EOL><DEDENT><DEDENT><DEDENT>
Returns: generator over all FARPs objects
f11781:c1:m5
@property<EOL><INDENT>def bullseye_x(self) -> float:<DEDENT>
return self._section_bullseye['<STR_LIT:x>']<EOL>
Returns: bullseye X coordinate
f11781:c2:m5
@property<EOL><INDENT>def bullseye_y(self) -> float:<DEDENT>
return self._section_bullseye['<STR_LIT:y>']<EOL>
Returns: bullseye Y coordinate
f11781:c2:m6
@property<EOL><INDENT>def bullseye_position(self) -> typing.Tuple[float, float]:<DEDENT>
return self.bullseye_x, self.bullseye_y<EOL>
Returns: bullseye position
f11781:c2:m7
@property<EOL><INDENT>def coalition_name(self) -> str:<DEDENT>
return self._section_coalition['<STR_LIT:name>']<EOL>
Returns: coalition name
f11781:c2:m9
@property<EOL><INDENT>def countries(self) -> typing.Iterator['<STR_LIT>']:<DEDENT>
for k in self._section_country:<EOL><INDENT>if k not in self._countries.keys():<EOL><INDENT>country = Country(self.d, self.l10n, self.coa_color, k)<EOL>self._countries[k] = country<EOL>self._countries_by_id[country.country_id] = country<EOL>self._countries_by_name[country.country_name] = country<EOL><DEDENT>yield self....
Returns: generator over all countries in this coalition
f11781:c2:m11
def get_country_by_name(self, country_name) -> '<STR_LIT>':
VALID_STR.validate(country_name, '<STR_LIT>', exc=ValueError)<EOL>if country_name not in self._countries_by_name.keys():<EOL><INDENT>for country in self.countries:<EOL><INDENT>if country.country_name == country_name:<EOL><INDENT>return country<EOL><DEDENT><DEDENT>raise ValueError(country_name)<EOL><DEDENT>else:<EOL><IN...
Gets a country in this coalition by its name Args: country_name: country name Returns: Country
f11781:c2:m12
def get_country_by_id(self, country_id) -> '<STR_LIT>':
VALID_POSITIVE_INT.validate(country_id, '<STR_LIT>', exc=ValueError)<EOL>if country_id not in self._countries_by_id.keys():<EOL><INDENT>for country in self.countries:<EOL><INDENT>if country.country_id == country_id:<EOL><INDENT>return country<EOL><DEDENT><DEDENT>raise ValueError(country_id)<EOL><DEDENT>else:<EOL><INDEN...
Gets a country in this coalition by its ID Args: country_id: country Id Returns: Country
f11781:c2:m13
@property<EOL><INDENT>def groups(self) -> typing.Iterator['<STR_LIT>']:<DEDENT>
for country in self.countries:<EOL><INDENT>for group in country.groups:<EOL><INDENT>yield group<EOL><DEDENT><DEDENT>
Returns: generator over all groups in this coalition
f11781:c2:m14
@property<EOL><INDENT>def statics(self) -> typing.Iterator['<STR_LIT>']:<DEDENT>
for country in self.countries:<EOL><INDENT>for static in country.statics:<EOL><INDENT>yield static<EOL><DEDENT><DEDENT>
Returns: generator over all statics in this coalition
f11781:c2:m15
@property<EOL><INDENT>def farps(self) -> typing.Iterator['<STR_LIT>']:<DEDENT>
for static in self.statics:<EOL><INDENT>if static.static_is_farp:<EOL><INDENT>yield static<EOL><DEDENT><DEDENT>
Returns: generator over all FARPs in this coalition
f11781:c2:m16
def get_groups_from_category(self, category) -> typing.Iterator['<STR_LIT>']:
Mission.validator_group_category.validate(category, '<STR_LIT>')<EOL>for group in self.groups:<EOL><INDENT>if group.group_category == category:<EOL><INDENT>yield group<EOL><DEDENT><DEDENT>
Args: category: group category Returns: generator over all groups from a specific category in this coalition
f11781:c2:m17
def get_units_from_category(self, category) -> typing.Iterator['<STR_LIT>']:
Mission.validator_group_category.validate(category, '<STR_LIT>')<EOL>for unit in self.units:<EOL><INDENT>if unit.group_category == category:<EOL><INDENT>yield unit<EOL><DEDENT><DEDENT>
Args: category: unit category Returns: generator over all units of a specific category in this coalition
f11781:c2:m18
def get_group_by_id(self, group_id) -> typing.Optional['<STR_LIT>']:
VALID_POSITIVE_INT.validate(group_id, '<STR_LIT>')<EOL>for group in self.groups:<EOL><INDENT>if group.group_id == group_id:<EOL><INDENT>return group<EOL><DEDENT><DEDENT>return None<EOL>
Args: group_id: group ID Returns: Group
f11781:c2:m19
@property<EOL><INDENT>def pilots_control_vehicles(self):<DEDENT>
return self._section_ground_control['<STR_LIT>']<EOL>
Returns: whether or not pilots can control vehicles
f11781:c5:m4
@property<EOL><INDENT>def artillery_commander_red(self) -> int:<DEDENT>
return self._section_artillery_commander['<STR_LIT>']<EOL>
Returns: amount of artillery commander in red coa
f11781:c5:m7
@property<EOL><INDENT>def instructor_blue(self) -> int:<DEDENT>
return self._section_instructor['<STR_LIT>']<EOL>
Returns: amount in instructors in blue coa
f11781:c5:m9
@property<EOL><INDENT>def instructor_red(self) -> int:<DEDENT>
return self._section_instructor['<STR_LIT>']<EOL>
Returns: amount of instructors in red coa
f11781:c5:m11
@property<EOL><INDENT>def observer_blue(self) -> int:<DEDENT>
return self._section_observer['<STR_LIT>']<EOL>
Returns: amount in observers in blue coa
f11781:c5:m14
@property<EOL><INDENT>def observer_red(self) -> int:<DEDENT>
return self._section_observer['<STR_LIT>']<EOL>
Returns: amounts of observers in red coa
f11781:c5:m16
@property<EOL><INDENT>def forward_observer_blue(self) -> int:<DEDENT>
return self._section_forward_observer['<STR_LIT>']<EOL>
Returns: amount of FO in blue coa
f11781:c5:m19
@property<EOL><INDENT>def forward_observer_red(self) -> int:<DEDENT>
return self._section_forward_observer['<STR_LIT>']<EOL>
Returns: amount of FO in red coa
f11781:c5:m21
@property<EOL><INDENT>def artillery_commander_blue(self) -> int:<DEDENT>
return self._section_artillery_commander['<STR_LIT>']<EOL>
Returns: amount of arty commanders in blue coa
f11781:c5:m23
def get_season_code_from_name(self, season_name) -> int:
self.validator_season_name.validate(season_name, '<STR_LIT>')<EOL>return self.seasons_enum[season_name]<EOL>
Args: season_name: season name Returns: season code
f11781:c6:m3
@property<EOL><INDENT>def turbulence(self) -> float:<DEDENT>
return self._section_weather['<STR_LIT>']<EOL>
Returns: turbulence at ground level
f11781:c6:m5
@property<EOL><INDENT>def wind_ground_speed(self) -> int:<DEDENT>
return self._section_wind_at_ground_level['<STR_LIT>']<EOL>
Returns: winds at ground level in ms
f11781:c6:m7
@property<EOL><INDENT>def fog_thickness(self) -> int:<DEDENT>
return self._section_fog['<STR_LIT>']<EOL>
Returns: fog thickness in meters
f11781:c6:m10
@property<EOL><INDENT>def fog_visibility(self) -> int:<DEDENT>
return self._section_fog['<STR_LIT>']<EOL>
Returns: fog visibility in meters
f11781:c6:m12
@property<EOL><INDENT>def fog_enabled(self) -> bool:<DEDENT>
return self._section_weather['<STR_LIT>']<EOL>
Returns: True if fog is enabled
f11781:c6:m14
@property<EOL><INDENT>def dust_enabled(self) -> bool:<DEDENT>
try:<EOL><INDENT>return self._section_weather['<STR_LIT>']<EOL><DEDENT>except KeyError:<EOL><INDENT>return False<EOL><DEDENT>
Returns: True if fog is enabled
f11781:c6:m16
@property<EOL><INDENT>def dust_density(self) -> int:<DEDENT>
try:<EOL><INDENT>return self._section_weather['<STR_LIT>']<EOL><DEDENT>except KeyError:<EOL><INDENT>return <NUM_LIT><EOL><DEDENT>
Returns: fog visibility in meters
f11781:c6:m18
@property<EOL><INDENT>def visibility(self) -> int:<DEDENT>
return self._section_visibility['<STR_LIT>']<EOL>
Returns: visibility in meters
f11781:c6:m21
@property<EOL><INDENT>def precipitation_code(self) -> int:<DEDENT>
return self._section_clouds['<STR_LIT>']<EOL>
Returns: precipitation code
f11781:c6:m23
@property<EOL><INDENT>def wind_at8000_dir(self) -> int:<DEDENT>
return self._section_wind_at8000['<STR_LIT>']<EOL>
Returns: wind direction at 8000m
f11781:c6:m25
@property<EOL><INDENT>def temperature(self) -> int:<DEDENT>
return self._section_season['<STR_LIT>']<EOL>
Returns: temperature in Celsius
f11781:c6:m28
@property<EOL><INDENT>def wind_ground_dir(self) -> int:<DEDENT>
return self._section_wind_at_ground_level['<STR_LIT>']<EOL>
Returns: wind speed at ground level
f11781:c6:m31
@property<EOL><INDENT>def season_name(self) -> str:<DEDENT>
return self.seasons_enum[self.season_code]['<STR_LIT:name>']<EOL>
Returns: name of the season
f11781:c6:m35
@property<EOL><INDENT>def altimeter(self) -> int:<DEDENT>
return self._section_weather['<STR_LIT>']<EOL>
Returns: pressure in mmHg
f11781:c6:m36
@property<EOL><INDENT>def wind_at2000_speed(self) -> int:<DEDENT>
return self._section_wind_at2000['<STR_LIT>']<EOL>
Returns: wind speed at 2000 meters
f11781:c6:m38
@property<EOL><INDENT>def wind_at2000_dir(self) -> int:<DEDENT>
return self._section_wind_at2000['<STR_LIT>']<EOL>
Returns: wind direction at 2000 meters
f11781:c6:m40
@property<EOL><INDENT>def atmosphere_type(self) -> int:<DEDENT>
return self._section_weather['<STR_LIT>']<EOL>
Returns: atmosphere type (0: static, 1: dynamic)
f11781:c6:m43
@property<EOL><INDENT>def season_code(self) -> int:<DEDENT>
return self._section_season['<STR_LIT>']<EOL>
Returns: season code
f11781:c6:m45
@property<EOL><INDENT>def cloud_thickness(self) -> int:<DEDENT>
return self._section_clouds['<STR_LIT>']<EOL>
Returns: cloud thickness
f11781:c6:m48
@property<EOL><INDENT>def cloud_base(self) -> int:<DEDENT>
return self._section_clouds['<STR_LIT>']<EOL>
Returns: cloud base
f11781:c6:m50
@property<EOL><INDENT>def cloud_density(self) -> int:<DEDENT>
return self._section_clouds['<STR_LIT>']<EOL>
Returns: cloud density (0 to 10)
f11781:c6:m52
@property<EOL><INDENT>def wind_at8000_speed(self) -> int:<DEDENT>
return self._section_wind_at8000['<STR_LIT>']<EOL>
Returns: wind speed at 8000 meters
f11781:c6:m54
@property<EOL><INDENT>def country_id(self) -> int:<DEDENT>
return self._section_this_country['<STR_LIT:id>']<EOL>
Returns: country Id
f11781:c7:m4
@property<EOL><INDENT>def country_name(self) -> str:<DEDENT>
return self._section_this_country['<STR_LIT:name>']<EOL>
Returns: country name
f11781:c7:m5
@property<EOL><INDENT>def groups(self) -> typing.Iterator['<STR_LIT>']:<DEDENT>
for group_category in Mission.valid_group_categories:<EOL><INDENT>if group_category in self._section_this_country.keys():<EOL><INDENT>for group_index in self._section_this_country[group_category]['<STR_LIT>']:<EOL><INDENT>if group_index not in self.__groups[group_category]:<EOL><INDENT>self.__groups[group_category][gro...
Returns: generator of all groups in this country
f11781:c7:m6
@property<EOL><INDENT>def statics(self) -> typing.Iterator['<STR_LIT>']:<DEDENT>
if '<STR_LIT>' in self._section_this_country.keys():<EOL><INDENT>for static_index in self._section_this_country['<STR_LIT>']['<STR_LIT>']:<EOL><INDENT>if static_index not in self.__static:<EOL><INDENT>self.__static[static_index] = Static(self.d, self.l10n, self.coa_color,<EOL>self.country_index, static_index)<EOL><DEDE...
Returns: generator of all statics in this country
f11781:c7:m7
def get_groups_from_category(self, category) -> typing.Iterator['<STR_LIT>']:
Mission.validator_group_category.validate(category, '<STR_LIT>')<EOL>for group in self.groups:<EOL><INDENT>if group.group_category == category:<EOL><INDENT>yield group<EOL><DEDENT><DEDENT>
Args: category: category Returns: all groups from a specific category in this country
f11781:c7:m8
def get_group_by_id(self, group_id) -> typing.Optional['<STR_LIT>']:
for group in self.groups:<EOL><INDENT>if group.group_id == group_id:<EOL><INDENT>return group<EOL><DEDENT><DEDENT>return None<EOL>
Args: group_id: group id Returns: Group
f11781:c7:m9
@property<EOL><INDENT>def static_id(self) -> int:<DEDENT>
return self._section_static['<STR_LIT>']<EOL>
Returns: static id
f11781:c8:m1
@property<EOL><INDENT>def static_name(self) -> str:<DEDENT>
return self.l10n[self._static_name_key]<EOL>
Returns: static name
f11781:c8:m5
@property<EOL><INDENT>def static_category(self) -> str:<DEDENT>
return self._section_static['<STR_LIT>'][<NUM_LIT:1>]['<STR_LIT>']<EOL>
Returns: static category
f11781:c8:m7
@property<EOL><INDENT>def static_is_farp(self) -> bool:<DEDENT>
return self.static_category == '<STR_LIT>'<EOL>
Returns: True if statics is a Farp
f11781:c8:m8
@property<EOL><INDENT>def static_position(self) -> typing.Tuple[float, float]:<DEDENT>
unit = self._section_static['<STR_LIT>'][<NUM_LIT:1>]<EOL>return unit['<STR_LIT:x>'], unit['<STR_LIT:y>']<EOL>
Returns: position of this static
f11781:c8:m9
@property<EOL><INDENT>def group_route(self) -> '<STR_LIT>':<DEDENT>
<EOL>if self.__group_route is None:<EOL><INDENT>self.__group_route = Group.Route(self)<EOL><DEDENT>return self.__group_route<EOL>
Returns: route of this group
f11781:c9:m3
@property<EOL><INDENT>def group_name(self) -> str:<DEDENT>
return self.l10n[self._group_name_key]<EOL>
Returns: group name
f11781:c9:m7
@property<EOL><INDENT>def group_hidden(self) -> bool:<DEDENT>
return self._section_group['<STR_LIT>']<EOL>
Returns: true if this group is hidden
f11781:c9:m9
@property<EOL><INDENT>def group_id(self) -> int:<DEDENT>
return self._section_group['<STR_LIT>']<EOL>
Returns: group id
f11781:c9:m11
@property<EOL><INDENT>def group_start_delay(self) -> int:<DEDENT>
return self._section_group['<STR_LIT>']<EOL>
Returns: group start delay
f11781:c9:m13
@property<EOL><INDENT>def group_start_time(self) -> int:<DEDENT>
return self.group_start_delay + self.mission_start_time<EOL>
Returns: group actual start time
f11781:c9:m15