2 using System.Collections.Immutable;
8 internal class StartItem
10 public Identifier
Item;
12 public bool MultiPlayerOnly;
14 public StartItem(XElement element)
16 Item = element.GetAttributeIdentifier(
"identifier", Identifier.Empty);
17 Amount = element.GetAttributeInt(nameof(Amount), 1);
18 MultiPlayerOnly = element.GetAttributeBool(nameof(MultiPlayerOnly),
false);
25 internal class StartItemSet : PrefabWithUintIdentifier
27 public readonly
static PrefabCollection<StartItemSet> Sets =
new PrefabCollection<StartItemSet>();
29 public readonly ImmutableArray<StartItem> Items;
34 public readonly
int Order;
36 public StartItemSet(ContentXElement element, StartItemsFile file) : base(file, element.GetAttributeIdentifier(
"identifier",
Identifier.
Empty))
38 Items = element.Elements().Select(e =>
new StartItem(e!)).ToImmutableArray();
39 Order = element.GetAttributeInt(
"order", 0);
42 public override void Dispose() { }
readonly Identifier Identifier