3 using Microsoft.Xna.Framework;
5 using System.Collections.Generic;
14 public void AddEntry(Identifier eventPrefabId, Identifier entryId,
string text)
16 TryAddEntryInternal(eventPrefabId, entryId, text);
17 GameMain.GameSession?.EnableEventLogNotificationIcon(enabled:
true);
21 public void CreateEventLogUI(GUIComponent parent, TraitorManager.TraitorResults? traitorResults =
null)
25 int spacing = GUI.IntScale(5);
26 foreach (var ev
in events.Values)
28 LocalizedString nameString =
string.Empty;
29 int difficultyIconCount = 0;
31 EventPrefab.Prefabs.TryGet(ev.EventIdentifier, out EventPrefab? eventPrefab);
32 if (eventPrefab is not
null)
34 nameString = RichString.Rich(eventPrefab.Name);
35 if (eventPrefab is TraitorEventPrefab traitorEventPrefab)
37 difficultyIconCount = traitorEventPrefab.DangerLevel;
40 var textContent =
new List<LocalizedString>();
41 textContent.AddRange(ev.Entries.Select(e => (LocalizedString)e.Text));
43 var icon = GUIStyle.GetComponentStyle(
"TraitorMissionIcon")?.GetDefaultSprite();
45 RoundSummary.CreateMissionEntry(
51 out GUIImage missionIcon);
53 if (traitorResults !=
null &&
54 traitorResults.Value.TraitorEventIdentifier == ev.EventIdentifier)
56 RoundSummary.UpdateMissionStateIcon(traitorResults.Value.ObjectiveSuccessful, missionIcon);
void CreateEventLogUI(GUIComponent parent, TraitorManager.TraitorResults? traitorResults=null)
void AddEntry(Identifier eventPrefabId, Identifier entryId, string text)