mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
too tired to think about what I just did
This commit is contained in:
1 parent
3b2ba90d83
commit
c8010f9d60
12 files changed
+208
-46
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user