Skip to content

Commit

Permalink
fix tasks when dead
Browse files Browse the repository at this point in the history
  • Loading branch information
TimShaw1 committed Jul 9, 2023
1 parent cd65e45 commit 84b53fd
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions AmongUsAI/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,16 @@ public static void Postfix(PlayerControl __instance)

// Task List
big_output_string += "[";
bool skip = false;
if (__instance.Data.IsDead && TranslateSystemTypes(currentTasks[0].StartAt).Equals("Hallway") && TranslateTaskTypes(currentTasks[0].TaskType).Equals("Submit Scan"))
skip = true;
foreach (var task in currentTasks)
{
if (skip)
{
skip = false;
continue;
}
if (task != currentTasks.Last())
big_output_string += TranslateTaskTypes(task.TaskType) + ", ";
else
Expand All @@ -290,8 +298,15 @@ public static void Postfix(PlayerControl __instance)

// Task Locations
big_output_string += "[";
if (__instance.Data.IsDead && TranslateSystemTypes(currentTasks[0].StartAt).Equals("Hallway"))
skip = true;
foreach (var task in currentTasks)
{
if (skip)
{
skip = false;
continue;
}
try
{
if (map.ToString() != "Ship")
Expand Down

0 comments on commit 84b53fd

Please sign in to comment.