Example #1
0
        static void ImportMissingNamedVectors(AmfObject cocItems, IEnumerable<XmlNamedVector4> xmlItems, string cocNameProperty, Func<AmfObject, String> descriptionGetter = null, IList<XmlNamedVector4> targetXmlList = null)
        {
            if (targetXmlList == null) targetXmlList = (IList<XmlNamedVector4>)xmlItems;
            var xmlNames = new HashSet<String>(xmlItems.Select(x => x.Name));

            foreach (var pair in cocItems)
            {
                var name = pair.ValueAsObject.GetString(cocNameProperty);
                if (xmlNames.Contains(name)) continue;
                xmlNames.Add(name);

                var xml = new XmlNamedVector4 { Name = name };
                if (descriptionGetter != null) xml.Description = descriptionGetter(pair.ValueAsObject);
                targetXmlList.Add(xml);
            }
        }
Example #2
0
 protected NamedVector4VM(GameVM game, AmfObject items, XmlNamedVector4 xml)
 {
     _xml = xml;
     _game = game;
     _items = items;
 }
Example #3
0
 public KeyItemVM(GameVM game, AmfObject keyItems, XmlNamedVector4 xml)
     : base(game, keyItems, xml)
 {
 }
Example #4
0
 public StatusVM(GameVM game, AmfObject allStatuses, XmlNamedVector4 xml)
     : base(game, allStatuses, xml)
 {
 }
Example #5
0
 public PerkVM(GameVM game, AmfObject perksArray, XmlNamedVector4 xml)
     : base(game, perksArray, xml)
 {
 }