3 using System.Collections.Generic;
8 partial class ScanMission : Mission
16 return scanTargets.Where(kvp => !kvp.Value).Select(kvp => kvp.Key);
20 return Enumerable.Empty<
Entity>();
30 base.ClientReadInitial(msg);
31 startingItems.Clear();
33 for (
int i = 0; i < itemCount; i++)
37 if (startingItems.Contains(
null))
39 throw new Exception($
"Error in ScanMission.ClientReadInitial: item list contains null (mission: {Prefab.Identifier})");
41 if (startingItems.Count != itemCount)
43 throw new Exception($
"Error in ScanMission.ClientReadInitial: item count does not match the server count ({itemCount} != {startingItems.Count}, mission: {Prefab.Identifier})");
47 ClientReadScanTargetStatus(msg);
53 ClientReadScanTargetStatus(msg);
56 private void ClientReadScanTargetStatus(
IReadMessage msg)
60 for (
int i = 0; i < targetsToScan; i++)
67 string errorMsg = $
"Failed to find a waypoint in ScanMission.ClientReadScanTargetStatus. Entity {id} was {(entity?.ToString() ?? null)}";
68 DebugConsole.ThrowError(errorMsg);
69 GameAnalyticsManager.AddErrorEventOnce(
"ScanMission.ClientReadScanTargetStatus", GameAnalyticsManager.ErrorSeverity.Error, errorMsg);
73 scanTargets.Add(wayPoint, scanned);
static Entity FindEntityByID(ushort ID)
Find an entity based on the ID
static Item ReadSpawnData(IReadMessage msg, bool spawn=true)
override bool DisplayAsFailed
override void ClientRead(IReadMessage msg)
override bool DisplayAsCompleted
override void ClientReadInitial(IReadMessage msg)
override IEnumerable< Entity > HudIconTargets