Skip to content

Commit

Permalink
Mission targets inherit system and faction from mission if not presen…
Browse files Browse the repository at this point in the history
…t in target.
  • Loading branch information
aussig committed Jan 18, 2025
1 parent fb63f2c commit 0d04a26
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bgstally/objectivesmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,10 @@ def get_human_readable_objectives(self) -> str:
result += "› " + mission_description + "\n"

for target in mission.get('targets', []):
target_system: str|None = target.get('system', mission_system)
target_faction: str|None = target.get('faction', mission_faction)
target_system: str|None = target.get('system')
if target_system == "" or target_system is None: target_system = mission_system
target_faction: str|None = target.get('faction')
if target_faction == "" or target_faction is None: target_faction = mission_faction
target_station: str|None = target.get('station')
system_activity: dict|None = mission_activity.get_system_by_name(target_system)
faction_activity: dict|None = None if system_activity is None else get_by_path(system_activity, ['Factions', target_faction])
Expand Down

0 comments on commit 0d04a26

Please sign in to comment.