Skip to content

Commit

Permalink
Clean up relevant comm task filtering.
Browse files Browse the repository at this point in the history
  • Loading branch information
sei-jvessella committed Feb 20, 2024
1 parent 2272d16 commit 05d6ee2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion gamebrain/gamedata/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -2518,7 +2518,9 @@ def _find_comm_event_to_activate(
):
def is_relevant_task(global_task: InternalGlobalTaskData) -> bool:
team_task = team_data.tasks.get(global_task.taskID)
if not (team_task and team_task.visible):
if not team_task:
return False
if not team_task.visible:
return False
if team_task.complete:
return False
Expand All @@ -2532,6 +2534,10 @@ def is_relevant_task(global_task: InternalGlobalTaskData) -> bool:
!= team_data.currentStatus.currentLocation
):
return False
logging.info(
f"{global_task.taskID} is considered "
"a relevant comm event task."
)
return True

relevant_tasks = list(
Expand Down

0 comments on commit 05d6ee2

Please sign in to comment.