public bool Equals(SaveFileGTA3 other) { if (other == null) { return(false); } return(SimpleVars.Equals(other.SimpleVars) && Scripts.Equals(other.Scripts) && PlayerPeds.Equals(other.PlayerPeds) && Garages.Equals(other.Garages) && Vehicles.Equals(other.Vehicles) && Objects.Equals(other.Objects) && Paths.Equals(other.Paths) && Cranes.Equals(other.Cranes) && Pickups.Equals(other.Pickups) && PhoneInfo.Equals(other.PhoneInfo) && RestartPoints.Equals(other.RestartPoints) && RadarBlips.Equals(other.RadarBlips) && Zones.Equals(other.Zones) && Gangs.Equals(other.Gangs) && CarGenerators.Equals(other.CarGenerators) && ParticleObjects.Equals(other.ParticleObjects) && AudioScriptObjects.Equals(other.AudioScriptObjects) && PlayerInfo.Equals(other.PlayerInfo) && Stats.Equals(other.Stats) && Streaming.Equals(other.Streaming) && PedTypeInfo.Equals(other.PedTypeInfo)); }
public void Load(string oplfile) { Name = Path.GetFileNameWithoutExtension(oplfile).ToLowerInvariant(); var lines = File.ReadAllLines(oplfile); bool ininst = false; bool incars = false; foreach (var line in lines) { string tline = line.Trim(); if (string.IsNullOrEmpty(tline)) { continue; //blank line } if (tline.StartsWith("#")) { continue; //commented out } if (tline.StartsWith("version")) { continue; } if (tline.StartsWith("inst")) { ininst = true; continue; } //start of instances if (tline.StartsWith("cars")) { incars = true; continue; } //start of car gens if (tline.StartsWith("end") && (ininst || incars)) { ininst = false; incars = false; continue; } if (ininst) { Entity ent = new Entity(tline); AllEntities.Add(ent); } if (incars) { CarGen cgen = new CarGen(tline); CarGenerators.Add(cgen); } } //ProcessEntities(); }
public bool Equals(SaveFileIV other) { if (other == null) { return(false); } return(Name.Equals(other.Name) && TimeStamp.Equals(other.TimeStamp) && SaveVersion.Equals(other.SaveVersion) && SaveSizeInBytes.Equals(other.SaveSizeInBytes) && ScriptSpaceSize.Equals(other.ScriptSpaceSize) && SimpleVars.Equals(other.SimpleVars) && PlayerInfo.Equals(other.PlayerInfo) && ExtraContent.Equals(other.ExtraContent) && Scripts.Equals(other.Scripts) && Garages.Equals(other.Garages) && GameLogic.Equals(other.GameLogic) && Paths.Equals(other.Paths) && Pickups.Equals(other.Pickups) && RestartPoints.Equals(other.RestartPoints) && RadarBlips.Equals(other.RadarBlips) && Zones.Equals(other.Zones) && GangData.Equals(other.GangData) && CarGenerators.Equals(other.CarGenerators) && Stats.Equals(other.Stats) && IplStore.Equals(other.IplStore) && StuntJumps.Equals(other.StuntJumps) && Radio.Equals(other.Radio) && Objects.Equals(other.Objects) && Relationships.Equals(other.Relationships) && Inventory.Equals(other.Inventory) && UnusedPools.Equals(other.UnusedPools) && UnusedPhoneInfo.Equals(other.UnusedPhoneInfo) && UnusedAudioScript.Equals(other.UnusedAudioScript) && UnusedSetPieces.Equals(other.UnusedSetPieces) && UnusedStreaming.Equals(other.UnusedStreaming) && UnusedPedTypeInfo.Equals(other.UnusedPedTypeInfo) && UnusedTags.Equals(other.UnusedTags) && UnusedShopping.Equals(other.UnusedShopping) && UnusedGangWars.Equals(other.UnusedGangWars) && UnusedEntryExits.Equals(other.UnusedEntryExits) && Unused3dMarkers.Equals(other.Unused3dMarkers) && UnusedVehicles.Equals(other.UnusedVehicles) && UnusedExtraBlock.Equals(other.UnusedExtraBlock) && GfwlData.Equals(other.GfwlData)); }
public bool Equals(SaveFileSA other) { if (other == null) { return(false); } return(SimpleVars.Equals(other.SimpleVars) && Scripts.Equals(other.Scripts) && Pools.Equals(other.Pools) && Garages.Equals(other.Garages) && GameLogic.Equals(other.GameLogic) && Paths.Equals(other.Paths) && Pickups.Equals(other.Pickups) && PhoneInfo.Equals(other.PhoneInfo) && RestartPoints.Equals(other.RestartPoints) && RadarBlips.Equals(other.RadarBlips) && Zones.Equals(other.Zones) && GangData.Equals(other.GangData) && CarGenerators.Equals(other.CarGenerators) && PedGenerators.Equals(other.PedGenerators) && AudioScriptObjects.Equals(other.AudioScriptObjects) && PlayerInfo.Equals(other.PlayerInfo) && Stats.Equals(other.Stats) && SetPieces.Equals(other.SetPieces) && Streaming.Equals(other.Streaming) && PedTypeInfo.Equals(other.PedTypeInfo) && Tags.Equals(other.Tags) && IplStore.Equals(other.IplStore) && Shopping.Equals(other.Shopping) && GangWars.Equals(other.GangWars) && StuntJumps.Equals(other.StuntJumps) && EntryExits.Equals(other.EntryExits) && Radio.Equals(other.Radio) && User3dMarkers.Equals(other.User3dMarkers) && PostEffects.Equals(other.PostEffects)); }
public void Load(string iplfile) { Name = Path.GetFileNameWithoutExtension(iplfile).ToLowerInvariant(); var lines = File.ReadAllLines(iplfile); bool ininst = false; bool incars = false; foreach (var line in lines) { string tline = line.Trim(); if (string.IsNullOrEmpty(tline)) { continue; //blank line } if (tline.StartsWith("#")) { continue; //commented out } //if (tline.StartsWith("version")) continue; if (tline.StartsWith("inst")) { ininst = true; continue; } //start of instances if (tline.StartsWith("cars")) { incars = true; continue; } //start of car gens if (tline.StartsWith("end") && (ininst || incars)) { ininst = false; incars = false; continue; } if (ininst) { Entity ent = new Entity(tline); AllEntities.Add(ent); if (ent.Name.StartsWith("slod")) { SlodEntities.Add(ent); } else if (ent.Name.StartsWith("lod")) { LodEntities.Add(ent); } else { if (ent.ParentIndex < 0) { OEntities.Add(ent); } else { HdEntities.Add(ent); } } } if (incars) { CarGen cgen = new CarGen(tline); CarGenerators.Add(cgen); } } AllLodEntities.Clear(); AllLodEntities.AddRange(SlodEntities); AllLodEntities.AddRange(LodEntities); AllHdEntities.Clear(); AllHdEntities.AddRange(HdEntities); AllHdEntities.AddRange(OEntities); for (int i = 0; i < AllLodEntities.Count; i++) { AllLodEntities[i].NewIndex = i; } for (int i = 0; i < AllHdEntities.Count; i++) { AllHdEntities[i].NewIndex = i; } }