// Token: 0x06000F6D RID: 3949 RVA: 0x00068338 File Offset: 0x00066738 public void read(IFormattedFileReader reader) { reader = reader.readObject(this.key); if (reader == null) { return; } if (reader.containsKey("Text") && reader.containsKey("Version")) { this.addLeaf(); reader.readKey("Text"); this.leaf.text = reader.readValue <string>(); reader.readKey("Version"); this.leaf.version = reader.readValue <int>(); } else { this.addBranches(); foreach (string key in reader.getKeys()) { TranslationBranch translationBranch = this.addBranch(key); reader.readKey(key); translationBranch.read(reader); } } }
// Token: 0x06000C4D RID: 3149 RVA: 0x0005CCD4 File Offset: 0x0005B0D4 protected override void readAsset(IFormattedFileReader reader) { base.readAsset(reader); this.mesh = reader.readValue <ContentReference <Mesh> >("Mesh"); this.material = reader.readValue <ContentReference <Material> >("Material"); if (reader.containsKey("Cast_Shadows")) { this.castShadows = reader.readValue <bool>("Cast_Shadows"); } else { this.castShadows = false; } if (reader.containsKey("Tile_Dither")) { this.tileDither = reader.readValue <bool>("Tile_Dither"); } else { this.tileDither = true; } if (reader.containsKey("Draw_Distance")) { this.drawDistance = reader.readValue <int>("Draw_Distance"); } else { this.drawDistance = -1; } }
protected override void readHierarchyItem(IFormattedFileReader reader) { base.readHierarchyItem(reader); if (reader.containsKey("Emission")) { this._emissionMultiplier = reader.readValue <float>("Emission"); } if (reader.containsKey("Audio_Range")) { this._audioRangeMultiplier = reader.readValue <float>("Audio_Range"); } this.id = reader.readValue <ushort>("ID"); }
// Token: 0x06000CEB RID: 3307 RVA: 0x0005F330 File Offset: 0x0005D730 protected override void readHierarchyItem(IFormattedFileReader reader) { base.readHierarchyItem(reader); this.mode = reader.readValue <FoliageVolume.EFoliageVolumeMode>("Mode"); if (reader.containsKey("Instanced_Meshes")) { this.instancedMeshes = reader.readValue <bool>("Instanced_Meshes"); } if (reader.containsKey("Resources")) { this.resources = reader.readValue <bool>("Resources"); } if (reader.containsKey("Objects")) { this.objects = reader.readValue <bool>("Objects"); } }
// Token: 0x060008EB RID: 2283 RVA: 0x0004E040 File Offset: 0x0004C440 protected override void readHierarchyItem(IFormattedFileReader reader) { base.readHierarchyItem(reader); this.id = reader.readValue <ushort>("Ambiance_ID"); this.noWater = reader.readValue <bool>("No_Water"); this.noLighting = reader.readValue <bool>("No_Lighting"); if (reader.containsKey("Can_Rain")) { this.canRain = reader.readValue <bool>("Can_Rain"); } if (reader.containsKey("Can_Snow")) { this.canSnow = reader.readValue <bool>("Can_Snow"); } this.overrideFog = reader.readValue <bool>("Override_Fog"); this.fogColor = reader.readValue <Color>("Fog_Color"); this.fogHeight = reader.readValue <float>("Fog_Height"); }
protected override void readAsset(IFormattedFileReader reader) { base.readAsset(reader); this.resource = reader.readValue <AssetReference <ResourceAsset> >("Resource"); if (reader.containsKey("Obstruction_Radius")) { this.obstructionRadius = reader.readValue <float>("Obstruction_Radius"); } }
public virtual void read(IFormattedFileReader reader) { if (reader.containsKey("Available_Instance_ID")) { LevelHierarchy.availableInstanceID = reader.readValue <uint>("Available_Instance_ID"); } else { LevelHierarchy.availableInstanceID = 1u; } int num = reader.readArrayLength("Items"); for (int i = 0; i < num; i++) { IFormattedFileReader formattedFileReader = reader.readObject(i); Type type = formattedFileReader.readValue <Type>("Type"); if (type == null) { Debug.LogError(string.Concat(new object[] { "Level hierarchy item index ", i, " missing type: ", formattedFileReader.readValue("Type") })); } else { IDevkitHierarchyItem devkitHierarchyItem; if (typeof(MonoBehaviour).IsAssignableFrom(type)) { devkitHierarchyItem = (new GameObject { name = type.Name }.AddComponent(type) as IDevkitHierarchyItem); } else { devkitHierarchyItem = (Activator.CreateInstance(type) as IDevkitHierarchyItem); } if (devkitHierarchyItem != null) { if (formattedFileReader.containsKey("Instance_ID")) { devkitHierarchyItem.instanceID = formattedFileReader.readValue <uint>("Instance_ID"); } if (devkitHierarchyItem.instanceID == 0u) { devkitHierarchyItem.instanceID = LevelHierarchy.generateUniqueInstanceID(); } formattedFileReader.readKey("Item"); devkitHierarchyItem.read(formattedFileReader); } } } }
protected override void readHierarchyItem(IFormattedFileReader reader) { base.readHierarchyItem(reader); if (reader.containsKey("Block_Player")) { this.blockPlayer = reader.readValue <bool>("Block_Player"); } else { this.blockPlayer = true; } }
// Token: 0x06000934 RID: 2356 RVA: 0x0004E768 File Offset: 0x0004CB68 protected override void readHierarchyItem(IFormattedFileReader reader) { base.readHierarchyItem(reader); this.GUID = reader.readValue <Guid>("GUID"); this.placementOrigin = reader.readValue <ELevelObjectPlacementOrigin>("Origin"); this.customMaterialOverride = reader.readValue <AssetReference <MaterialPaletteAsset> >("Custom_Material_Override"); if (reader.containsKey("Material_Index_Override")) { this.materialIndexOverride = reader.readValue <int>("Material_Index_Override"); } else { this.materialIndexOverride = -1; } }
// Token: 0x060015EA RID: 5610 RVA: 0x000835A8 File Offset: 0x000819A8 public virtual void read(IFormattedFileReader reader) { reader = reader.readObject(); if (reader.containsKey("Windows")) { reader.readKey("Windows"); int num = reader.readArrayLength(); for (int i = 0; i < num; i++) { reader.readArrayIndex(i); IFormattedFileReader formattedFileReader = reader.readObject(); if (formattedFileReader != null) { Type type = formattedFileReader.readValue <Type>("Type"); if (type != null) { Sleek2Window sleek2Window = Activator.CreateInstance(type) as Sleek2Window; if (sleek2Window != null) { this.addWindow(sleek2Window); formattedFileReader.readKey("Window"); sleek2Window.read(formattedFileReader); } } } } } else { reader.readKey("Direction"); Separator.EDirection edirection = reader.readValue <Separator.EDirection>(); reader.readKey("Split"); float value = reader.readValue <float>(); Sleek2WindowPartition sleek2WindowPartition; Sleek2WindowPartition sleek2WindowPartition2; this.split((edirection != Separator.EDirection.HORIZONTAL) ? ESleek2PartitionDirection.UP : ESleek2PartitionDirection.RIGHT, out sleek2WindowPartition, out sleek2WindowPartition2); this.separator.handle.value = value; reader.readKey("First"); sleek2WindowPartition.read(reader); reader.readKey("Second"); sleek2WindowPartition2.read(reader); } }
// Token: 0x06000C1B RID: 3099 RVA: 0x0005C154 File Offset: 0x0005A554 protected override void readAsset(IFormattedFileReader reader) { base.readAsset(reader); this.density = reader.readValue <float>("Density"); this.minNormalPositionOffset = reader.readValue <float>("Min_Normal_Position_Offset"); this.maxNormalPositionOffset = reader.readValue <float>("Max_Normal_Position_Offset"); this.normalRotationOffset = reader.readValue <Vector3>("Normal_Rotation_Offset"); if (reader.containsKey("Normal_Rotation_Alignment")) { this.normalRotationAlignment = reader.readValue <float>("Normal_Rotation_Alignment"); } else { this.normalRotationAlignment = 1f; } this.minSurfaceWeight = reader.readValue <float>("Min_Weight"); this.maxSurfaceWeight = reader.readValue <float>("Max_Weight"); this.minSurfaceAngle = reader.readValue <float>("Min_Angle"); this.maxSurfaceAngle = reader.readValue <float>("Max_Angle"); this.minRotation = reader.readValue <Vector3>("Min_Rotation"); this.maxRotation = reader.readValue <Vector3>("Max_Rotation"); this.minScale = reader.readValue <Vector3>("Min_Scale"); this.maxScale = reader.readValue <Vector3>("Max_Scale"); }
protected override void readAsset(IFormattedFileReader reader) { base.readAsset(reader); this.ammoMin = reader.readValue <byte>("Ammo_Min"); this.ammoMax = reader.readValue <byte>("Ammo_Max"); this.sightID = reader.readValue <ushort>("Sight_ID"); this.tacticalID = reader.readValue <ushort>("Tactical_ID"); this.gripID = reader.readValue <ushort>("Grip_ID"); this.barrelID = reader.readValue <ushort>("Barrel_ID"); this.magazineID = reader.readValue <ushort>("Magazine_ID"); this.unplace = reader.readValue <float>("Unplace"); this.replace = reader.readValue <float>("Replace"); if ((double)this.replace < 0.01) { this.replace = 1f; } this.hasSight = reader.readValue <bool>("Hook_Sight"); this.hasTactical = reader.readValue <bool>("Hook_Tactical"); this.hasGrip = reader.readValue <bool>("Hook_Grip"); this.hasBarrel = reader.readValue <bool>("Hook_Barrel"); int num = reader.readArrayLength("Magazine_Calibers"); if (num > 0) { this.magazineCalibers = new ushort[num]; for (int i = 0; i < num; i++) { this.magazineCalibers[i] = reader.readValue <ushort>(i); } int num2 = reader.readArrayLength("Attachment_Calibers"); if (num2 > 0) { this.attachmentCalibers = new ushort[num2]; for (int j = 0; j < num2; j++) { this.attachmentCalibers[j] = reader.readValue <ushort>(j); } } else { this.attachmentCalibers = this.magazineCalibers; } } else { this.magazineCalibers = new ushort[1]; this.magazineCalibers[0] = reader.readValue <ushort>("Caliber"); this.attachmentCalibers = this.magazineCalibers; } this.firerate = reader.readValue <byte>("Firerate"); this.action = reader.readValue <EAction>("Action"); this.deleteEmptyMagazines = reader.readValue <bool>("Delete_Empty_Magazines"); this.bursts = reader.readValue <int>("Bursts"); this.hasSafety = reader.readValue <bool>("Safety"); this.hasSemi = reader.readValue <bool>("Semi"); this.hasAuto = reader.readValue <bool>("Auto"); this.hasBurst = (this.bursts > 0); this.isTurret = reader.readValue <bool>("Turret"); if (this.hasAuto) { this.firemode = EFiremode.AUTO; } else if (this.hasSemi) { this.firemode = EFiremode.SEMI; } else if (this.hasBurst) { this.firemode = EFiremode.BURST; } else if (this.hasSafety) { this.firemode = EFiremode.SAFETY; } this.spreadAim = reader.readValue <float>("Spread_Aim"); this.spreadHip = reader.readValue <float>("Spread_Hip"); this.recoilAim = reader.readValue <float>("Recoil_Aim"); this.useRecoilAim = reader.readValue <bool>("Use_Recoil_Aim"); this.recoilMin_x = reader.readValue <float>("Recoil_Min_X"); this.recoilMin_y = reader.readValue <float>("Recoil_Min_Y"); this.recoilMax_x = reader.readValue <float>("Recoil_Max_X"); this.recoilMax_y = reader.readValue <float>("Recoil_Max_Y"); this.recover_x = reader.readValue <float>("Recover_X"); this.recover_y = reader.readValue <float>("Recover_Y"); this.shakeMin_x = reader.readValue <float>("Shake_Min_X"); this.shakeMin_y = reader.readValue <float>("Shake_Min_Y"); this.shakeMin_z = reader.readValue <float>("Shake_Min_Z"); this.shakeMax_x = reader.readValue <float>("Shake_Max_X"); this.shakeMax_y = reader.readValue <float>("Shake_Max_Y"); this.shakeMax_z = reader.readValue <float>("Shake_Max_Z"); this.ballisticSteps = reader.readValue <byte>("Ballistic_Steps"); this.ballisticTravel = (float)reader.readValue <byte>("Ballistic_Travel"); this.ballisticDrop = reader.readValue <float>("Ballistic_Drop"); this.ballisticForce = reader.readValue <float>("Ballistic_Force"); this.reloadTime = reader.readValue <float>("Reload_Time"); this.hammerTime = reader.readValue <float>("Hammer_Time"); this.muzzle = reader.readValue <ushort>("Muzzle"); this.explosion = reader.readValue <ushort>("Explosion"); this.shell = reader.readValue <ushort>("Shell"); if (reader.containsKey("Alert_Radius")) { this.alertRadius = reader.readValue <float>("Alert_Radius"); } else { this.alertRadius = 48f; } }