void ProcessLoadout(Data.Solar.Loadout ld, GameData.SystemObject obj) { foreach (var key in ld.Equip.Keys) { var val = ld.Equip[key]; if (val == null) { continue; } GameData.Items.Equipment equip = GetEquipment(val); //if (equip is GameData.Items.GunEquipment) continue; if (equip != null) { if (key.StartsWith("__noHardpoint", StringComparison.Ordinal)) { obj.LoadoutNoHardpoint.Add(equip); } else { if (!obj.Loadout.ContainsKey(key)) { obj.Loadout.Add(key, equip); } } } } }
public void AddLoadoutsIni(string path, FreelancerData gdata) { foreach (Section s in ParseFile(path)) { switch (s.Name.ToLowerInvariant()) { case "loadout": var l = new Loadout(s, gdata); Loadouts[l.Nickname] = l; break; default: throw new Exception("Invalid Section in " + path + ": " + s.Name); } } }
public void AddLoadoutsIni(string path, FreelancerData gdata) { foreach (Section s in ParseFile(path, gdata.VFS)) { switch (s.Name.ToLowerInvariant()) { case "loadout": var l = new Loadout(s, gdata); if (string.IsNullOrEmpty(l.Nickname)) { FLLog.Error("Loadouts", "Loadout without name at " + s.File + ":" + s.Line); } else { Loadouts[l.Nickname] = l; } break; default: throw new Exception("Invalid Section in " + path + ": " + s.Name); } } }