4 using System.Collections.Generic;
8 partial class MineralMission : Mission
21 caves.ForEach(c => c.MissionsToDisplayOnSonar.Remove(
this));
28 base.ClientReadInitial(msg);
30 for (
int i = 0; i < caveCount; i++)
32 byte selectedCaveIndex = msg.
ReadByte();
33 if (selectedCaveIndex < 255 &&
Level.
Loaded !=
null)
38 selectedCave.MissionsToDisplayOnSonar.Add(
this);
39 caves.Add(selectedCave);
43 DebugConsole.ThrowError($
"Cave index out of bounds when reading nest mission data. Index: {selectedCaveIndex}, number of caves: {Level.Loaded.Caves.Count}");
48 for (
int i = 0; i < resourceAmounts.Count; i++)
52 for (
int j = 0; j < amount; j++)
60 if (spawnedResources.TryGetValue(item.Prefab.Identifier, out var resources))
66 spawnedResources.Add(item.Prefab.Identifier,
new List<Item>() { item });
71 CalculateMissionClusterPositions();
73 for(
int i = 0; i < resourceAmounts.Count; i++)
77 var resources =
new Item[count];
78 for (
int j = 0; j < count; j++)
82 if (!(entity is
Item item)) {
continue; }
85 relevantLevelResources.Add(identifier, resources);
static Entity FindEntityByID(ushort ID)
Find an entity based on the ID
static Item ReadSpawnData(IReadMessage msg, bool spawn=true)
override bool DisplayAsFailed
override bool DisplayAsCompleted
override void ClientReadInitial(IReadMessage msg)
Identifier ReadIdentifier()