Decompiled source of Land Value Heatmap v1.0.1

LandValueHeatmap.dll

Decompiled 2 months ago
using System;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using Colossal.Logging;
using Colossal.Mathematics;
using Colossal.Serialization.Entities;
using Game;
using Game.City;
using Game.Common;
using Game.Prefabs;
using Game.Rendering;
using Game.Simulation;
using Game.Tools;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Unity.Burst;
using Unity.Collections;
using Unity.Entities;
using Unity.Jobs;
using Unity.Mathematics;
using UnityEngine;
using UnityEngine.Experimental.Rendering;
using UnityEngine.Rendering;
using UnityEngine.Scripting;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("LandValueHeatmap")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("LandValue Heatmap shows bigger range of values.")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+3cbe83f5dbe932ebdfba0cbb7a4caf35adfb9ddd")]
[assembly: AssemblyProduct("LandValueHeatmap")]
[assembly: AssemblyTitle("LandValueHeatmap")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace LandValueHeatmap
{
	[CompilerGenerated]
	public class OverlayInfomodeSystem : GameSystemBase
	{
		[BurstCompile]
		private struct ClearJob : IJob
		{
			public NativeArray<byte> m_TextureData;

			public void Execute()
			{
				for (int i = 0; i < m_TextureData.Length; i++)
				{
					m_TextureData[i] = 0;
				}
			}
		}

		[BurstCompile]
		private struct GroundWaterJob : IJob
		{
			[ReadOnly]
			public InfomodeActive m_ActiveData;

			[ReadOnly]
			public CellMapData<GroundWater> m_MapData;

			public NativeArray<byte> m_TextureData;

			public void Execute()
			{
				//IL_0037: Unknown result type (might be due to invalid IL or missing references)
				//IL_003c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0049: Unknown result type (might be due to invalid IL or missing references)
				int num = m_ActiveData.m_Index - 1;
				for (int i = 0; i < m_MapData.m_TextureSize.y; i++)
				{
					for (int j = 0; j < m_MapData.m_TextureSize.x; j++)
					{
						int num2 = j + i * m_MapData.m_TextureSize.x;
						GroundWater val = m_MapData.m_Buffer[num2];
						m_TextureData[num2 * 4 + num] = (byte)math.clamp(val.m_Amount / 32, 0, 255);
					}
				}
			}
		}

		[BurstCompile]
		private struct GroundPollutionJob : IJob
		{
			[ReadOnly]
			public InfomodeActive m_ActiveData;

			[ReadOnly]
			public CellMapData<GroundPollution> m_MapData;

			public NativeArray<byte> m_TextureData;

			public float m_Multiplier;

			public void Execute()
			{
				//IL_0037: Unknown result type (might be due to invalid IL or missing references)
				//IL_003c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0049: Unknown result type (might be due to invalid IL or missing references)
				int num = m_ActiveData.m_Index - 1;
				for (int i = 0; i < m_MapData.m_TextureSize.y; i++)
				{
					for (int j = 0; j < m_MapData.m_TextureSize.x; j++)
					{
						int num2 = j + i * m_MapData.m_TextureSize.x;
						GroundPollution val = m_MapData.m_Buffer[num2];
						m_TextureData[num2 * 4 + num] = (byte)math.clamp(Mathf.RoundToInt((float)val.m_Pollution * m_Multiplier), 0, 255);
					}
				}
			}
		}

		[BurstCompile]
		private struct NoisePollutionJob : IJob
		{
			[ReadOnly]
			public InfomodeActive m_ActiveData;

			[ReadOnly]
			public CellMapData<NoisePollution> m_MapData;

			public NativeArray<byte> m_TextureData;

			public float m_Multiplier;

			public void Execute()
			{
				//IL_0037: Unknown result type (might be due to invalid IL or missing references)
				//IL_003c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0049: Unknown result type (might be due to invalid IL or missing references)
				int num = m_ActiveData.m_Index - 1;
				for (int i = 0; i < m_MapData.m_TextureSize.y; i++)
				{
					for (int j = 0; j < m_MapData.m_TextureSize.x; j++)
					{
						int num2 = j + i * m_MapData.m_TextureSize.x;
						NoisePollution val = m_MapData.m_Buffer[num2];
						m_TextureData[num2 * 4 + num] = (byte)math.clamp(Mathf.RoundToInt((float)val.m_Pollution * m_Multiplier), 0, 255);
					}
				}
			}
		}

		[BurstCompile]
		private struct AirPollutionJob : IJob
		{
			[ReadOnly]
			public InfomodeActive m_ActiveData;

			[ReadOnly]
			public CellMapData<AirPollution> m_MapData;

			public NativeArray<byte> m_TextureData;

			public float m_Multiplier;

			public void Execute()
			{
				//IL_0037: Unknown result type (might be due to invalid IL or missing references)
				//IL_003c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0049: Unknown result type (might be due to invalid IL or missing references)
				int num = m_ActiveData.m_Index - 1;
				for (int i = 0; i < m_MapData.m_TextureSize.y; i++)
				{
					for (int j = 0; j < m_MapData.m_TextureSize.x; j++)
					{
						int num2 = j + i * m_MapData.m_TextureSize.x;
						AirPollution val = m_MapData.m_Buffer[num2];
						m_TextureData[num2 * 4 + num] = (byte)math.clamp(Mathf.RoundToInt((float)val.m_Pollution * m_Multiplier), 0, 255);
					}
				}
			}
		}

		[BurstCompile]
		private struct WindJob : IJob
		{
			[ReadOnly]
			public CellMapData<Wind> m_MapData;

			public NativeArray<half4> m_TextureData;

			public void Execute()
			{
				//IL_002c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0031: Unknown result type (might be due to invalid IL or missing references)
				//IL_0039: Unknown result type (might be due to invalid IL or missing references)
				//IL_003a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0044: Unknown result type (might be due to invalid IL or missing references)
				//IL_0049: Unknown result type (might be due to invalid IL or missing references)
				//IL_004a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0054: Unknown result type (might be due to invalid IL or missing references)
				//IL_005e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0068: Unknown result type (might be due to invalid IL or missing references)
				//IL_006d: Unknown result type (might be due to invalid IL or missing references)
				for (int i = 0; i < m_MapData.m_TextureSize.y; i++)
				{
					for (int j = 0; j < m_MapData.m_TextureSize.x; j++)
					{
						int num = j + i * m_MapData.m_TextureSize.x;
						Wind val = m_MapData.m_Buffer[num];
						m_TextureData[num] = new half4((half)val.m_Wind.x, (half)val.m_Wind.y, (half)0f, (half)0f);
					}
				}
			}
		}

		[BurstCompile]
		private struct TelecomCoverageJob : IJob
		{
			[ReadOnly]
			public InfomodeActive m_ActiveData;

			[ReadOnly]
			public CellMapData<TelecomCoverage> m_MapData;

			public NativeArray<byte> m_TextureData;

			public void Execute()
			{
				//IL_0037: Unknown result type (might be due to invalid IL or missing references)
				//IL_003c: Unknown result type (might be due to invalid IL or missing references)
				int num = m_ActiveData.m_Index - 1;
				for (int i = 0; i < m_MapData.m_TextureSize.y; i++)
				{
					for (int j = 0; j < m_MapData.m_TextureSize.x; j++)
					{
						int num2 = j + i * m_MapData.m_TextureSize.x;
						TelecomCoverage val = m_MapData.m_Buffer[num2];
						m_TextureData[num2 * 4 + num] = (byte)math.clamp(((TelecomCoverage)(ref val)).networkQuality, 0, 255);
					}
				}
			}
		}

		[BurstCompile]
		private struct FertilityJob : IJob
		{
			[ReadOnly]
			public InfomodeActive m_ActiveData;

			[ReadOnly]
			public CellMapData<NaturalResourceCell> m_MapData;

			public NativeArray<byte> m_TextureData;

			public void Execute()
			{
				//IL_003d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0042: Unknown result type (might be due to invalid IL or missing references)
				//IL_0044: Unknown result type (might be due to invalid IL or missing references)
				//IL_0046: Unknown result type (might be due to invalid IL or missing references)
				//IL_0055: Unknown result type (might be due to invalid IL or missing references)
				//IL_0057: Unknown result type (might be due to invalid IL or missing references)
				int num = m_ActiveData.m_Index - 1;
				for (int i = 0; i < m_MapData.m_TextureSize.y; i++)
				{
					for (int j = 0; j < m_MapData.m_TextureSize.x; j++)
					{
						int num2 = j + i * m_MapData.m_TextureSize.x;
						NaturalResourceCell val = m_MapData.m_Buffer[num2];
						float num3 = (int)val.m_Fertility.m_Base;
						num3 -= (float)(int)val.m_Fertility.m_Used;
						num3 = math.saturate(num3 * 0.0001f);
						m_TextureData[num2 * 4 + num] = (byte)math.clamp(Mathf.RoundToInt(num3 * 255f), 0, 255);
					}
				}
			}
		}

		[BurstCompile]
		private struct OreJob : IJob
		{
			[ReadOnly]
			public InfomodeActive m_ActiveData;

			[ReadOnly]
			public CellMapData<NaturalResourceCell> m_MapData;

			[ReadOnly]
			public Entity m_City;

			[ReadOnly]
			public BufferLookup<CityModifier> m_CityModifiers;

			public NativeArray<byte> m_TextureData;

			public void Execute()
			{
				//IL_0010: Unknown result type (might be due to invalid IL or missing references)
				//IL_001d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0030: Unknown result type (might be due to invalid IL or missing references)
				//IL_0035: Unknown result type (might be due to invalid IL or missing references)
				//IL_003a: Unknown result type (might be due to invalid IL or missing references)
				//IL_006c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0071: Unknown result type (might be due to invalid IL or missing references)
				//IL_0073: Unknown result type (might be due to invalid IL or missing references)
				//IL_0075: Unknown result type (might be due to invalid IL or missing references)
				//IL_0097: Unknown result type (might be due to invalid IL or missing references)
				//IL_0099: Unknown result type (might be due to invalid IL or missing references)
				//IL_008d: Unknown result type (might be due to invalid IL or missing references)
				int num = m_ActiveData.m_Index - 1;
				DynamicBuffer<CityModifier> val = default(DynamicBuffer<CityModifier>);
				if (m_CityModifiers.HasBuffer(m_City))
				{
					val = m_CityModifiers[m_City];
				}
				for (int i = 0; i < m_MapData.m_TextureSize.y; i++)
				{
					for (int j = 0; j < m_MapData.m_TextureSize.x; j++)
					{
						int num2 = j + i * m_MapData.m_TextureSize.x;
						NaturalResourceCell val2 = m_MapData.m_Buffer[num2];
						float num3 = (int)val2.m_Ore.m_Base;
						if (val.IsCreated)
						{
							CityUtils.ApplyModifier(ref num3, val, (CityModifierType)12);
						}
						num3 -= (float)(int)val2.m_Ore.m_Used;
						num3 = math.saturate(num3 * 0.0001f);
						m_TextureData[num2 * 4 + num] = (byte)math.clamp(Mathf.RoundToInt(num3 * 255f), 0, 255);
					}
				}
			}
		}

		[BurstCompile]
		private struct OilJob : IJob
		{
			[ReadOnly]
			public InfomodeActive m_ActiveData;

			[ReadOnly]
			public CellMapData<NaturalResourceCell> m_MapData;

			[ReadOnly]
			public Entity m_City;

			[ReadOnly]
			public BufferLookup<CityModifier> m_CityModifiers;

			public NativeArray<byte> m_TextureData;

			public void Execute()
			{
				//IL_0010: Unknown result type (might be due to invalid IL or missing references)
				//IL_001d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0030: Unknown result type (might be due to invalid IL or missing references)
				//IL_0035: Unknown result type (might be due to invalid IL or missing references)
				//IL_003a: Unknown result type (might be due to invalid IL or missing references)
				//IL_006c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0071: Unknown result type (might be due to invalid IL or missing references)
				//IL_0073: Unknown result type (might be due to invalid IL or missing references)
				//IL_0075: Unknown result type (might be due to invalid IL or missing references)
				//IL_0097: Unknown result type (might be due to invalid IL or missing references)
				//IL_0099: Unknown result type (might be due to invalid IL or missing references)
				//IL_008d: Unknown result type (might be due to invalid IL or missing references)
				int num = m_ActiveData.m_Index - 1;
				DynamicBuffer<CityModifier> val = default(DynamicBuffer<CityModifier>);
				if (m_CityModifiers.HasBuffer(m_City))
				{
					val = m_CityModifiers[m_City];
				}
				for (int i = 0; i < m_MapData.m_TextureSize.y; i++)
				{
					for (int j = 0; j < m_MapData.m_TextureSize.x; j++)
					{
						int num2 = j + i * m_MapData.m_TextureSize.x;
						NaturalResourceCell val2 = m_MapData.m_Buffer[num2];
						float num3 = (int)val2.m_Oil.m_Base;
						if (val.IsCreated)
						{
							CityUtils.ApplyModifier(ref num3, val, (CityModifierType)13);
						}
						num3 -= (float)(int)val2.m_Oil.m_Used;
						num3 = math.saturate(num3 * 0.0001f);
						m_TextureData[num2 * 4 + num] = (byte)math.clamp(Mathf.RoundToInt(num3 * 255f), 0, 255);
					}
				}
			}
		}

		[BurstCompile]
		private struct LandValueJob : IJob
		{
			[ReadOnly]
			public InfomodeActive m_ActiveData;

			[ReadOnly]
			public CellMapData<LandValueCell> m_MapData;

			public NativeArray<byte> m_TextureData;

			public void Execute()
			{
				//IL_0037: Unknown result type (might be due to invalid IL or missing references)
				//IL_003c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0049: Unknown result type (might be due to invalid IL or missing references)
				int num = m_ActiveData.m_Index - 1;
				for (int i = 0; i < m_MapData.m_TextureSize.y; i++)
				{
					for (int j = 0; j < m_MapData.m_TextureSize.x; j++)
					{
						int num2 = j + i * m_MapData.m_TextureSize.x;
						LandValueCell val = m_MapData.m_Buffer[num2];
						m_TextureData[num2 * 4 + num] = (byte)math.clamp(Mathf.RoundToInt(val.m_LandValue * 0.51f), 0, 255);
					}
				}
			}
		}

		[BurstCompile]
		private struct PopulationJob : IJob
		{
			[ReadOnly]
			public InfomodeActive m_ActiveData;

			[ReadOnly]
			public CellMapData<PopulationCell> m_MapData;

			public NativeArray<byte> m_TextureData;

			public void Execute()
			{
				//IL_0037: Unknown result type (might be due to invalid IL or missing references)
				//IL_003c: Unknown result type (might be due to invalid IL or missing references)
				int num = m_ActiveData.m_Index - 1;
				for (int i = 0; i < m_MapData.m_TextureSize.y; i++)
				{
					for (int j = 0; j < m_MapData.m_TextureSize.x; j++)
					{
						int num2 = j + i * m_MapData.m_TextureSize.x;
						PopulationCell val = m_MapData.m_Buffer[num2];
						m_TextureData[num2 * 4 + num] = (byte)math.clamp(Mathf.RoundToInt(((PopulationCell)(ref val)).Get() * 0.24902344f), 0, 255);
					}
				}
			}
		}

		[BurstCompile]
		private struct AttractionJob : IJob
		{
			[ReadOnly]
			public InfomodeActive m_ActiveData;

			[ReadOnly]
			public CellMapData<AvailabilityInfoCell> m_MapData;

			public NativeArray<byte> m_TextureData;

			public void Execute()
			{
				//IL_0037: Unknown result type (might be due to invalid IL or missing references)
				//IL_003c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0049: Unknown result type (might be due to invalid IL or missing references)
				//IL_004b: Unknown result type (might be due to invalid IL or missing references)
				int num = m_ActiveData.m_Index - 1;
				for (int i = 0; i < m_MapData.m_TextureSize.y; i++)
				{
					for (int j = 0; j < m_MapData.m_TextureSize.x; j++)
					{
						int num2 = j + i * m_MapData.m_TextureSize.x;
						AvailabilityInfoCell val = m_MapData.m_Buffer[num2];
						m_TextureData[num2 * 4 + num] = (byte)math.clamp(Mathf.RoundToInt(val.m_AvailabilityInfo.x * 15.9375f), 0, 255);
					}
				}
			}
		}

		[BurstCompile]
		private struct CustomerJob : IJob
		{
			[ReadOnly]
			public InfomodeActive m_ActiveData;

			[ReadOnly]
			public CellMapData<AvailabilityInfoCell> m_MapData;

			public NativeArray<byte> m_TextureData;

			public void Execute()
			{
				//IL_0037: Unknown result type (might be due to invalid IL or missing references)
				//IL_003c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0049: Unknown result type (might be due to invalid IL or missing references)
				//IL_004b: Unknown result type (might be due to invalid IL or missing references)
				int num = m_ActiveData.m_Index - 1;
				for (int i = 0; i < m_MapData.m_TextureSize.y; i++)
				{
					for (int j = 0; j < m_MapData.m_TextureSize.x; j++)
					{
						int num2 = j + i * m_MapData.m_TextureSize.x;
						AvailabilityInfoCell val = m_MapData.m_Buffer[num2];
						m_TextureData[num2 * 4 + num] = (byte)math.clamp(Mathf.RoundToInt(val.m_AvailabilityInfo.y * 15.9375f), 0, 255);
					}
				}
			}
		}

		[BurstCompile]
		private struct WorkplaceJob : IJob
		{
			[ReadOnly]
			public InfomodeActive m_ActiveData;

			[ReadOnly]
			public CellMapData<AvailabilityInfoCell> m_MapData;

			public NativeArray<byte> m_TextureData;

			public void Execute()
			{
				//IL_0037: Unknown result type (might be due to invalid IL or missing references)
				//IL_003c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0049: Unknown result type (might be due to invalid IL or missing references)
				//IL_004b: Unknown result type (might be due to invalid IL or missing references)
				int num = m_ActiveData.m_Index - 1;
				for (int i = 0; i < m_MapData.m_TextureSize.y; i++)
				{
					for (int j = 0; j < m_MapData.m_TextureSize.x; j++)
					{
						int num2 = j + i * m_MapData.m_TextureSize.x;
						AvailabilityInfoCell val = m_MapData.m_Buffer[num2];
						m_TextureData[num2 * 4 + num] = (byte)math.clamp(Mathf.RoundToInt(val.m_AvailabilityInfo.z * 15.9375f), 0, 255);
					}
				}
			}
		}

		[BurstCompile]
		private struct ServiceJob : IJob
		{
			[ReadOnly]
			public InfomodeActive m_ActiveData;

			[ReadOnly]
			public CellMapData<AvailabilityInfoCell> m_MapData;

			public NativeArray<byte> m_TextureData;

			public void Execute()
			{
				//IL_0037: Unknown result type (might be due to invalid IL or missing references)
				//IL_003c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0049: Unknown result type (might be due to invalid IL or missing references)
				//IL_004b: Unknown result type (might be due to invalid IL or missing references)
				int num = m_ActiveData.m_Index - 1;
				for (int i = 0; i < m_MapData.m_TextureSize.y; i++)
				{
					for (int j = 0; j < m_MapData.m_TextureSize.x; j++)
					{
						int num2 = j + i * m_MapData.m_TextureSize.x;
						AvailabilityInfoCell val = m_MapData.m_Buffer[num2];
						m_TextureData[num2 * 4 + num] = (byte)math.clamp(Mathf.RoundToInt(val.m_AvailabilityInfo.w * 15.9375f), 0, 255);
					}
				}
			}
		}

		[BurstCompile]
		private struct GroundWaterPollutionJob : IJob
		{
			[ReadOnly]
			public InfomodeActive m_ActiveData;

			[ReadOnly]
			public CellMapData<GroundWater> m_MapData;

			public NativeArray<byte> m_TextureData;

			public void Execute()
			{
				//IL_003a: Unknown result type (might be due to invalid IL or missing references)
				//IL_003f: Unknown result type (might be due to invalid IL or missing references)
				//IL_004c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0056: Unknown result type (might be due to invalid IL or missing references)
				//IL_0064: Unknown result type (might be due to invalid IL or missing references)
				int num = m_ActiveData.m_Index - 1;
				for (int i = 0; i < m_MapData.m_TextureSize.y; i++)
				{
					for (int j = 0; j < m_MapData.m_TextureSize.x; j++)
					{
						int num2 = j + i * m_MapData.m_TextureSize.x;
						GroundWater val = m_MapData.m_Buffer[num2];
						m_TextureData[num2 * 4 + num] = (byte)math.clamp(math.min(val.m_Amount / 32, val.m_Polluted * 256 / math.max(1, (int)val.m_Amount)), 0, 255);
					}
				}
			}
		}

		private struct TypeHandle
		{
			[ReadOnly]
			public ComponentTypeHandle<InfoviewHeatmapData> __Game_Prefabs_InfoviewHeatmapData_RO_ComponentTypeHandle;

			[ReadOnly]
			public ComponentTypeHandle<InfomodeActive> __Game_Prefabs_InfomodeActive_RO_ComponentTypeHandle;

			[ReadOnly]
			public BufferLookup<CityModifier> __Game_City_CityModifier_RO_BufferLookup;

			[MethodImpl(MethodImplOptions.AggressiveInlining)]
			public void __AssignHandles(ref SystemState state)
			{
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				//IL_0010: Unknown result type (might be due to invalid IL or missing references)
				//IL_0015: Unknown result type (might be due to invalid IL or missing references)
				//IL_001d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0022: Unknown result type (might be due to invalid IL or missing references)
				__Game_Prefabs_InfoviewHeatmapData_RO_ComponentTypeHandle = ((SystemState)(ref state)).GetComponentTypeHandle<InfoviewHeatmapData>(true);
				__Game_Prefabs_InfomodeActive_RO_ComponentTypeHandle = ((SystemState)(ref state)).GetComponentTypeHandle<InfomodeActive>(true);
				__Game_City_CityModifier_RO_BufferLookup = ((SystemState)(ref state)).GetBufferLookup<CityModifier>(true);
			}
		}

		private TerrainRenderSystem m_TerrainRenderSystem;

		private WaterRenderSystem m_WaterRenderSystem;

		private GroundWaterSystem m_GroundWaterSystem;

		private GroundPollutionSystem m_GroundPollutionSystem;

		private NoisePollutionSystem m_NoisePollutionSystem;

		private AirPollutionSystem m_AirPollutionSystem;

		private WindSystem m_WindSystem;

		private CitySystem m_CitySystem;

		private TelecomPreviewSystem m_TelecomCoverageSystem;

		private NaturalResourceSystem m_NaturalResourceSystem;

		private LandValueToGridSystem m_LandValueToGridSystem;

		private PopulationToGridSystem m_PopulationToGridSystem;

		private AvailabilityInfoToGridSystem m_AvailabilityInfoToGridSystem;

		private ToolSystem m_ToolSystem;

		private EntityQuery m_InfomodeQuery;

		private EntityQuery m_HappinessParameterQuery;

		private Texture2D m_TerrainTexture;

		private Texture2D m_WaterTexture;

		private Texture2D m_WindTexture;

		private JobHandle m_Dependency;

		private TypeHandle __TypeHandle;

		[Preserve]
		protected override void OnCreate()
		{
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Expected O, but got Unknown
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0122: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Expected O, but got Unknown
			//IL_0141: Unknown result type (might be due to invalid IL or missing references)
			//IL_0151: Unknown result type (might be due to invalid IL or missing references)
			//IL_015f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0164: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Unknown result type (might be due to invalid IL or missing references)
			//IL_017c: Expected O, but got Unknown
			//IL_0186: Unknown result type (might be due to invalid IL or missing references)
			//IL_018b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: Unknown result type (might be due to invalid IL or missing references)
			//IL_0197: Unknown result type (might be due to invalid IL or missing references)
			//IL_019c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
			((GameSystemBase)this).OnCreate();
			m_TerrainRenderSystem = ((ComponentSystemBase)this).World.GetOrCreateSystemManaged<TerrainRenderSystem>();
			m_WaterRenderSystem = ((ComponentSystemBase)this).World.GetOrCreateSystemManaged<WaterRenderSystem>();
			m_GroundWaterSystem = ((ComponentSystemBase)this).World.GetOrCreateSystemManaged<GroundWaterSystem>();
			m_GroundPollutionSystem = ((ComponentSystemBase)this).World.GetOrCreateSystemManaged<GroundPollutionSystem>();
			m_NoisePollutionSystem = ((ComponentSystemBase)this).World.GetOrCreateSystemManaged<NoisePollutionSystem>();
			m_AirPollutionSystem = ((ComponentSystemBase)this).World.GetOrCreateSystemManaged<AirPollutionSystem>();
			m_WindSystem = ((ComponentSystemBase)this).World.GetOrCreateSystemManaged<WindSystem>();
			m_CitySystem = ((ComponentSystemBase)this).World.GetOrCreateSystemManaged<CitySystem>();
			m_TelecomCoverageSystem = ((ComponentSystemBase)this).World.GetOrCreateSystemManaged<TelecomPreviewSystem>();
			m_NaturalResourceSystem = ((ComponentSystemBase)this).World.GetOrCreateSystemManaged<NaturalResourceSystem>();
			m_ToolSystem = ((ComponentSystemBase)this).World.GetOrCreateSystemManaged<ToolSystem>();
			m_LandValueToGridSystem = ((ComponentSystemBase)this).World.GetOrCreateSystemManaged<LandValueToGridSystem>();
			m_PopulationToGridSystem = ((ComponentSystemBase)this).World.GetOrCreateSystemManaged<PopulationToGridSystem>();
			m_AvailabilityInfoToGridSystem = ((ComponentSystemBase)this).World.GetOrCreateSystemManaged<AvailabilityInfoToGridSystem>();
			m_TerrainTexture = new Texture2D(1, 1, (TextureFormat)4, false, true)
			{
				name = "TerrainInfoTexture",
				hideFlags = (HideFlags)61
			};
			m_WaterTexture = new Texture2D(1, 1, (TextureFormat)4, false, true)
			{
				name = "WaterInfoTexture",
				hideFlags = (HideFlags)61
			};
			m_WindTexture = new Texture2D(m_WindSystem.TextureSize.x, m_WindSystem.TextureSize.y, (GraphicsFormat)48, 1, (TextureCreationFlags)0)
			{
				name = "WindInfoTexture",
				hideFlags = (HideFlags)61
			};
			m_InfomodeQuery = ((ComponentSystemBase)this).GetEntityQuery((ComponentType[])(object)new ComponentType[2]
			{
				ComponentType.ReadOnly<InfomodeActive>(),
				ComponentType.ReadOnly<InfoviewHeatmapData>()
			});
			m_HappinessParameterQuery = ((ComponentSystemBase)this).GetEntityQuery((ComponentType[])(object)new ComponentType[1] { ComponentType.ReadOnly<CitizenHappinessParameterData>() });
		}

		[Preserve]
		protected override void OnDestroy()
		{
			CoreUtils.Destroy((Object)(object)m_TerrainTexture);
			CoreUtils.Destroy((Object)(object)m_WaterTexture);
			CoreUtils.Destroy((Object)(object)m_WindTexture);
			((GameSystemBase)this).OnDestroy();
		}

		public void ApplyOverlay()
		{
			if ((Object)(object)m_TerrainRenderSystem.overrideOverlaymap == (Object)(object)m_TerrainTexture)
			{
				((JobHandle)(ref m_Dependency)).Complete();
				m_TerrainTexture.Apply();
			}
			if ((Object)(object)m_TerrainRenderSystem.overlayExtramap == (Object)(object)m_WindTexture)
			{
				((JobHandle)(ref m_Dependency)).Complete();
				m_WindTexture.Apply();
			}
			if ((Object)(object)m_WaterRenderSystem.overrideOverlaymap == (Object)(object)m_WaterTexture)
			{
				((JobHandle)(ref m_Dependency)).Complete();
				m_WaterTexture.Apply();
			}
		}

		private NativeArray<byte> GetTerrainTextureData<T>(CellMapData<T> cellMapData) where T : struct, ISerializable
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			return GetTerrainTextureData(cellMapData.m_TextureSize);
		}

		private NativeArray<byte> GetTerrainTextureData(int2 size)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			if (((Texture)m_TerrainTexture).width != size.x || ((Texture)m_TerrainTexture).height != size.y)
			{
				m_TerrainTexture.Reinitialize(size.x, size.y);
				m_TerrainRenderSystem.overrideOverlaymap = null;
			}
			if ((Object)(object)m_TerrainRenderSystem.overrideOverlaymap != (Object)(object)m_TerrainTexture)
			{
				m_TerrainRenderSystem.overrideOverlaymap = (Texture)(object)m_TerrainTexture;
				ClearJob clearJob = default(ClearJob);
				clearJob.m_TextureData = m_TerrainTexture.GetRawTextureData<byte>();
				ClearJob clearJob2 = clearJob;
				m_Dependency = IJobExtensions.Schedule<ClearJob>(clearJob2, ((SystemBase)this).Dependency);
				((SystemBase)this).Dependency = m_Dependency;
			}
			return m_TerrainTexture.GetRawTextureData<byte>();
		}

		private NativeArray<byte> GetWaterTextureData<T>(CellMapData<T> cellMapData) where T : struct, ISerializable
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			return GetWaterTextureData(cellMapData.m_TextureSize);
		}

		private NativeArray<byte> GetWaterTextureData(int2 size)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			if (((Texture)m_WaterTexture).width != size.x || ((Texture)m_WaterTexture).height != size.y)
			{
				m_WaterTexture.Reinitialize(size.x, size.y);
				m_WaterRenderSystem.overrideOverlaymap = null;
			}
			if ((Object)(object)m_WaterRenderSystem.overrideOverlaymap != (Object)(object)m_WaterTexture)
			{
				m_WaterRenderSystem.overrideOverlaymap = (Texture)(object)m_WaterTexture;
				ClearJob clearJob = default(ClearJob);
				clearJob.m_TextureData = m_WaterTexture.GetRawTextureData<byte>();
				ClearJob clearJob2 = clearJob;
				m_Dependency = IJobExtensions.Schedule<ClearJob>(clearJob2, ((SystemBase)this).Dependency);
				((SystemBase)this).Dependency = m_Dependency;
			}
			return m_WaterTexture.GetRawTextureData<byte>();
		}

		[Preserve]
		protected override void OnUpdate()
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aa6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ac6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0acb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0107: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Expected I4, but got Unknown
			//IL_017e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0180: Unknown result type (might be due to invalid IL or missing references)
			//IL_0190: Unknown result type (might be due to invalid IL or missing references)
			//IL_0195: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01de: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0201: Unknown result type (might be due to invalid IL or missing references)
			//IL_0203: Unknown result type (might be due to invalid IL or missing references)
			//IL_0213: Unknown result type (might be due to invalid IL or missing references)
			//IL_0218: Unknown result type (might be due to invalid IL or missing references)
			//IL_0224: Unknown result type (might be due to invalid IL or missing references)
			//IL_022c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0244: Unknown result type (might be due to invalid IL or missing references)
			//IL_0249: Unknown result type (might be due to invalid IL or missing references)
			//IL_024e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0256: Unknown result type (might be due to invalid IL or missing references)
			//IL_025b: Unknown result type (might be due to invalid IL or missing references)
			//IL_025d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0262: Unknown result type (might be due to invalid IL or missing references)
			//IL_0267: Unknown result type (might be due to invalid IL or missing references)
			//IL_026f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0277: Unknown result type (might be due to invalid IL or missing references)
			//IL_0279: Unknown result type (might be due to invalid IL or missing references)
			//IL_027f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0291: Unknown result type (might be due to invalid IL or missing references)
			//IL_0296: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0303: Unknown result type (might be due to invalid IL or missing references)
			//IL_0308: Unknown result type (might be due to invalid IL or missing references)
			//IL_0310: Unknown result type (might be due to invalid IL or missing references)
			//IL_0318: Unknown result type (might be due to invalid IL or missing references)
			//IL_031a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0320: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0401: Unknown result type (might be due to invalid IL or missing references)
			//IL_041b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0420: Unknown result type (might be due to invalid IL or missing references)
			//IL_042d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0432: Unknown result type (might be due to invalid IL or missing references)
			//IL_043a: Unknown result type (might be due to invalid IL or missing references)
			//IL_043f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0441: Unknown result type (might be due to invalid IL or missing references)
			//IL_0446: Unknown result type (might be due to invalid IL or missing references)
			//IL_044b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0453: Unknown result type (might be due to invalid IL or missing references)
			//IL_045b: Unknown result type (might be due to invalid IL or missing references)
			//IL_045d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0463: Unknown result type (might be due to invalid IL or missing references)
			//IL_0487: Unknown result type (might be due to invalid IL or missing references)
			//IL_048f: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_04be: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_04fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_04fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0501: Unknown result type (might be due to invalid IL or missing references)
			//IL_0506: Unknown result type (might be due to invalid IL or missing references)
			//IL_050e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0516: Unknown result type (might be due to invalid IL or missing references)
			//IL_0518: Unknown result type (might be due to invalid IL or missing references)
			//IL_051e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0534: Unknown result type (might be due to invalid IL or missing references)
			//IL_0536: Unknown result type (might be due to invalid IL or missing references)
			//IL_0546: Unknown result type (might be due to invalid IL or missing references)
			//IL_054b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0559: Unknown result type (might be due to invalid IL or missing references)
			//IL_055e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0563: Unknown result type (might be due to invalid IL or missing references)
			//IL_056b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0570: Unknown result type (might be due to invalid IL or missing references)
			//IL_0572: Unknown result type (might be due to invalid IL or missing references)
			//IL_0577: Unknown result type (might be due to invalid IL or missing references)
			//IL_057c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0584: Unknown result type (might be due to invalid IL or missing references)
			//IL_058c: Unknown result type (might be due to invalid IL or missing references)
			//IL_058e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0594: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_05f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_05fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0609: Unknown result type (might be due to invalid IL or missing references)
			//IL_060e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0613: Unknown result type (might be due to invalid IL or missing references)
			//IL_061b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0620: Unknown result type (might be due to invalid IL or missing references)
			//IL_0622: Unknown result type (might be due to invalid IL or missing references)
			//IL_0627: Unknown result type (might be due to invalid IL or missing references)
			//IL_062c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0634: Unknown result type (might be due to invalid IL or missing references)
			//IL_063c: Unknown result type (might be due to invalid IL or missing references)
			//IL_063e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0644: Unknown result type (might be due to invalid IL or missing references)
			//IL_0670: Unknown result type (might be due to invalid IL or missing references)
			//IL_0672: Unknown result type (might be due to invalid IL or missing references)
			//IL_0682: Unknown result type (might be due to invalid IL or missing references)
			//IL_0687: Unknown result type (might be due to invalid IL or missing references)
			//IL_0694: Unknown result type (might be due to invalid IL or missing references)
			//IL_0699: Unknown result type (might be due to invalid IL or missing references)
			//IL_06a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_06be: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_06da: Unknown result type (might be due to invalid IL or missing references)
			//IL_06dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_06f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_06fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_070a: Unknown result type (might be due to invalid IL or missing references)
			//IL_070f: Unknown result type (might be due to invalid IL or missing references)
			//IL_071d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0722: Unknown result type (might be due to invalid IL or missing references)
			//IL_0727: Unknown result type (might be due to invalid IL or missing references)
			//IL_072e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0731: Unknown result type (might be due to invalid IL or missing references)
			//IL_0736: Unknown result type (might be due to invalid IL or missing references)
			//IL_073b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0740: Unknown result type (might be due to invalid IL or missing references)
			//IL_0748: Unknown result type (might be due to invalid IL or missing references)
			//IL_0750: Unknown result type (might be due to invalid IL or missing references)
			//IL_0752: Unknown result type (might be due to invalid IL or missing references)
			//IL_0758: Unknown result type (might be due to invalid IL or missing references)
			//IL_07e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_07e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_07f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_07fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0809: Unknown result type (might be due to invalid IL or missing references)
			//IL_080e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0813: Unknown result type (might be due to invalid IL or missing references)
			//IL_081b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0820: Unknown result type (might be due to invalid IL or missing references)
			//IL_0822: Unknown result type (might be due to invalid IL or missing references)
			//IL_0827: Unknown result type (might be due to invalid IL or missing references)
			//IL_082c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0834: Unknown result type (might be due to invalid IL or missing references)
			//IL_083c: Unknown result type (might be due to invalid IL or missing references)
			//IL_083e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0844: Unknown result type (might be due to invalid IL or missing references)
			//IL_085a: Unknown result type (might be due to invalid IL or missing references)
			//IL_085c: Unknown result type (might be due to invalid IL or missing references)
			//IL_086c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0871: Unknown result type (might be due to invalid IL or missing references)
			//IL_087f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0884: Unknown result type (might be due to invalid IL or missing references)
			//IL_0889: Unknown result type (might be due to invalid IL or missing references)
			//IL_0891: Unknown result type (might be due to invalid IL or missing references)
			//IL_0896: Unknown result type (might be due to invalid IL or missing references)
			//IL_0898: Unknown result type (might be due to invalid IL or missing references)
			//IL_089d: Unknown result type (might be due to invalid IL or missing references)
			//IL_08a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_08aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_08ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_08d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_08d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_08e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_08e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_08f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_08fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_08ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0907: Unknown result type (might be due to invalid IL or missing references)
			//IL_090c: Unknown result type (might be due to invalid IL or missing references)
			//IL_090e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0913: Unknown result type (might be due to invalid IL or missing references)
			//IL_0918: Unknown result type (might be due to invalid IL or missing references)
			//IL_0920: Unknown result type (might be due to invalid IL or missing references)
			//IL_0928: Unknown result type (might be due to invalid IL or missing references)
			//IL_092a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0930: Unknown result type (might be due to invalid IL or missing references)
			//IL_0946: Unknown result type (might be due to invalid IL or missing references)
			//IL_0948: Unknown result type (might be due to invalid IL or missing references)
			//IL_0958: Unknown result type (might be due to invalid IL or missing references)
			//IL_095d: Unknown result type (might be due to invalid IL or missing references)
			//IL_096b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0970: Unknown result type (might be due to invalid IL or missing references)
			//IL_0975: Unknown result type (might be due to invalid IL or missing references)
			//IL_097d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0982: Unknown result type (might be due to invalid IL or missing references)
			//IL_0984: Unknown result type (might be due to invalid IL or missing references)
			//IL_0989: Unknown result type (might be due to invalid IL or missing references)
			//IL_098e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0996: Unknown result type (might be due to invalid IL or missing references)
			//IL_099e: Unknown result type (might be due to invalid IL or missing references)
			//IL_09a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_09a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0332: Unknown result type (might be due to invalid IL or missing references)
			//IL_0337: Unknown result type (might be due to invalid IL or missing references)
			//IL_0343: Unknown result type (might be due to invalid IL or missing references)
			//IL_0345: Unknown result type (might be due to invalid IL or missing references)
			//IL_0355: Unknown result type (might be due to invalid IL or missing references)
			//IL_035a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0366: Unknown result type (might be due to invalid IL or missing references)
			//IL_036e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0386: Unknown result type (might be due to invalid IL or missing references)
			//IL_038b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0390: Unknown result type (might be due to invalid IL or missing references)
			//IL_0398: Unknown result type (might be due to invalid IL or missing references)
			//IL_039d: Unknown result type (might be due to invalid IL or missing references)
			//IL_039f: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a27: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a2f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a48: Unknown result type (might be due to invalid IL or missing references)
			//IL_076e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0770: Unknown result type (might be due to invalid IL or missing references)
			//IL_0780: Unknown result type (might be due to invalid IL or missing references)
			//IL_0785: Unknown result type (might be due to invalid IL or missing references)
			//IL_0793: Unknown result type (might be due to invalid IL or missing references)
			//IL_0798: Unknown result type (might be due to invalid IL or missing references)
			//IL_079d: Unknown result type (might be due to invalid IL or missing references)
			//IL_07a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_07a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_07b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_07b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_07be: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_09bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_09be: Unknown result type (might be due to invalid IL or missing references)
			//IL_09ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_09d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_09e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_09e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_09eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_09f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_09f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_09fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_09ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a04: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a0c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a14: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a16: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a1c: Unknown result type (might be due to invalid IL or missing references)
			m_TerrainRenderSystem.overrideOverlaymap = null;
			m_TerrainRenderSystem.overlayExtramap = null;
			m_TerrainRenderSystem.overlayArrowMask = default(float4);
			m_WaterRenderSystem.overrideOverlaymap = null;
			m_WaterRenderSystem.overlayExtramap = null;
			m_WaterRenderSystem.overlayPollutionMask = default(float4);
			m_WaterRenderSystem.overlayArrowMask = default(float4);
			if (!((EntityQuery)(ref m_InfomodeQuery)).IsEmptyIgnoreFilter)
			{
				NativeArray<ArchetypeChunk> val = ((EntityQuery)(ref m_InfomodeQuery)).ToArchetypeChunkArray(AllocatorHandle.op_Implicit((Allocator)3));
				__TypeHandle.__Game_Prefabs_InfoviewHeatmapData_RO_ComponentTypeHandle.Update(ref ((SystemBase)this).CheckedStateRef);
				ComponentTypeHandle<InfoviewHeatmapData> _Game_Prefabs_InfoviewHeatmapData_RO_ComponentTypeHandle = __TypeHandle.__Game_Prefabs_InfoviewHeatmapData_RO_ComponentTypeHandle;
				__TypeHandle.__Game_Prefabs_InfomodeActive_RO_ComponentTypeHandle.Update(ref ((SystemBase)this).CheckedStateRef);
				ComponentTypeHandle<InfomodeActive> _Game_Prefabs_InfomodeActive_RO_ComponentTypeHandle = __TypeHandle.__Game_Prefabs_InfomodeActive_RO_ComponentTypeHandle;
				JobHandle val35 = default(JobHandle);
				JobHandle val33 = default(JobHandle);
				JobHandle val31 = default(JobHandle);
				JobHandle val29 = default(JobHandle);
				JobHandle val27 = default(JobHandle);
				JobHandle val25 = default(JobHandle);
				JobHandle val23 = default(JobHandle);
				JobHandle val21 = default(JobHandle);
				JobHandle val19 = default(JobHandle);
				JobHandle val17 = default(JobHandle);
				JobHandle val15 = default(JobHandle);
				JobHandle val13 = default(JobHandle);
				JobHandle val11 = default(JobHandle);
				JobHandle val9 = default(JobHandle);
				JobHandle val7 = default(JobHandle);
				JobHandle val5 = default(JobHandle);
				for (int i = 0; i < val.Length; i++)
				{
					ArchetypeChunk val2 = val[i];
					NativeArray<InfoviewHeatmapData> nativeArray = ((ArchetypeChunk)(ref val2)).GetNativeArray<InfoviewHeatmapData>(ref _Game_Prefabs_InfoviewHeatmapData_RO_ComponentTypeHandle);
					NativeArray<InfomodeActive> nativeArray2 = ((ArchetypeChunk)(ref val2)).GetNativeArray<InfomodeActive>(ref _Game_Prefabs_InfomodeActive_RO_ComponentTypeHandle);
					for (int j = 0; j < nativeArray.Length; j++)
					{
						InfoviewHeatmapData val3 = nativeArray[j];
						InfomodeActive val4 = nativeArray2[j];
						HeatmapData type = val3.m_Type;
						switch (type - 1)
						{
						case 0:
						{
							GroundWaterJob groundWaterJob = default(GroundWaterJob);
							groundWaterJob.m_ActiveData = val4;
							groundWaterJob.m_MapData = ((CellMapSystem<GroundWater>)(object)m_GroundWaterSystem).GetData(true, ref val35);
							GroundWaterJob groundWaterJob2 = groundWaterJob;
							groundWaterJob2.m_TextureData = GetTerrainTextureData<GroundWater>(groundWaterJob2.m_MapData);
							JobHandle val36 = IJobExtensions.Schedule<GroundWaterJob>(groundWaterJob2, JobHandle.CombineDependencies(((SystemBase)this).Dependency, val35));
							((CellMapSystem<GroundWater>)(object)m_GroundWaterSystem).AddReader(val36);
							m_Dependency = val36;
							((SystemBase)this).Dependency = val36;
							break;
						}
						case 1:
						{
							CitizenHappinessParameterData singleton3 = ((EntityQuery)(ref m_HappinessParameterQuery)).GetSingleton<CitizenHappinessParameterData>();
							GroundPollutionJob groundPollutionJob = default(GroundPollutionJob);
							groundPollutionJob.m_ActiveData = val4;
							groundPollutionJob.m_MapData = ((CellMapSystem<GroundPollution>)(object)m_GroundPollutionSystem).GetData(true, ref val33);
							groundPollutionJob.m_Multiplier = 256f / ((float)singleton3.m_MaxAirAndGroundPollutionBonus * (float)singleton3.m_PollutionBonusDivisor);
							GroundPollutionJob groundPollutionJob2 = groundPollutionJob;
							groundPollutionJob2.m_TextureData = GetTerrainTextureData<GroundPollution>(groundPollutionJob2.m_MapData);
							JobHandle val34 = IJobExtensions.Schedule<GroundPollutionJob>(groundPollutionJob2, JobHandle.CombineDependencies(((SystemBase)this).Dependency, val33));
							((CellMapSystem<GroundPollution>)(object)m_GroundPollutionSystem).AddReader(val34);
							m_Dependency = val34;
							((SystemBase)this).Dependency = val34;
							break;
						}
						case 2:
						{
							CitizenHappinessParameterData singleton2 = ((EntityQuery)(ref m_HappinessParameterQuery)).GetSingleton<CitizenHappinessParameterData>();
							AirPollutionJob airPollutionJob = default(AirPollutionJob);
							airPollutionJob.m_ActiveData = val4;
							airPollutionJob.m_MapData = ((CellMapSystem<AirPollution>)(object)m_AirPollutionSystem).GetData(true, ref val31);
							airPollutionJob.m_Multiplier = 256f / ((float)singleton2.m_MaxAirAndGroundPollutionBonus * (float)singleton2.m_PollutionBonusDivisor);
							AirPollutionJob airPollutionJob2 = airPollutionJob;
							airPollutionJob2.m_TextureData = GetTerrainTextureData<AirPollution>(airPollutionJob2.m_MapData);
							JobHandle val32 = IJobExtensions.Schedule<AirPollutionJob>(airPollutionJob2, JobHandle.CombineDependencies(((SystemBase)this).Dependency, val31));
							((CellMapSystem<AirPollution>)(object)m_AirPollutionSystem).AddReader(val32);
							m_Dependency = val32;
							((SystemBase)this).Dependency = val32;
							break;
						}
						case 14:
						{
							CitizenHappinessParameterData singleton = ((EntityQuery)(ref m_HappinessParameterQuery)).GetSingleton<CitizenHappinessParameterData>();
							NoisePollutionJob noisePollutionJob = default(NoisePollutionJob);
							noisePollutionJob.m_ActiveData = val4;
							noisePollutionJob.m_MapData = ((CellMapSystem<NoisePollution>)(object)m_NoisePollutionSystem).GetData(true, ref val29);
							noisePollutionJob.m_Multiplier = 256f / ((float)singleton.m_MaxNoisePollutionBonus * (float)singleton.m_PollutionBonusDivisor);
							NoisePollutionJob noisePollutionJob2 = noisePollutionJob;
							noisePollutionJob2.m_TextureData = GetTerrainTextureData<NoisePollution>(noisePollutionJob2.m_MapData);
							JobHandle val30 = IJobExtensions.Schedule<NoisePollutionJob>(noisePollutionJob2, JobHandle.CombineDependencies(((SystemBase)this).Dependency, val29));
							((CellMapSystem<NoisePollution>)(object)m_NoisePollutionSystem).AddReader(val30);
							m_Dependency = val30;
							((SystemBase)this).Dependency = val30;
							break;
						}
						case 3:
						{
							m_TerrainRenderSystem.overlayExtramap = (Texture)(object)m_WindTexture;
							float4 overlayArrowMask2 = default(float4);
							((float4)(ref overlayArrowMask2))[val4.m_Index - 1] = 1f;
							m_TerrainRenderSystem.overlayArrowMask = overlayArrowMask2;
							WindJob windJob = default(WindJob);
							windJob.m_MapData = ((CellMapSystem<Wind>)(object)m_WindSystem).GetData(true, ref val27);
							windJob.m_TextureData = m_WindTexture.GetRawTextureData<half4>();
							JobHandle val28 = IJobExtensions.Schedule<WindJob>(windJob, JobHandle.CombineDependencies(((SystemBase)this).Dependency, val27));
							((CellMapSystem<Wind>)(object)m_WindSystem).AddReader(val28);
							m_Dependency = val28;
							((SystemBase)this).Dependency = val28;
							break;
						}
						case 4:
						{
							m_WaterRenderSystem.overlayExtramap = m_WaterRenderSystem.flowTexture;
							float4 overlayArrowMask = default(float4);
							((float4)(ref overlayArrowMask))[val4.m_Index - 5] = 1f;
							m_WaterRenderSystem.overlayArrowMask = overlayArrowMask;
							break;
						}
						case 5:
						{
							TelecomCoverageJob telecomCoverageJob = default(TelecomCoverageJob);
							telecomCoverageJob.m_ActiveData = val4;
							telecomCoverageJob.m_MapData = ((CellMapSystem<TelecomCoverage>)(object)m_TelecomCoverageSystem).GetData(true, ref val25);
							TelecomCoverageJob telecomCoverageJob2 = telecomCoverageJob;
							telecomCoverageJob2.m_TextureData = GetTerrainTextureData<TelecomCoverage>(telecomCoverageJob2.m_MapData);
							JobHandle val26 = IJobExtensions.Schedule<TelecomCoverageJob>(telecomCoverageJob2, JobHandle.CombineDependencies(((SystemBase)this).Dependency, val25));
							((CellMapSystem<TelecomCoverage>)(object)m_TelecomCoverageSystem).AddReader(val26);
							m_Dependency = val26;
							((SystemBase)this).Dependency = val26;
							break;
						}
						case 6:
						{
							FertilityJob fertilityJob = default(FertilityJob);
							fertilityJob.m_ActiveData = val4;
							fertilityJob.m_MapData = ((CellMapSystem<NaturalResourceCell>)(object)m_NaturalResourceSystem).GetData(true, ref val23);
							FertilityJob fertilityJob2 = fertilityJob;
							fertilityJob2.m_TextureData = GetTerrainTextureData<NaturalResourceCell>(fertilityJob2.m_MapData);
							JobHandle val24 = IJobExtensions.Schedule<FertilityJob>(fertilityJob2, JobHandle.CombineDependencies(((SystemBase)this).Dependency, val23));
							((CellMapSystem<NaturalResourceCell>)(object)m_NaturalResourceSystem).AddReader(val24);
							m_Dependency = val24;
							((SystemBase)this).Dependency = val24;
							break;
						}
						case 7:
						{
							__TypeHandle.__Game_City_CityModifier_RO_BufferLookup.Update(ref ((SystemBase)this).CheckedStateRef);
							OreJob oreJob = default(OreJob);
							oreJob.m_ActiveData = val4;
							oreJob.m_MapData = ((CellMapSystem<NaturalResourceCell>)(object)m_NaturalResourceSystem).GetData(true, ref val21);
							oreJob.m_City = m_CitySystem.City;
							oreJob.m_CityModifiers = __TypeHandle.__Game_City_CityModifier_RO_BufferLookup;
							OreJob oreJob2 = oreJob;
							oreJob2.m_TextureData = GetTerrainTextureData<NaturalResourceCell>(oreJob2.m_MapData);
							JobHandle val22 = IJobExtensions.Schedule<OreJob>(oreJob2, JobHandle.CombineDependencies(((SystemBase)this).Dependency, val21));
							((CellMapSystem<NaturalResourceCell>)(object)m_NaturalResourceSystem).AddReader(val22);
							m_Dependency = val22;
							((SystemBase)this).Dependency = val22;
							break;
						}
						case 8:
						{
							__TypeHandle.__Game_City_CityModifier_RO_BufferLookup.Update(ref ((SystemBase)this).CheckedStateRef);
							OilJob oilJob = default(OilJob);
							oilJob.m_ActiveData = val4;
							oilJob.m_MapData = ((CellMapSystem<NaturalResourceCell>)(object)m_NaturalResourceSystem).GetData(true, ref val19);
							oilJob.m_CityModifiers = __TypeHandle.__Game_City_CityModifier_RO_BufferLookup;
							OilJob oilJob2 = oilJob;
							oilJob2.m_TextureData = GetTerrainTextureData<NaturalResourceCell>(oilJob2.m_MapData);
							JobHandle val20 = IJobExtensions.Schedule<OilJob>(oilJob2, JobHandle.CombineDependencies(((SystemBase)this).Dependency, val19));
							((CellMapSystem<NaturalResourceCell>)(object)m_NaturalResourceSystem).AddReader(val20);
							m_Dependency = val20;
							((SystemBase)this).Dependency = val20;
							break;
						}
						case 9:
						{
							LandValueHeatmap.LandValueJob landValueJob = default(LandValueHeatmap.LandValueJob);
							landValueJob.m_ActiveData = val4;
							landValueJob.m_MapData = ((CellMapSystem<LandValueCell>)(object)m_LandValueToGridSystem).GetData(true, ref val17);
							LandValueHeatmap.LandValueJob landValueJob2 = landValueJob;
							landValueJob2.m_TextureData = GetTerrainTextureData<LandValueCell>(landValueJob2.m_MapData);
							JobHandle val18 = IJobExtensions.Schedule<LandValueHeatmap.LandValueJob>(landValueJob2, JobHandle.CombineDependencies(val17, ((SystemBase)this).Dependency));
							((CellMapSystem<LandValueCell>)(object)m_LandValueToGridSystem).AddReader(val18);
							m_Dependency = val18;
							((SystemBase)this).Dependency = val18;
							break;
						}
						case 16:
						{
							PopulationJob populationJob = default(PopulationJob);
							populationJob.m_ActiveData = val4;
							populationJob.m_MapData = ((CellMapSystem<PopulationCell>)(object)m_PopulationToGridSystem).GetData(true, ref val15);
							PopulationJob populationJob2 = populationJob;
							populationJob2.m_TextureData = GetTerrainTextureData<PopulationCell>(populationJob2.m_MapData);
							JobHandle val16 = IJobExtensions.Schedule<PopulationJob>(populationJob2, JobHandle.CombineDependencies(val15, ((SystemBase)this).Dependency));
							((CellMapSystem<PopulationCell>)(object)m_PopulationToGridSystem).AddReader(val16);
							m_Dependency = val16;
							((SystemBase)this).Dependency = val16;
							break;
						}
						case 10:
						{
							AttractionJob attractionJob = default(AttractionJob);
							attractionJob.m_ActiveData = val4;
							attractionJob.m_MapData = ((CellMapSystem<AvailabilityInfoCell>)(object)m_AvailabilityInfoToGridSystem).GetData(true, ref val13);
							AttractionJob attractionJob2 = attractionJob;
							attractionJob2.m_TextureData = GetTerrainTextureData<AvailabilityInfoCell>(attractionJob2.m_MapData);
							JobHandle val14 = IJobExtensions.Schedule<AttractionJob>(attractionJob2, JobHandle.CombineDependencies(((SystemBase)this).Dependency, val13));
							((CellMapSystem<AvailabilityInfoCell>)(object)m_AvailabilityInfoToGridSystem).AddReader(val14);
							m_Dependency = val14;
							((SystemBase)this).Dependency = val14;
							break;
						}
						case 11:
						{
							CustomerJob customerJob = default(CustomerJob);
							customerJob.m_ActiveData = val4;
							customerJob.m_MapData = ((CellMapSystem<AvailabilityInfoCell>)(object)m_AvailabilityInfoToGridSystem).GetData(true, ref val11);
							CustomerJob customerJob2 = customerJob;
							customerJob2.m_TextureData = GetTerrainTextureData<AvailabilityInfoCell>(customerJob2.m_MapData);
							JobHandle val12 = IJobExtensions.Schedule<CustomerJob>(customerJob2, JobHandle.CombineDependencies(((SystemBase)this).Dependency, val11));
							((CellMapSystem<AvailabilityInfoCell>)(object)m_AvailabilityInfoToGridSystem).AddReader(val12);
							m_Dependency = val12;
							((SystemBase)this).Dependency = val12;
							break;
						}
						case 12:
						{
							WorkplaceJob workplaceJob = default(WorkplaceJob);
							workplaceJob.m_ActiveData = val4;
							workplaceJob.m_MapData = ((CellMapSystem<AvailabilityInfoCell>)(object)m_AvailabilityInfoToGridSystem).GetData(true, ref val9);
							WorkplaceJob workplaceJob2 = workplaceJob;
							workplaceJob2.m_TextureData = GetTerrainTextureData<AvailabilityInfoCell>(workplaceJob2.m_MapData);
							JobHandle val10 = IJobExtensions.Schedule<WorkplaceJob>(workplaceJob2, JobHandle.CombineDependencies(((SystemBase)this).Dependency, val9));
							((CellMapSystem<AvailabilityInfoCell>)(object)m_AvailabilityInfoToGridSystem).AddReader(val10);
							m_Dependency = val10;
							((SystemBase)this).Dependency = val10;
							break;
						}
						case 13:
						{
							ServiceJob serviceJob = default(ServiceJob);
							serviceJob.m_ActiveData = val4;
							serviceJob.m_MapData = ((CellMapSystem<AvailabilityInfoCell>)(object)m_AvailabilityInfoToGridSystem).GetData(true, ref val7);
							ServiceJob serviceJob2 = serviceJob;
							serviceJob2.m_TextureData = GetTerrainTextureData<AvailabilityInfoCell>(serviceJob2.m_MapData);
							JobHandle val8 = IJobExtensions.Schedule<ServiceJob>(serviceJob2, JobHandle.CombineDependencies(((SystemBase)this).Dependency, val7));
							((CellMapSystem<AvailabilityInfoCell>)(object)m_AvailabilityInfoToGridSystem).AddReader(val8);
							m_Dependency = val8;
							((SystemBase)this).Dependency = val8;
							break;
						}
						case 17:
						{
							GroundWaterPollutionJob groundWaterPollutionJob = default(GroundWaterPollutionJob);
							groundWaterPollutionJob.m_ActiveData = val4;
							groundWaterPollutionJob.m_MapData = ((CellMapSystem<GroundWater>)(object)m_GroundWaterSystem).GetData(true, ref val5);
							GroundWaterPollutionJob groundWaterPollutionJob2 = groundWaterPollutionJob;
							groundWaterPollutionJob2.m_TextureData = GetTerrainTextureData<GroundWater>(groundWaterPollutionJob2.m_MapData);
							JobHandle val6 = IJobExtensions.Schedule<GroundWaterPollutionJob>(groundWaterPollutionJob2, JobHandle.CombineDependencies(((SystemBase)this).Dependency, val5));
							((CellMapSystem<GroundWater>)(object)m_GroundWaterSystem).AddReader(val6);
							m_Dependency = val6;
							((SystemBase)this).Dependency = val6;
							break;
						}
						case 15:
						{
							float4 overlayPollutionMask = default(float4);
							((float4)(ref overlayPollutionMask))[val4.m_Index - 5] = 1f;
							m_WaterRenderSystem.overlayPollutionMask = overlayPollutionMask;
							break;
						}
						}
					}
				}
				val.Dispose();
			}
			if ((Object)(object)m_ToolSystem.activeInfoview != (Object)null)
			{
				if ((Object)(object)m_TerrainRenderSystem.overrideOverlaymap == (Object)null)
				{
					GetTerrainTextureData(int2.op_Implicit(1));
				}
				if ((Object)(object)m_WaterRenderSystem.overrideOverlaymap == (Object)null)
				{
					GetWaterTextureData(int2.op_Implicit(1));
				}
			}
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		private void __AssignQueries(ref SystemState state)
		{
		}

		protected override void OnCreateForCompiler()
		{
			((ComponentSystemBase)this).OnCreateForCompiler();
			__AssignQueries(ref ((SystemBase)this).CheckedStateRef);
			__TypeHandle.__AssignHandles(ref ((SystemBase)this).CheckedStateRef);
		}

		[Preserve]
		public OverlayInfomodeSystem()
		{
		}
	}
	[HarmonyPatch]
	internal class Patches
	{
		[HarmonyPatch(typeof(PrefabSystem), "AddPrefab")]
		[HarmonyPrefix]
		public static bool PrefabSystem_AddPrefab_Prefix(PrefabBase prefab)
		{
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_016e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0173: Unknown result type (might be due to invalid IL or missing references)
			//IL_0188: Unknown result type (might be due to invalid IL or missing references)
			//IL_018d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
			if (((object)prefab).GetType() == typeof(HeatmapInfomodePrefab) && ((Object)prefab).name == "LandValueInfomode")
			{
				HeatmapInfomodePrefab val = (HeatmapInfomodePrefab)(object)((prefab is HeatmapInfomodePrefab) ? prefab : null);
				((GradientInfomodeBasePrefab)val).m_Steps = 26;
				((GradientInfomodeBasePrefab)val).m_Low = new Color(0.72156864f, 64f / 85f, 72f / 85f);
				((GradientInfomodeBasePrefab)val).m_Medium = new Color(19f / 85f, 0.3529412f, 0.7490196f);
				((GradientInfomodeBasePrefab)val).m_High = new Color(0.043137256f, 9f / 85f, 0.29803923f);
				Plugin.Log($"Modded {((Object)prefab).name}.{val.m_Type}: {((GradientInfomodeBasePrefab)val).m_Steps} steps, colors {((GradientInfomodeBasePrefab)val).m_Low} -> {((GradientInfomodeBasePrefab)val).m_Medium} -> {((GradientInfomodeBasePrefab)val).m_High}");
			}
			if (((object)prefab).GetType() == typeof(BuildingStatusInfomodePrefab) && ((Object)prefab).name == "Building Land Value")
			{
				BuildingStatusInfomodePrefab val2 = (BuildingStatusInfomodePrefab)(object)((prefab is BuildingStatusInfomodePrefab) ? prefab : null);
				((GradientInfomodeBasePrefab)val2).m_Steps = 26;
				val2.m_Range = new Bounds1(0f, 5000f);
				((GradientInfomodeBasePrefab)val2).m_Low = new Color(0.72156864f, 64f / 85f, 72f / 85f);
				((GradientInfomodeBasePrefab)val2).m_Medium = new Color(19f / 85f, 0.3529412f, 0.7490196f);
				((GradientInfomodeBasePrefab)val2).m_High = new Color(0.043137256f, 9f / 85f, 0.29803923f);
				Plugin.Log($"Modded {((Object)prefab).name}.{val2.m_Type}: {((GradientInfomodeBasePrefab)val2).m_Steps} steps, colors {((GradientInfomodeBasePrefab)val2).m_Low} -> {((GradientInfomodeBasePrefab)val2).m_Medium} -> {((GradientInfomodeBasePrefab)val2).m_High}, range {val2.m_Range}");
			}
			return true;
		}

		[HarmonyPatch(typeof(SystemOrder), "Initialize")]
		[HarmonyPostfix]
		public static void Initialize_Postfix(UpdateSystem updateSystem)
		{
			updateSystem.UpdateAt<OverlayInfomodeSystem>((SystemUpdatePhase)27);
		}

		[HarmonyPatch(typeof(OverlayInfomodeSystem), "OnUpdate")]
		[HarmonyPrefix]
		private static bool OverlayInfomodeSystem_OnUpdate()
		{
			return false;
		}

		[HarmonyPatch(typeof(TerrainRenderSystem), "OnCreate")]
		[HarmonyPostfix]
		private static void TerrainRenderSystem_OnCreate(TerrainRenderSystem __instance, ref OverlayInfomodeSystem ___m_OverlayInfomodeSystem)
		{
			___m_OverlayInfomodeSystem = ((ComponentSystemBase)__instance).World.GetOrCreateSystemManaged<OverlayInfomodeSystem>();
		}
	}
	[BurstCompile]
	public struct LandValueJob : IJob
	{
		[ReadOnly]
		public InfomodeActive m_ActiveData;

		[ReadOnly]
		public CellMapData<LandValueCell> m_MapData;

		public NativeArray<byte> m_TextureData;

		public void Execute()
		{
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			int num = m_ActiveData.m_Index - 1;
			for (int i = 0; i < m_MapData.m_TextureSize.y; i++)
			{
				for (int j = 0; j < m_MapData.m_TextureSize.x; j++)
				{
					int num2 = j + i * m_MapData.m_TextureSize.x;
					LandValueCell val = m_MapData.m_Buffer[num2];
					m_TextureData[num2 * 4 + num] = (byte)math.clamp(Mathf.RoundToInt(val.m_LandValue * 0.1f), 0, 255);
				}
			}
		}
	}
	[BepInPlugin("LandValueHeatmap", "LandValueHeatmap", "1.0.0")]
	public class Plugin : BaseUnityPlugin
	{
		internal static ManualLogSource Logger;

		private static ILog s_Log;

		public static void Log(string text, bool bMethod = false)
		{
			if (bMethod)
			{
				text = GetCallingMethod(2) + ": " + text;
			}
			Logger.LogInfo((object)text);
			s_Log.Info((object)text);
		}

		public static void LogStack(string text)
		{
			Logger.LogInfo((object)(text + " STACKTRACE"));
			s_Log.logStackTrace = true;
			s_Log.Info((object)(text + "STACKTRACE"));
			s_Log.logStackTrace = false;
		}

		public static string GetCallingMethod(int frame)
		{
			MethodBase method = new StackTrace().GetFrame(frame).GetMethod();
			return method.DeclaringType?.ToString() + "." + method.Name;
		}

		private void Awake()
		{
			Logger = ((BaseUnityPlugin)this).Logger;
			s_Log = LogManager.GetLogger("LandValueHeatmap", true);
			Log("Plugin LandValueHeatmap is loaded!");
			MethodBase[] array = Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), "LandValueHeatmap_Cities2Harmony").GetPatchedMethods().ToArray();
			Log("Plugin LandValueHeatmap made patches! Patched methods: " + array.Length);
			MethodBase[] array2 = array;
			foreach (MethodBase methodBase in array2)
			{
				Log("Patched method: " + methodBase.Module.Name + ":" + methodBase.Name);
			}
		}
	}
	public static class MyPluginInfo
	{
		public const string PLUGIN_GUID = "LandValueHeatmap";

		public const string PLUGIN_NAME = "LandValueHeatmap";

		public const string PLUGIN_VERSION = "1.0.0";
	}
}