too tired to think about what I just did

This commit is contained in:
Gurge44 committed 2024-11-27 21:58:53 +01:00
1 parent 3b2ba90d83
commit c8010f9d60
12 files changed
+208 -46

No files matched your search

+14
View File
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Linq;
using AmongUs.GameOptions;
using EHR.AddOns.Crewmate;
using EHR.AddOns.GhostRoles;
@@ -255,6 +256,19 @@ namespace EHR
// Convert list of tasks to array (Il2CppStructArray)
taskTypeIds = new(TasksList.Count);
for (var i = 0; i < TasksList.Count; i++) taskTypeIds[i] = TasksList[i];
Il2CppSystem.Text.StringBuilder sb = new();
foreach (TaskTypes taskType in usedTaskTypes)
{
GetTaskFromTaskType(taskType).AppendTaskText(sb);
}
Logger.Info($" Assigned tasks:\n{sb.Replace("\r\n", "\n")}", pc.GetRealName(), multiLine: true);
return;
PlayerTask GetTaskFromTaskType(TaskTypes type) => ShortTasks.ToArray().Concat(LongTasks.ToArray()).FirstOrDefault(t => t.TaskType == type);
}
private static void Shuffle<T>(Il2CppSystem.Collections.Generic.List<T> list)