// Token: 0x0600348C RID: 13452 RVA: 0x001596A4 File Offset: 0x00157AA4 private void Update() { if (VehicleTool.icons == null || VehicleTool.icons.Count == 0) { return; } VehicleIconInfo vehicleIconInfo = VehicleTool.icons.Dequeue(); if (vehicleIconInfo == null) { return; } if (vehicleIconInfo.vehicleAsset == null) { return; } Transform vehicle = VehicleTool.getVehicle(vehicleIconInfo.id, vehicleIconInfo.skin, 0, vehicleIconInfo.vehicleAsset, vehicleIconInfo.skinAsset); vehicle.position = new Vector3(-256f, -256f, 0f); Transform transform = vehicle.FindChild("Icon2"); if (transform == null) { UnityEngine.Object.Destroy(vehicle.gameObject); Assets.errors.Add("Failed to find a skin icon hook on " + vehicleIconInfo.id + "."); return; } float size2_z = vehicleIconInfo.vehicleAsset.size2_z; Texture2D texture = ItemTool.captureIcon(vehicleIconInfo.id, vehicleIconInfo.skin, vehicle, transform, vehicleIconInfo.x, vehicleIconInfo.y, size2_z); if (vehicleIconInfo.callback != null) { vehicleIconInfo.callback(texture); } }
// Token: 0x0600342C RID: 13356 RVA: 0x0015455C File Offset: 0x0015295C private void Update() { if (ItemTool.icons == null || ItemTool.icons.Count == 0) { return; } ItemIconInfo itemIconInfo = ItemTool.icons.Dequeue(); if (itemIconInfo == null) { return; } if (itemIconInfo.itemAsset == null) { return; } this.currentIconTags = itemIconInfo.tags; this.currentIconDynamicProps = itemIconInfo.dynamic_props; Transform item = ItemTool.getItem(itemIconInfo.id, itemIconInfo.skin, itemIconInfo.quality, itemIconInfo.state, false, itemIconInfo.itemAsset, itemIconInfo.skinAsset, new GetStatTrackerValueHandler(this.getIconStatTrackerValue)); item.position = new Vector3(-256f, -256f, 0f); Transform transform; if (itemIconInfo.scale && itemIconInfo.skin != 0) { if (itemIconInfo.itemAsset.size2_z == 0f) { item.position = new Vector3(0f, -256f, -256f); UnityEngine.Object.Destroy(item.gameObject); Assets.errors.Add("Failed to create a skin icon of size 0 for " + itemIconInfo.id + "."); return; } transform = item.FindChild("Icon2"); if (transform == null) { item.position = new Vector3(0f, -256f, -256f); UnityEngine.Object.Destroy(item.gameObject); Assets.errors.Add("Failed to find a skin icon hook on " + itemIconInfo.id + "."); return; } } else { if (itemIconInfo.itemAsset.size_z == 0f) { item.position = new Vector3(0f, -256f, -256f); UnityEngine.Object.Destroy(item.gameObject); Assets.errors.Add("Failed to create an item icon of size 0 for " + itemIconInfo.id + "."); return; } transform = item.FindChild("Icon"); if (transform == null) { item.position = new Vector3(0f, -256f, -256f); UnityEngine.Object.Destroy(item.gameObject); Assets.errors.Add("Failed to find an item icon hook on " + itemIconInfo.id + "."); return; } } float num = itemIconInfo.itemAsset.size_z; if (itemIconInfo.scale) { if (itemIconInfo.skin != 0) { num = itemIconInfo.itemAsset.size2_z; } else { float num2 = (float)itemIconInfo.itemAsset.size_x / (float)itemIconInfo.itemAsset.size_y; num *= num2; } } Texture2D texture2D = ItemTool.captureIcon(itemIconInfo.id, itemIconInfo.skin, item, transform, itemIconInfo.x, itemIconInfo.y, num); if (itemIconInfo.callback != null) { itemIconInfo.callback(texture2D); } if (itemIconInfo.state.Length == 0 && itemIconInfo.skin == 0 && itemIconInfo.x == (int)(itemIconInfo.itemAsset.size_x * 50) && itemIconInfo.y == (int)(itemIconInfo.itemAsset.size_y * 50) && !ItemTool.cache.ContainsKey(itemIconInfo.id)) { ItemTool.cache.Add(itemIconInfo.id, texture2D); } }