private static AgentSkillLevel Build(IIdResolver resolver, SkillLevel x) { return new AgentSkillLevel { Skill = resolver.Get<SkillInfo>(x.SkillCode.ToObjectReference()), Level = x.Level }; }
private static void SpendByOwner(IIdResolver resolver, Settlement settlement, Dictionary<ObjectReference, long> spendByOwner) { settlement._spendByOwner = spendByOwner.ToDictionary(spend => resolver.Get<Corporation>(spend.Key), spend => spend.Value); }
private void LoadHangarItems(IIdResolver idresolver, Structure target, IEnumerable<HangarItemState> hangerItems) { if (target.Owner == null) throw new InvalidOperationException("Cannot load hangar items without owner"); foreach (var hangar in hangerItems) { var corporation = idresolver.Get<Corporation>(hangar.Owner); var items = hangar.Items.Select(i => Item.Builder.Build(i, location:target, owner: corporation).Build(idresolver)); var itemCollection = new ItemCollection(corporation.Property, items); target.Hangar.Add(corporation, itemCollection); } }