public override void Parse(MetaFile meta, CScenarioPointContainer CScenarioPointContainer) { this.Meta = meta; this.MetaStructure = CScenarioPointContainer; var LoadSavePoints = MetaUtils.ConvertDataArray <CExtensionDefSpawnPoint>(meta, CScenarioPointContainer.LoadSavePoints); this.LoadSavePoints = LoadSavePoints?.Select(e => { var msw = new MCExtensionDefSpawnPoint(); msw.Parse(meta, e); return(msw); }).ToList(); var MyPoints = MetaUtils.ConvertDataArray <CScenarioPoint>(meta, CScenarioPointContainer.MyPoints); this.MyPoints = MyPoints?.Select(e => { var msw = new MCScenarioPoint(); msw.Parse(meta, e); return(msw); }).ToList(); }
public override void Parse(MetaFile meta, CScenarioEntityOverride CScenarioEntityOverride) { this.Meta = meta; this.MetaStructure = CScenarioEntityOverride; this.EntityPosition = CScenarioEntityOverride.EntityPosition; this.EntityType = CScenarioEntityOverride.EntityType; var ScenarioPoints = MetaUtils.ConvertDataArray <CExtensionDefSpawnPoint>(meta, CScenarioEntityOverride.ScenarioPoints); this.ScenarioPoints = ScenarioPoints?.Select(e => { var msw = new MCExtensionDefSpawnPoint(); msw.Parse(meta, e); return(msw); }).ToList(); this.Unk_538733109 = CScenarioEntityOverride.Unk_538733109; this.Unk_1035513142 = CScenarioEntityOverride.Unk_1035513142; }
public override void Parse(MetaFile meta, CMloArchetypeDef CMloArchetypeDef) { this.Meta = meta; this.MetaStructure = CMloArchetypeDef; this.LodDist = CMloArchetypeDef.lodDist; this.Flags = CMloArchetypeDef.flags; this.SpecialAttribute = CMloArchetypeDef.specialAttribute; this.BbMin = CMloArchetypeDef.bbMin; this.BbMax = CMloArchetypeDef.bbMax; this.BsCentre = CMloArchetypeDef.bsCentre; this.BsRadius = CMloArchetypeDef.bsRadius; this.HdTextureDist = CMloArchetypeDef.hdTextureDist; this.Name = CMloArchetypeDef.name; this.TextureDictionary = CMloArchetypeDef.textureDictionary; this.ClipDictionary = CMloArchetypeDef.clipDictionary; this.DrawableDictionary = CMloArchetypeDef.drawableDictionary; this.PhysicsDictionary = CMloArchetypeDef.physicsDictionary; this.AssetType = CMloArchetypeDef.assetType; this.AssetName = CMloArchetypeDef.assetName; // Extensions var extptrs = MetaUtils.GetPointerArray(meta, CMloArchetypeDef.extensions); if (extptrs != null) { for (int i = 0; i < extptrs.Length; i++) { var extptr = extptrs[i]; var block = meta.GetBlock(extptr.BlockID); switch (block.StructureNameHash) { case MetaName.CExtensionDefAudioCollisionSettings: { var data = MetaUtils.GetData <CExtensionDefAudioCollisionSettings>(meta, extptr); var obj = new MCExtensionDefAudioCollisionSettings(); obj.Parse(meta, data); ExtensionDefAudioCollisionSettings.Add(obj); break; } case MetaName.CExtensionDefAudioEmitter: { var data = MetaUtils.GetData <CExtensionDefAudioEmitter>(meta, extptr); var obj = new MCExtensionDefAudioEmitter(); obj.Parse(meta, data); ExtensionDefAudioEmitters.Add(obj); break; } case MetaName.CExtensionDefBuoyancy: { var data = MetaUtils.GetData <CExtensionDefBuoyancy>(meta, extptr); var obj = new MCExtensionDefBuoyancy(); obj.Parse(meta, data); ExtensionDefBuoyancies.Add(obj); break; } case MetaName.CExtensionDefExplosionEffect: { var data = MetaUtils.GetData <CExtensionDefExplosionEffect>(meta, extptr); var obj = new MCExtensionDefExplosionEffect(); obj.Parse(meta, data); ExtensionDefExplosionEffects.Add(obj); break; } case MetaName.CExtensionDefExpression: { var data = MetaUtils.GetData <CExtensionDefExpression>(meta, extptr); var obj = new MCExtensionDefExpression(); obj.Parse(meta, data); ExtensionDefExpressions.Add(obj); break; } case MetaName.CExtensionDefLadder: { var data = MetaUtils.GetData <CExtensionDefLadder>(meta, extptr); var obj = new MCExtensionDefLadder(); obj.Parse(meta, data); ExtensionDefLadders.Add(obj); break; } case MetaName.CExtensionDefLightShaft: { var data = MetaUtils.GetData <CExtensionDefLightShaft>(meta, extptr); var obj = new MCExtensionDefLightShaft(); obj.Parse(meta, data); ExtensionDefLightShafts.Add(obj); break; } case MetaName.CExtensionDefParticleEffect: { var data = MetaUtils.GetData <CExtensionDefParticleEffect>(meta, extptr); var obj = new MCExtensionDefParticleEffect(); obj.Parse(meta, data); ExtensionDefParticleEffects.Add(obj); break; } case MetaName.CExtensionDefProcObject: { var data = MetaUtils.GetData <CExtensionDefProcObject>(meta, extptr); var obj = new MCExtensionDefProcObject(); obj.Parse(meta, data); ExtensionDefProcObjects.Add(obj); break; } case MetaName.CExtensionDefSpawnPoint: { var data = MetaUtils.GetData <CExtensionDefSpawnPoint>(meta, extptr); var obj = new MCExtensionDefSpawnPoint(); obj.Parse(meta, data); ExtensionDefSpawnPoints.Add(obj); break; } case MetaName.CExtensionDefWindDisturbance: { var data = MetaUtils.GetData <CExtensionDefWindDisturbance>(meta, extptr); var obj = new MCExtensionDefWindDisturbance(); obj.Parse(meta, data); ExtensionDefWindDisturbances.Add(obj); break; } default: break; } } } this.MloFlags = CMloArchetypeDef.mloFlags; this.Entities = MetaUtils.ConvertDataArray <CEntityDef>(this.Meta, CMloArchetypeDef.entities)?.Select(e => { var obj = new MCEntityDef(); obj.Parse(meta, e); return(obj); }).ToList() ?? new List <MCEntityDef>(); var rooms = MetaUtils.ConvertDataArray <CMloRoomDef>(meta, CMloArchetypeDef.rooms); this.Rooms = rooms?.Select(e => { var msw = new MCMloRoomDef(this); msw.Parse(meta, e); return(msw); }).ToList(); var portals = MetaUtils.ConvertDataArray <CMloPortalDef>(meta, CMloArchetypeDef.portals); this.Portals = portals?.Select(e => { var msw = new MCMloPortalDef(); msw.Parse(meta, e); return(msw); }).ToList(); var entitySets = MetaUtils.ConvertDataArray <CMloEntitySet>(meta, CMloArchetypeDef.entitySets); this.EntitySets = entitySets?.Select(e => { var msw = new MCMloEntitySet(); msw.Parse(meta, e); return(msw); }).ToList(); var timeCycleModifiers = MetaUtils.ConvertDataArray <CMloTimeCycleModifier>(meta, CMloArchetypeDef.timeCycleModifiers); this.TimeCycleModifiers = timeCycleModifiers?.Select(e => { var msw = new MCMloTimeCycleModifier(); msw.Parse(meta, e); return(msw); }).ToList(); }