// 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); } } }
public virtual void read(IFormattedFileReader reader) { reader = reader.readObject(); base.transform.anchorMin = new Vector2(reader.readValue <float>("Min_X"), reader.readValue <float>("Min_Y")); base.transform.anchorMax = new Vector2(reader.readValue <float>("Max_X"), reader.readValue <float>("Max_Y")); this.readContainer(reader); }
public override void read(IFormattedFileReader reader) { reader = reader.readObject(); if (reader == null) { return; } this.readHierarchyItem(reader); }
public void read(IFormattedFileReader reader) { reader = reader.readObject(); if (reader == null) { return; } this.readVisibilityGroup(reader); }
// Token: 0x06001939 RID: 6457 RVA: 0x0008D21E File Offset: 0x0008B61E public void read(IFormattedFileReader reader) { reader = reader.readObject(); if (reader == null) { return; } this.GUID = reader.readValue <Guid>("GUID"); }
// Token: 0x0600191A RID: 6426 RVA: 0x0005BD24 File Offset: 0x0005A124 public virtual void read(IFormattedFileReader reader) { if (reader == null) { return; } reader = reader.readObject(); this.readAsset(reader); }
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); } } } }
public virtual void read(IFormattedFileReader reader) { reader = reader.readObject(); if (reader == null) { return; } this.asset = reader.readValue <AssetReference <FoliageInfoAsset> >("Asset"); this.weight = reader.readValue <float>("Weight"); }
// Token: 0x0600199F RID: 6559 RVA: 0x0009084B File Offset: 0x0008EC4B public void read(IFormattedFileReader reader) { reader = reader.readObject(); if (reader == null) { return; } this.name = reader.readValue("Name"); this.path = reader.readValue("Path"); }
// 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); } }
public void read(IFormattedFileReader reader) { reader = reader.readObject(); if (reader == null) { return; } this.assemblyQualifiedName = reader.readValue("Type"); this.assemblyQualifiedName = KeyValueTableTypeRedirectorRegistry.chase(this.assemblyQualifiedName); }
// Token: 0x06000F8C RID: 3980 RVA: 0x000687F0 File Offset: 0x00066BF0 public void read(IFormattedFileReader reader) { reader = reader.readObject(); if (reader == null) { return; } this.ns = reader.readValue <string>("Namespace"); this.token = reader.readValue <string>("Token"); }
// Token: 0x06000CC7 RID: 3271 RVA: 0x0005E2F4 File Offset: 0x0005C6F4 public override void read(IFormattedFileReader reader) { reader = reader.readObject(); int num = reader.readArrayLength("Tiles"); for (int i = 0; i < num; i++) { reader.readArrayIndex(i); FoliageTile foliageTile = new FoliageTile(FoliageCoord.ZERO); foliageTile.read(reader); FoliageSystem.tiles.Add(foliageTile.coord, foliageTile); } }
public virtual void read(IFormattedFileReader reader) { reader = reader.readObject(); this.coord = reader.readValue <LandscapeCoord>("Coord"); int num = reader.readArrayLength("Materials"); for (int i = 0; i < num; i++) { this.materials[i] = reader.readValue <AssetReference <LandscapeMaterialAsset> >(i); } this.updatePrototypes(); this.readHeightmaps(); this.readSplatmaps(); }
public virtual void read(IFormattedFileReader reader) { if (reader == null) { return; } reader = reader.readObject(); this.itemID = reader.readValue <ushort>("Item_ID"); this.primarySkin = reader.readValue <SkinInfo>("Primary_Skin"); int num = reader.readArrayLength("Secondary_Skins"); this.secondarySkins = new InspectableList <SecondarySkinInfo>(num); for (int i = 0; i < num; i++) { this.secondarySkins.Add(reader.readValue <SecondarySkinInfo>(i)); } this.tertiarySkin = reader.readValue <SkinInfo>("Tertiary_Skin"); this.attachmentSkin = reader.readValue <SkinInfo>("Attachment_Skin"); }
// Token: 0x06000E0E RID: 3598 RVA: 0x00062BD8 File Offset: 0x00060FD8 public override void read(IFormattedFileReader reader) { reader = reader.readObject(); int num = reader.readArrayLength("Tiles"); for (int i = 0; i < num; i++) { reader.readArrayIndex(i); LandscapeTile landscapeTile = new LandscapeTile(LandscapeCoord.ZERO); landscapeTile.enable(); landscapeTile.applyGraphicsSettings(); landscapeTile.read(reader); if (Landscape.tiles.ContainsKey(landscapeTile.coord)) { Debug.LogError("Duplicate landscape coord read: " + landscapeTile.coord); } else { Landscape.tiles.Add(landscapeTile.coord, landscapeTile); } } Landscape.linkNeighbors(); Landscape.applyLOD(); }
// Token: 0x06001A3E RID: 6718 RVA: 0x000930C0 File Offset: 0x000914C0 protected override void readAsset(IFormattedFileReader reader) { base.readAsset(reader); this.isPro = reader.readValue <bool>("Is_Pro"); this.type = reader.readValue <EItemType>("Type"); this.rarity = reader.readValue <EItemRarity>("Rarity"); if (this.isPro) { if (this.type == EItemType.SHIRT) { this._proPath = "/Shirts"; } else if (this.type == EItemType.PANTS) { this._proPath = "/Pants"; } else if (this.type == EItemType.HAT) { this._proPath = "/Hats"; } else if (this.type == EItemType.BACKPACK) { this._proPath = "/Backpacks"; } else if (this.type == EItemType.VEST) { this._proPath = "/Vests"; } else if (this.type == EItemType.MASK) { this._proPath = "/Masks"; } else if (this.type == EItemType.GLASSES) { this._proPath = "/Glasses"; } else if (this.type == EItemType.KEY) { this._proPath = "/Keys"; } else if (this.type == EItemType.BOX) { this._proPath = "/Boxes"; } this._proPath = this._proPath + "/" + this.name; } this.size_x = reader.readValue <byte>("Size_X"); if (this.size_x < 1) { this.size_x = 1; } this.size_y = reader.readValue <byte>("Size_Y"); if (this.size_y < 1) { this.size_y = 1; } this.size_z = reader.readValue <float>("Size_Z"); this.size2_z = reader.readValue <float>("Size2_Z"); this.amount = reader.readValue <byte>("Amount"); if (this.amount < 1) { this.amount = 1; } this.countMin = reader.readValue <byte>("Count_Min"); if (this.countMin < 1) { this.countMin = 1; } this.countMax = reader.readValue <byte>("Count_Max"); if (this.countMax < 1) { this.countMax = 1; } this.qualityMin = reader.readValue <byte>("Quality_Min"); this.qualityMax = reader.readValue <byte>("Quality_Max"); this.isBackward = reader.readValue <bool>("Backward"); this.useable = reader.readValue <string>("Useable"); this.isUseable = !string.IsNullOrEmpty(this.useable); this.slot = reader.readValue <ESlotType>("Slot"); int num = reader.readArrayLength("Blueprints"); this._blueprints = new List <Blueprint>(num); for (int i = 0; i < num; i++) { IFormattedFileReader formattedFileReader = reader.readObject(i); EBlueprintType newType = formattedFileReader.readValue <EBlueprintType>("Type"); int num2 = formattedFileReader.readArrayLength("Supplies"); BlueprintSupply[] array = new BlueprintSupply[num2]; for (int j = 0; j < num2; j++) { IFormattedFileReader formattedFileReader2 = formattedFileReader.readObject(j); ushort newID = formattedFileReader2.readValue <ushort>("ID"); bool newCritical = formattedFileReader2.readValue <bool>("Critical"); byte newAmount = formattedFileReader2.readValue <byte>("Amount"); array[j] = new BlueprintSupply(newID, newCritical, newAmount); } int num3 = formattedFileReader.readArrayLength("Output"); BlueprintOutput[] array2 = new BlueprintOutput[num3]; for (int k = 0; k < num3; k++) { IFormattedFileReader formattedFileReader3 = formattedFileReader.readObject(k); ushort newID2 = formattedFileReader3.readValue <ushort>("ID"); byte newAmount2 = formattedFileReader3.readValue <byte>("Amount"); array2[k] = new BlueprintOutput(newID2, newAmount2); } ushort newTool = formattedFileReader.readValue <ushort>("Tool"); bool newToolCritical = formattedFileReader.readValue <bool>("Tool_Critical"); ushort newBuild = formattedFileReader.readValue <ushort>("Build"); byte newLevel = formattedFileReader.readValue <byte>("Level"); EBlueprintSkill newSkill = formattedFileReader.readValue <EBlueprintSkill>("Skill"); bool newTransferState = formattedFileReader.readValue <bool>("Transfer_State"); string newMap = formattedFileReader.readValue("Map"); this.blueprints.Add(new Blueprint(this.id, (byte)i, newType, array, array2, newTool, newToolCritical, newBuild, newLevel, newSkill, newTransferState, newMap, null, null)); } int num4 = reader.readArrayLength("Actions"); this._actions = new List <Action>(num4); byte b = 0; while ((int)b < num4) { IFormattedFileReader formattedFileReader4 = reader.readObject((int)b); EActionType newType2 = formattedFileReader4.readValue <EActionType>("Type"); int num5 = formattedFileReader4.readArrayLength("Blueprints"); ActionBlueprint[] array3 = new ActionBlueprint[num5]; byte b2 = 0; while ((int)b2 < array3.Length) { IFormattedFileReader formattedFileReader5 = formattedFileReader4.readObject((int)b2); byte newID3 = formattedFileReader5.readValue <byte>("Index"); bool newLink = formattedFileReader5.readValue <bool>("Is_Link"); array3[(int)b2] = new ActionBlueprint(newID3, newLink); b2 += 1; } string newText = formattedFileReader4.readValue <string>("Text"); string newTooltip = formattedFileReader4.readValue <string>("Tooltip"); string newKey = formattedFileReader4.readValue <string>("Key"); ushort num6 = formattedFileReader4.readValue <ushort>("Source"); if (num6 == 0) { num6 = this.id; } this.actions.Add(new Action(num6, newType2, array3, newText, newTooltip, newKey)); b += 1; } if (num4 == 0) { bool flag = false; byte b3 = 0; while ((int)b3 < this.blueprints.Count) { Blueprint blueprint = this.blueprints[(int)b3]; if (blueprint.type == EBlueprintType.REPAIR) { Action item = new Action(this.id, EActionType.BLUEPRINT, new ActionBlueprint[] { new ActionBlueprint(b3, true) }, null, null, "Repair"); this.actions.Insert(0, item); } else if (blueprint.type == EBlueprintType.AMMO) { flag = true; } else if (blueprint.supplies.Length == 1 && blueprint.supplies[0].id == this.id) { Action item2 = new Action(this.id, EActionType.BLUEPRINT, new ActionBlueprint[] { new ActionBlueprint(b3, this.type == EItemType.GUN || this.type == EItemType.MELEE) }, null, null, "Salvage"); this.actions.Add(item2); } b3 += 1; } if (flag) { List <ActionBlueprint> list = new List <ActionBlueprint>(); byte b4 = 0; while ((int)b4 < this.blueprints.Count) { Blueprint blueprint2 = this.blueprints[(int)b4]; if (blueprint2.type == EBlueprintType.AMMO) { ActionBlueprint item3 = new ActionBlueprint(b4, true); list.Add(item3); } b4 += 1; } Action item4 = new Action(this.id, EActionType.BLUEPRINT, list.ToArray(), null, null, "Refill"); this.actions.Add(item4); } } this._shouldVerifyHash = reader.readValue <bool>("Should_Verify_Hash"); }
public void read(IFormattedFileReader reader) { reader = reader.readObject(); this.x = reader.readValue <byte>("X"); this.y = reader.readValue <byte>("Y"); }
// Token: 0x060015B1 RID: 5553 RVA: 0x0006C4D2 File Offset: 0x0006A8D2 public virtual void read(IFormattedFileReader reader) { reader = reader.readObject(); this.readWindow(reader); }
// Token: 0x06000CDF RID: 3295 RVA: 0x0005EACC File Offset: 0x0005CECC public virtual void read(IFormattedFileReader reader) { reader = reader.readObject(); this.coord = reader.readValue <FoliageCoord>("Coord"); }