Decompiled source of Cities2Mods RenterAndLandValuePolicy v0.0.2

Cities2Mods.RenterAndLandValuePolicy 0.0.2.dll

Decompiled a year ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using Game;
using Game.Areas;
using Game.Buildings;
using Game.Citizens;
using Game.Common;
using Game.Companies;
using Game.Net;
using Game.Objects;
using Game.Prefabs;
using Game.Simulation;
using Game.Tools;
using HarmonyLib;
using Unity.Burst;
using Unity.Burst.Intrinsics;
using Unity.Collections;
using Unity.Entities;
using Unity.Jobs;
using Unity.Mathematics;
using UnityEngine;
using UnityEngine.Scripting;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("CityPlayer")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("0.0.2.0")]
[assembly: AssemblyInformationalVersion("0.0.2")]
[assembly: AssemblyProduct("Cities2Mods.RenterAndLandValuePolicy")]
[assembly: AssemblyTitle("Cities2Mods.RenterAndLandValuePolicy")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.2.0")]
[module: UnverifiableCode]
namespace Cities2Mods.RenterAndLandValuePolicy
{
	[BepInPlugin("Cities2Mods.RenterAndLandValuePolicy", "Cities2Mods.RenterAndLandValuePolicy", "0.0.2")]
	public class Plugin : BaseUnityPlugin
	{
		internal static ManualLogSource Log;

		private void Awake()
		{
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			Log = ((BaseUnityPlugin)this).Logger;
			Log.LogInfo((object)"Cities2Mods.RenterAndLandValuePolicy_0.0.2_by CityPlayer");
			Log.LogInfo((object)"Discord link: https://discord.gg/wNAyF78XBp");
			new Harmony("Cities2Mods.RenterAndLandValuePolicy").PatchAll();
		}
	}
	public static class MyPluginInfo
	{
		public const string PLUGIN_GUID = "Cities2Mods.RenterAndLandValuePolicy";

		public const string PLUGIN_NAME = "Cities2Mods.RenterAndLandValuePolicy";

		public const string PLUGIN_VERSION = "0.0.2";
	}
}
namespace Cities2Mods.LandValueSystem
{
	[CompilerGenerated]
	public class LandValueSystem : GameSystemBase
	{
		[BurstCompile]
		private struct EdgeUpdateJob : IJobChunk
		{
			[ReadOnly]
			public EntityTypeHandle m_EntityType;

			[ReadOnly]
			public BufferTypeHandle<ConnectedBuilding> m_ConnectedBuildingType;

			[ReadOnly]
			public ComponentTypeHandle<Edge> m_EdgeType;

			[ReadOnly]
			public ComponentTypeHandle<Curve> m_CurveType;

			[NativeDisableParallelForRestriction]
			public ComponentLookup<LandValue> m_LandValues;

			[ReadOnly]
			public BufferLookup<Renter> m_RenterBuffers;

			[ReadOnly]
			public ComponentLookup<PropertyRenter> m_PropertyRenters;

			[ReadOnly]
			public ComponentLookup<PrefabRef> m_Prefabs;

			[ReadOnly]
			public ComponentLookup<BuildingData> m_BuildingDatas;

			[ReadOnly]
			public ComponentLookup<Abandoned> m_Abandoneds;

			[ReadOnly]
			public ComponentLookup<Destroyed> m_Destroyeds;

			[ReadOnly]
			public ComponentLookup<ConsumptionData> m_ConsumptionDatas;

			[ReadOnly]
			public ComponentLookup<BuildingPropertyData> m_PropertyDatas;

			[ReadOnly]
			public ComponentLookup<Household> m_Households;

			[ReadOnly]
			public ComponentLookup<Placeholder> m_Placeholders;

			[ReadOnly]
			public ComponentLookup<Attached> m_Attached;

			[ReadOnly]
			public BufferLookup<SubArea> m_SubAreas;

			[ReadOnly]
			public ComponentLookup<Lot> m_Lots;

			[ReadOnly]
			public ComponentLookup<Geometry> m_Geometries;

			[ReadOnly]
			public ComponentLookup<BorderDistrict> m_BorderDistrictData;

			[ReadOnly]
			public ComponentLookup<CurrentDistrict> m_CurrentDistrictData;

			[ReadOnly]
			public BufferLookup<DistrictModifier> m_DistrictModifierData;

			public ParallelWriter m_CommandBuffer;

			[NativeDisableParallelForRestriction]
			public ComponentLookup<Building> m_Buildings;

			[ReadOnly]
			public ComponentLookup<CompanyNotifications> m_CompanyNotifications;

			public void Execute(in ArchetypeChunk chunk, int unfilteredChunkIndex, bool useEnabledMask, in v128 chunkEnabledMask)
			{
				//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)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0014: Unknown result type (might be due to invalid IL or missing references)
				//IL_0019: Unknown result type (might be due to invalid IL or missing references)
				//IL_0021: 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_002e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0033: Unknown result type (might be due to invalid IL or missing references)
				//IL_0040: Unknown result type (might be due to invalid IL or missing references)
				//IL_0045: 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)
				//IL_0050: 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_005b: 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_0065: 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_006f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0074: Unknown result type (might be due to invalid IL or missing references)
				//IL_007c: Unknown result type (might be due to invalid IL or missing references)
				//IL_007e: 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_008b: 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_0092: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a5: 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_00b8: Unknown result type (might be due to invalid IL or missing references)
				//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
				//IL_04ef: Unknown result type (might be due to invalid IL or missing references)
				//IL_04f1: Unknown result type (might be due to invalid IL or missing references)
				//IL_04f6: Unknown result type (might be due to invalid IL or missing references)
				//IL_04fe: Unknown result type (might be due to invalid IL or missing references)
				//IL_0500: Unknown result type (might be due to invalid IL or missing references)
				//IL_0505: Unknown result type (might be due to invalid IL or missing references)
				//IL_050d: Unknown result type (might be due to invalid IL or missing references)
				//IL_050f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0514: Unknown result type (might be due to invalid IL or missing references)
				//IL_051a: Unknown result type (might be due to invalid IL or missing references)
				//IL_055a: 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_057c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0583: Unknown result type (might be due to invalid IL or missing references)
				//IL_058d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0591: Unknown result type (might be due to invalid IL or missing references)
				//IL_0596: Unknown result type (might be due to invalid IL or missing references)
				//IL_059a: Unknown result type (might be due to invalid IL or missing references)
				//IL_05a1: Unknown result type (might be due to invalid IL or missing references)
				//IL_05ad: Unknown result type (might be due to invalid IL or missing references)
				//IL_05b4: Unknown result type (might be due to invalid IL or missing references)
				//IL_05bb: Unknown result type (might be due to invalid IL or missing references)
				//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
				//IL_05ed: Unknown result type (might be due to invalid IL or missing references)
				//IL_0612: 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_065a: 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_069d: Unknown result type (might be due to invalid IL or missing references)
				//IL_069f: Unknown result type (might be due to invalid IL or missing references)
				//IL_03fd: Unknown result type (might be due to invalid IL or missing references)
				//IL_0406: Unknown result type (might be due to invalid IL or missing references)
				//IL_0408: Unknown result type (might be due to invalid IL or missing references)
				//IL_040d: 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_00f0: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
				//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
				//IL_0102: Unknown result type (might be due to invalid IL or missing references)
				//IL_0423: Unknown result type (might be due to invalid IL or missing references)
				//IL_0425: Unknown result type (might be due to invalid IL or missing references)
				//IL_0114: 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_043c: 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_0448: Unknown result type (might be due to invalid IL or missing references)
				//IL_0465: Unknown result type (might be due to invalid IL or missing references)
				//IL_04ae: Unknown result type (might be due to invalid IL or missing references)
				//IL_04b0: Unknown result type (might be due to invalid IL or missing references)
				//IL_04bd: Unknown result type (might be due to invalid IL or missing references)
				//IL_04bf: Unknown result type (might be due to invalid IL or missing references)
				//IL_04cc: Unknown result type (might be due to invalid IL or missing references)
				//IL_04ce: Unknown result type (might be due to invalid IL or missing references)
				//IL_0126: Unknown result type (might be due to invalid IL or missing references)
				//IL_0138: 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_0141: Unknown result type (might be due to invalid IL or missing references)
				//IL_0143: Unknown result type (might be due to invalid IL or missing references)
				//IL_0153: Unknown result type (might be due to invalid IL or missing references)
				//IL_0155: Unknown result type (might be due to invalid IL or missing references)
				//IL_015a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0162: 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_0169: Unknown result type (might be due to invalid IL or missing references)
				//IL_0174: Unknown result type (might be due to invalid IL or missing references)
				//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_019a: 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_01a6: 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_01bb: Unknown result type (might be due to invalid IL or missing references)
				//IL_0187: Unknown result type (might be due to invalid IL or missing references)
				//IL_0189: Unknown result type (might be due to invalid IL or missing references)
				//IL_0190: Invalid comparison between Unknown and I8
				//IL_0213: Unknown result type (might be due to invalid IL or missing references)
				//IL_022a: 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_01ca: Unknown result type (might be due to invalid IL or missing references)
				//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
				//IL_01d1: 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_01de: 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_0258: 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_01ed: 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)
				//IL_01f4: Unknown result type (might be due to invalid IL or missing references)
				//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
				//IL_01fb: 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_026b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0270: Unknown result type (might be due to invalid IL or missing references)
				//IL_0275: Unknown result type (might be due to invalid IL or missing references)
				//IL_027d: Unknown result type (might be due to invalid IL or missing references)
				//IL_028f: 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_0298: Unknown result type (might be due to invalid IL or missing references)
				//IL_029a: Unknown result type (might be due to invalid IL or missing references)
				//IL_02a5: Unknown result type (might be due to invalid IL or missing references)
				//IL_02a7: Unknown result type (might be due to invalid IL or missing references)
				//IL_02ac: Unknown result type (might be due to invalid IL or missing references)
				//IL_02c6: 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_02bf: Unknown result type (might be due to invalid IL or missing references)
				//IL_02d6: Unknown result type (might be due to invalid IL or missing references)
				//IL_0380: Unknown result type (might be due to invalid IL or missing references)
				//IL_0316: Unknown result type (might be due to invalid IL or missing references)
				//IL_02e6: Unknown result type (might be due to invalid IL or missing references)
				//IL_0321: Unknown result type (might be due to invalid IL or missing references)
				//IL_032e: 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_02f5: Unknown result type (might be due to invalid IL or missing references)
				//IL_0369: Unknown result type (might be due to invalid IL or missing references)
				//IL_0352: Unknown result type (might be due to invalid IL or missing references)
				//IL_0305: Unknown result type (might be due to invalid IL or missing references)
				NativeArray<Entity> nativeArray = ((ArchetypeChunk)(ref chunk)).GetNativeArray(m_EntityType);
				NativeArray<Edge> nativeArray2 = ((ArchetypeChunk)(ref chunk)).GetNativeArray<Edge>(ref m_EdgeType);
				NativeArray<Curve> nativeArray3 = ((ArchetypeChunk)(ref chunk)).GetNativeArray<Curve>(ref m_CurveType);
				BufferAccessor<ConnectedBuilding> bufferAccessor = ((ArchetypeChunk)(ref chunk)).GetBufferAccessor<ConnectedBuilding>(ref m_ConnectedBuildingType);
				CurrentDistrict val12 = default(CurrentDistrict);
				float2 val13 = default(float2);
				float2 val14 = default(float2);
				for (int i = 0; i < nativeArray2.Length; i++)
				{
					Entity val = nativeArray[i];
					Entity start = nativeArray2[i].m_Start;
					Entity end = nativeArray2[i].m_End;
					LandValue val2 = m_LandValues[val];
					LandValue val3 = m_LandValues[start];
					LandValue val4 = m_LandValues[end];
					int num = 0;
					float num2 = 0f;
					int num3 = 0;
					DynamicBuffer<ConnectedBuilding> val5 = bufferAccessor[i];
					for (int j = 0; j < val5.Length; j++)
					{
						Entity building = val5[j].m_Building;
						if (m_Prefabs.HasComponent(building) && !m_Placeholders.HasComponent(building))
						{
							Entity prefab = m_Prefabs[building].m_Prefab;
							if (m_PropertyDatas.HasComponent(prefab) && !m_Abandoneds.HasComponent(building) && !m_Destroyeds.HasComponent(building))
							{
								BuildingPropertyData val6 = m_PropertyDatas[prefab];
								if ((int)val6.m_AllowedStored == 0)
								{
									BuildingData val7 = m_BuildingDatas[prefab];
									ConsumptionData val8 = m_ConsumptionDatas[prefab];
									int num4 = ((BuildingPropertyData)(ref val6)).CountProperties();
									bool flag = val6.m_ResidentialProperties > 0 && ((int)val6.m_AllowedSold != 0 || (long)val6.m_AllowedManufactured > 0L);
									int num5 = val7.m_LotSize.x * val7.m_LotSize.y;
									if (m_Attached.HasComponent(building))
									{
										Entity parent = m_Attached[building].m_Parent;
										if (m_SubAreas.HasBuffer(parent))
										{
											DynamicBuffer<SubArea> val9 = m_SubAreas[parent];
											num5 += Mathf.CeilToInt(ExtractorAISystem.GetArea(val9, m_Lots, m_Geometries));
										}
									}
									float num6 = val2.m_LandValue * (float)num5 / (float)math.max(1, num4);
									float num7 = (float)val8.m_Upkeep / (float)math.max(1, num4);
									if (m_RenterBuffers.HasBuffer(building))
									{
										DynamicBuffer<Renter> val10 = m_RenterBuffers[building];
										for (int k = 0; k < val10.Length; k++)
										{
											Entity renter = val10[k].m_Renter;
											if (m_PropertyRenters.HasComponent(renter))
											{
												PropertyRenter val11 = m_PropertyRenters[renter];
												if (val11.m_Property == m_CompanyNotifications[renter].m_NoCustomersEntity)
												{
													((ParallelWriter)(ref m_CommandBuffer)).RemoveComponent<PropertyRenter>(unfilteredChunkIndex, renter);
												}
												if (val11.m_Rent >= val11.m_MaxRent && val11.m_MaxRent > 0 && !m_Attached.HasComponent(building) && !m_Attached.HasComponent(building))
												{
													((ParallelWriter)(ref m_CommandBuffer)).RemoveComponent<PropertyRenter>(unfilteredChunkIndex, renter);
												}
												num2 = ((!flag || m_Households.HasComponent(renter)) ? (num2 + (((float)val11.m_MaxRent - num7 >= 3f * num6) ? 1f : (-1f))) : (num2 + (((float)val11.m_MaxRent - RentAdjustSystem.kMixedCompanyRent * (float)val8.m_Upkeep >= 3f * RentAdjustSystem.kMixedCompanyRent * val2.m_LandValue) ? ((float)Mathf.RoundToInt(RentAdjustSystem.kMixedCompanyRent * (float)val6.m_ResidentialProperties)) : (0f - (float)Mathf.RoundToInt(RentAdjustSystem.kMixedCompanyRent * (float)val6.m_ResidentialProperties)))));
												num3++;
											}
										}
										num += num5;
										int num8 = num4 - val10.Length;
										num2 -= (float)num8;
										num3 += num8;
									}
								}
							}
						}
						else
						{
							num++;
						}
						num = math.max(1, num);
						float num9 = num;
						if ((m_CurrentDistrictData.TryGetComponent(building, ref val12) & (val12.m_District != Entity.Null)) && m_DistrictModifierData.HasBuffer(val12.m_District))
						{
							DynamicBuffer<DistrictModifier> modifierData = m_DistrictModifierData[val12.m_District];
							float num10 = math.clamp(val2.m_LandValue, 1f, 1000f);
							float num11 = 1f + GetLandValueFactor(modifierData) * 0.001f / num9 * num10 * 0.0005f;
							val3.m_LandValue *= num11;
							val4.m_LandValue *= num11;
							val2.m_LandValue *= num11;
							m_LandValues[start] = val3;
							m_LandValues[end] = val4;
							m_LandValues[val] = val2;
						}
					}
					val3 = m_LandValues[start];
					val4 = m_LandValues[end];
					val2 = m_LandValues[val];
					float length = nativeArray3[i].m_Length;
					float distanceFade = GetDistanceFade(length);
					int num12 = num;
					num = math.max(num, Mathf.CeilToInt(length / 4f));
					num3 -= num - num12;
					((float2)(ref val13))..ctor(math.max(1f, val3.m_Weight), math.max(1f, val4.m_Weight));
					float num13 = val13.x + val13.y;
					val13 *= distanceFade;
					((float2)(ref val14))..ctor(val3.m_LandValue, val4.m_LandValue);
					float num14 = math.lerp(val14.x, val14.y, val13.y / num13);
					float num15 = 0f;
					if (num3 > 0)
					{
						num15 = 0.1f * num2 / (float)num3;
					}
					val2.m_Weight = math.max(1f, math.lerp(val2.m_Weight, (float)num, 0.1f));
					float num16 = num13 / (99f * val2.m_Weight + num13);
					val2.m_LandValue = math.lerp(val2.m_LandValue, num14, num16);
					val2.m_LandValue += math.min(1f, math.max(-1f, num15));
					val2.m_LandValue = math.max(val2.m_LandValue, 0f);
					val2.m_Weight = math.lerp(val2.m_Weight, math.max(1f, 0.5f * num13), num16);
					m_LandValues[val] = val2;
				}
			}

			void IJobChunk.Execute(in ArchetypeChunk chunk, int unfilteredChunkIndex, bool useEnabledMask, in v128 chunkEnabledMask)
			{
				Execute(in chunk, unfilteredChunkIndex, useEnabledMask, in chunkEnabledMask);
			}
		}

		[BurstCompile]
		private struct NodeUpdateJob : IJobChunk
		{
			[ReadOnly]
			public EntityTypeHandle m_EntityType;

			[ReadOnly]
			public ComponentTypeHandle<Node> m_NodeType;

			[ReadOnly]
			public BufferTypeHandle<ConnectedEdge> m_ConnectedEdgeType;

			[NativeDisableParallelForRestriction]
			public ComponentLookup<LandValue> m_LandValues;

			[ReadOnly]
			public ComponentLookup<Curve> m_Curves;

			[ReadOnly]
			public ComponentLookup<BorderDistrict> m_BorderDistrictData;

			[ReadOnly]
			public ComponentLookup<CurrentDistrict> m_CurrentDistrictData;

			[ReadOnly]
			public BufferLookup<DistrictModifier> m_DistrictModifierData;

			public void Execute(in ArchetypeChunk chunk, int unfilteredChunkIndex, bool useEnabledMask, in v128 chunkEnabledMask)
			{
				//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)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0014: Unknown result type (might be due to invalid IL or missing references)
				//IL_0019: Unknown result type (might be due to invalid IL or missing references)
				//IL_0021: 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_0031: Unknown result type (might be due to invalid IL or missing references)
				//IL_0036: Unknown result type (might be due to invalid IL or missing references)
				//IL_003e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0040: Unknown result type (might be due to invalid IL or missing references)
				//IL_0045: Unknown result type (might be due to invalid IL or missing references)
				//IL_0058: Unknown result type (might be due to invalid IL or missing references)
				//IL_005d: Unknown result type (might be due to invalid IL or missing references)
				//IL_006b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0070: 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_007d: Unknown result type (might be due to invalid IL or missing references)
				//IL_008f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0235: Unknown result type (might be due to invalid IL or missing references)
				//IL_0254: Unknown result type (might be due to invalid IL or missing references)
				//IL_0280: Unknown result type (might be due to invalid IL or missing references)
				//IL_0282: 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_01af: 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_01c3: Unknown result type (might be due to invalid IL or missing references)
				//IL_01d5: Unknown result type (might be due to invalid IL or missing references)
				//IL_009d: Unknown result type (might be due to invalid IL or missing references)
				//IL_009f: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
				//IL_01e4: Unknown result type (might be due to invalid IL or missing references)
				//IL_01e6: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
				//IL_0133: Unknown result type (might be due to invalid IL or missing references)
				//IL_0135: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e7: 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_00f3: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
				//IL_0112: Unknown result type (might be due to invalid IL or missing references)
				//IL_019e: Unknown result type (might be due to invalid IL or missing references)
				//IL_01a0: Unknown result type (might be due to invalid IL or missing references)
				//IL_0147: Unknown result type (might be due to invalid IL or missing references)
				//IL_0149: Unknown result type (might be due to invalid IL or missing references)
				//IL_014e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0153: Unknown result type (might be due to invalid IL or missing references)
				//IL_0155: Unknown result type (might be due to invalid IL or missing references)
				//IL_0172: Unknown result type (might be due to invalid IL or missing references)
				NativeArray<Entity> nativeArray = ((ArchetypeChunk)(ref chunk)).GetNativeArray(m_EntityType);
				NativeArray<Node> nativeArray2 = ((ArchetypeChunk)(ref chunk)).GetNativeArray<Node>(ref m_NodeType);
				BufferAccessor<ConnectedEdge> bufferAccessor = ((ArchetypeChunk)(ref chunk)).GetBufferAccessor<ConnectedEdge>(ref m_ConnectedEdgeType);
				BorderDistrict val4 = default(BorderDistrict);
				for (int i = 0; i < nativeArray2.Length; i++)
				{
					Entity val = nativeArray[i];
					LandValue val2 = m_LandValues[val];
					float num = 0f;
					float num2 = 0f;
					DynamicBuffer<ConnectedEdge> val3 = bufferAccessor[i];
					for (int j = 0; j < val3.Length; j++)
					{
						Entity edge = val3[j].m_Edge;
						if (!m_LandValues.HasComponent(edge))
						{
							continue;
						}
						if (m_BorderDistrictData.TryGetComponent(edge, ref val4) && (val4.m_Left != Entity.Null || val4.m_Right != Entity.Null))
						{
							float num3 = 1f;
							if (m_DistrictModifierData.HasBuffer(val4.m_Left))
							{
								DynamicBuffer<DistrictModifier> modifierData = m_DistrictModifierData[val4.m_Left];
								float num4 = math.clamp(val2.m_LandValue, 1f, 1000f);
								num3 = 1f + GetLandValueFactor(modifierData) * 0.001f * num4 * 0.0005f;
							}
							else if (m_DistrictModifierData.HasBuffer(val4.m_Right))
							{
								DynamicBuffer<DistrictModifier> modifierData2 = m_DistrictModifierData[val4.m_Right];
								float num5 = math.clamp(val2.m_LandValue, 1f, 1000f);
								num3 = 1f + GetLandValueFactor(modifierData2) * 0.001f * num5 * 0.0005f;
							}
							val2.m_LandValue *= num3;
							m_LandValues[val] = val2;
						}
						float landValue = m_LandValues[edge].m_LandValue;
						float num6 = m_LandValues[edge].m_Weight;
						if (m_Curves.HasComponent(edge))
						{
							float distanceFade = GetDistanceFade(m_Curves[edge].m_Length);
							num6 *= distanceFade;
						}
						num += landValue * num6;
						num2 += num6;
					}
					if (num2 != 0f)
					{
						num /= num2;
						val2.m_LandValue = math.lerp(val2.m_LandValue, num, 0.05f);
						val2.m_Weight = math.max(1f, math.lerp(val2.m_Weight, num2 / (float)val3.Length, 0.05f));
						m_LandValues[val] = val2;
					}
				}
			}

			void IJobChunk.Execute(in ArchetypeChunk chunk, int unfilteredChunkIndex, bool useEnabledMask, in v128 chunkEnabledMask)
			{
				Execute(in chunk, unfilteredChunkIndex, useEnabledMask, in chunkEnabledMask);
			}
		}

		private struct TypeHandle
		{
			[ReadOnly]
			public EntityTypeHandle __Unity_Entities_Entity_TypeHandle;

			[ReadOnly]
			public ComponentTypeHandle<Edge> __Game_Net_Edge_RO_ComponentTypeHandle;

			[ReadOnly]
			public ComponentTypeHandle<Curve> __Game_Net_Curve_RO_ComponentTypeHandle;

			[ReadOnly]
			public BufferTypeHandle<ConnectedBuilding> __Game_Buildings_ConnectedBuilding_RO_BufferTypeHandle;

			[ReadOnly]
			public ComponentLookup<BuildingData> __Game_Prefabs_BuildingData_RO_ComponentLookup;

			public ComponentLookup<LandValue> __Game_Net_LandValue_RW_ComponentLookup;

			[ReadOnly]
			public ComponentLookup<PrefabRef> __Game_Prefabs_PrefabRef_RO_ComponentLookup;

			[ReadOnly]
			public ComponentLookup<PropertyRenter> __Game_Buildings_PropertyRenter_RO_ComponentLookup;

			[ReadOnly]
			public BufferLookup<Renter> __Game_Buildings_Renter_RO_BufferLookup;

			[ReadOnly]
			public ComponentLookup<Abandoned> __Game_Buildings_Abandoned_RO_ComponentLookup;

			[ReadOnly]
			public ComponentLookup<Destroyed> __Game_Common_Destroyed_RO_ComponentLookup;

			[ReadOnly]
			public ComponentLookup<ConsumptionData> __Game_Prefabs_ConsumptionData_RO_ComponentLookup;

			[ReadOnly]
			public ComponentLookup<BuildingPropertyData> __Game_Prefabs_BuildingPropertyData_RO_ComponentLookup;

			[ReadOnly]
			public ComponentLookup<Household> __Game_Citizens_Household_RO_ComponentLookup;

			[ReadOnly]
			public ComponentLookup<Placeholder> __Game_Objects_Placeholder_RO_ComponentLookup;

			[ReadOnly]
			public ComponentLookup<Attached> __Game_Objects_Attached_RO_ComponentLookup;

			[ReadOnly]
			public BufferLookup<SubArea> __Game_Areas_SubArea_RO_BufferLookup;

			[ReadOnly]
			public ComponentLookup<Lot> __Game_Areas_Lot_RO_ComponentLookup;

			[ReadOnly]
			public ComponentLookup<Geometry> __Game_Areas_Geometry_RO_ComponentLookup;

			[ReadOnly]
			public ComponentTypeHandle<Node> __Game_Net_Node_RO_ComponentTypeHandle;

			[ReadOnly]
			public BufferTypeHandle<ConnectedEdge> __Game_Net_ConnectedEdge_RO_BufferTypeHandle;

			[ReadOnly]
			public ComponentLookup<Curve> __Game_Net_Curve_RO_ComponentLookup;

			[ReadOnly]
			public ComponentLookup<CurrentDistrict> __Game_Areas_CurrentDistrict_RO_ComponentLookup;

			[ReadOnly]
			public ComponentLookup<BorderDistrict> __Game_Areas_BorderDistrict_RO_ComponentLookup;

			[ReadOnly]
			public BufferLookup<DistrictModifier> __Game_Areas_DistrictModifierData_RO_BufferLookup;

			public ComponentLookup<Building> __Game_Buildings_Building_RW_ComponentLookup;

			[ReadOnly]
			public ComponentLookup<CompanyNotifications> __Game_Companies_CompanyNotifications_RO_ComponentLookup;

			[MethodImpl(MethodImplOptions.AggressiveInlining)]
			public void __AssignHandles(ref SystemState state)
			{
				//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)
				//IL_000f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0014: Unknown result type (might be due to invalid IL or missing references)
				//IL_001c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0021: Unknown result type (might be due to invalid IL or missing references)
				//IL_0029: Unknown result type (might be due to invalid IL or missing references)
				//IL_002e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0036: Unknown result type (might be due to invalid IL or missing references)
				//IL_003b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0043: Unknown result type (might be due to invalid IL or missing references)
				//IL_0048: Unknown result type (might be due to invalid IL or missing references)
				//IL_0050: 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_005d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0062: Unknown result type (might be due to invalid IL or missing references)
				//IL_006a: Unknown result type (might be due to invalid IL or missing references)
				//IL_006f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0077: Unknown result type (might be due to invalid IL or missing references)
				//IL_007c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0084: Unknown result type (might be due to invalid IL or missing references)
				//IL_0089: Unknown result type (might be due to invalid IL or missing references)
				//IL_0091: Unknown result type (might be due to invalid IL or missing references)
				//IL_0096: Unknown result type (might be due to invalid IL or missing references)
				//IL_009e: 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_00ab: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
				//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
				//IL_00df: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f1: 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_00fe: Unknown result type (might be due to invalid IL or missing references)
				//IL_0106: Unknown result type (might be due to invalid IL or missing references)
				//IL_010b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0113: Unknown result type (might be due to invalid IL or missing references)
				//IL_0118: Unknown result type (might be due to invalid IL or missing references)
				//IL_0120: Unknown result type (might be due to invalid IL or missing references)
				//IL_0125: 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_0132: 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_0147: Unknown result type (might be due to invalid IL or missing references)
				//IL_014c: 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)
				__Unity_Entities_Entity_TypeHandle = ((SystemState)(ref state)).GetEntityTypeHandle();
				__Game_Net_Edge_RO_ComponentTypeHandle = ((SystemState)(ref state)).GetComponentTypeHandle<Edge>(true);
				__Game_Net_Curve_RO_ComponentTypeHandle = ((SystemState)(ref state)).GetComponentTypeHandle<Curve>(true);
				__Game_Buildings_ConnectedBuilding_RO_BufferTypeHandle = ((SystemState)(ref state)).GetBufferTypeHandle<ConnectedBuilding>(true);
				__Game_Prefabs_BuildingData_RO_ComponentLookup = ((SystemState)(ref state)).GetComponentLookup<BuildingData>(true);
				__Game_Net_LandValue_RW_ComponentLookup = ((SystemState)(ref state)).GetComponentLookup<LandValue>(false);
				__Game_Prefabs_PrefabRef_RO_ComponentLookup = ((SystemState)(ref state)).GetComponentLookup<PrefabRef>(true);
				__Game_Buildings_PropertyRenter_RO_ComponentLookup = ((SystemState)(ref state)).GetComponentLookup<PropertyRenter>(true);
				__Game_Buildings_Renter_RO_BufferLookup = ((SystemState)(ref state)).GetBufferLookup<Renter>(true);
				__Game_Buildings_Abandoned_RO_ComponentLookup = ((SystemState)(ref state)).GetComponentLookup<Abandoned>(true);
				__Game_Common_Destroyed_RO_ComponentLookup = ((SystemState)(ref state)).GetComponentLookup<Destroyed>(true);
				__Game_Prefabs_ConsumptionData_RO_ComponentLookup = ((SystemState)(ref state)).GetComponentLookup<ConsumptionData>(true);
				__Game_Prefabs_BuildingPropertyData_RO_ComponentLookup = ((SystemState)(ref state)).GetComponentLookup<BuildingPropertyData>(true);
				__Game_Citizens_Household_RO_ComponentLookup = ((SystemState)(ref state)).GetComponentLookup<Household>(true);
				__Game_Objects_Placeholder_RO_ComponentLookup = ((SystemState)(ref state)).GetComponentLookup<Placeholder>(true);
				__Game_Objects_Attached_RO_ComponentLookup = ((SystemState)(ref state)).GetComponentLookup<Attached>(true);
				__Game_Areas_SubArea_RO_BufferLookup = ((SystemState)(ref state)).GetBufferLookup<SubArea>(true);
				__Game_Areas_Lot_RO_ComponentLookup = ((SystemState)(ref state)).GetComponentLookup<Lot>(true);
				__Game_Areas_Geometry_RO_ComponentLookup = ((SystemState)(ref state)).GetComponentLookup<Geometry>(true);
				__Game_Net_Node_RO_ComponentTypeHandle = ((SystemState)(ref state)).GetComponentTypeHandle<Node>(true);
				__Game_Net_ConnectedEdge_RO_BufferTypeHandle = ((SystemState)(ref state)).GetBufferTypeHandle<ConnectedEdge>(true);
				__Game_Net_Curve_RO_ComponentLookup = ((SystemState)(ref state)).GetComponentLookup<Curve>(true);
				__Game_Areas_CurrentDistrict_RO_ComponentLookup = ((SystemState)(ref state)).GetComponentLookup<CurrentDistrict>(true);
				__Game_Areas_BorderDistrict_RO_ComponentLookup = ((SystemState)(ref state)).GetComponentLookup<BorderDistrict>(true);
				__Game_Areas_DistrictModifierData_RO_BufferLookup = ((SystemState)(ref state)).GetBufferLookup<DistrictModifier>(true);
				__Game_Buildings_Building_RW_ComponentLookup = ((SystemState)(ref state)).GetComponentLookup<Building>(false);
				__Game_Companies_CompanyNotifications_RO_ComponentLookup = ((SystemState)(ref state)).GetComponentLookup<CompanyNotifications>(true);
			}
		}

		private EntityQuery m_EdgeGroup;

		private EntityQuery m_NodeGroup;

		private TypeHandle __TypeHandle;

		private EndFrameBarrier m_EndFrameBarrier;

		public override int GetUpdateInterval(SystemUpdatePhase phase)
		{
			return 16;
		}

		[Preserve]
		protected override void OnCreate()
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Expected O, but got Unknown
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: 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_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_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: 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_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Expected O, but got Unknown
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: 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_00b8: 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_00c4: 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_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: 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_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0132: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			((GameSystemBase)this).OnCreate();
			EntityQueryDesc[] array = new EntityQueryDesc[1];
			EntityQueryDesc val = new EntityQueryDesc();
			val.All = (ComponentType[])(object)new ComponentType[4]
			{
				ComponentType.ReadOnly<Edge>(),
				ComponentType.ReadWrite<LandValue>(),
				ComponentType.ReadOnly<Curve>(),
				ComponentType.ReadOnly<ConnectedBuilding>()
			};
			val.Any = (ComponentType[])(object)new ComponentType[0];
			val.None = (ComponentType[])(object)new ComponentType[2]
			{
				ComponentType.ReadOnly<Deleted>(),
				ComponentType.ReadOnly<Temp>()
			};
			array[0] = val;
			m_EdgeGroup = ((ComponentSystemBase)this).GetEntityQuery((EntityQueryDesc[])(object)array);
			EntityQueryDesc[] array2 = new EntityQueryDesc[1];
			val = new EntityQueryDesc();
			val.All = (ComponentType[])(object)new ComponentType[3]
			{
				ComponentType.ReadOnly<Node>(),
				ComponentType.ReadWrite<LandValue>(),
				ComponentType.ReadOnly<ConnectedEdge>()
			};
			val.Any = (ComponentType[])(object)new ComponentType[0];
			val.None = (ComponentType[])(object)new ComponentType[2]
			{
				ComponentType.ReadOnly<Deleted>(),
				ComponentType.ReadOnly<Temp>()
			};
			array2[0] = val;
			m_NodeGroup = ((ComponentSystemBase)this).GetEntityQuery((EntityQueryDesc[])(object)array2);
			m_EndFrameBarrier = ((ComponentSystemBase)this).World.GetOrCreateSystemManaged<EndFrameBarrier>();
			((ComponentSystemBase)this).RequireAnyForUpdate((EntityQuery[])(object)new EntityQuery[2] { m_EdgeGroup, m_NodeGroup });
		}

		[Preserve]
		protected override void OnUpdate()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0237: Unknown result type (might be due to invalid IL or missing references)
			//IL_023c: 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_025b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0260: Unknown result type (might be due to invalid IL or missing references)
			//IL_026d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0272: 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_0284: 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_02a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02de: Unknown result type (might be due to invalid IL or missing references)
			//IL_02eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0302: Unknown result type (might be due to invalid IL or missing references)
			//IL_030f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0314: Unknown result type (might be due to invalid IL or missing references)
			//IL_0321: Unknown result type (might be due to invalid IL or missing references)
			//IL_0326: Unknown result type (might be due to invalid IL or missing references)
			//IL_0333: Unknown result type (might be due to invalid IL or missing references)
			//IL_0338: 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_034a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0357: Unknown result type (might be due to invalid IL or missing references)
			//IL_035c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0369: 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_037b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0380: Unknown result type (might be due to invalid IL or missing references)
			//IL_038d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0392: 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_03b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fb: 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_0406: Unknown result type (might be due to invalid IL or missing references)
			//IL_040b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0578: Unknown result type (might be due to invalid IL or missing references)
			//IL_057f: Unknown result type (might be due to invalid IL or missing references)
			//IL_04dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0500: Unknown result type (might be due to invalid IL or missing references)
			//IL_0505: Unknown result type (might be due to invalid IL or missing references)
			//IL_0512: Unknown result type (might be due to invalid IL or missing references)
			//IL_0517: Unknown result type (might be due to invalid IL or missing references)
			//IL_0524: Unknown result type (might be due to invalid IL or missing references)
			//IL_0529: 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_053b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0548: Unknown result type (might be due to invalid IL or missing references)
			//IL_054d: Unknown result type (might be due to invalid IL or missing references)
			//IL_055a: Unknown result type (might be due to invalid IL or missing references)
			//IL_055f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0566: 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_056c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0571: Unknown result type (might be due to invalid IL or missing references)
			JobHandle val = ((SystemBase)this).Dependency;
			if (!((EntityQuery)(ref m_EdgeGroup)).IsEmptyIgnoreFilter)
			{
				__TypeHandle.__Game_Areas_Geometry_RO_ComponentLookup.Update(ref ((SystemBase)this).CheckedStateRef);
				__TypeHandle.__Game_Areas_Lot_RO_ComponentLookup.Update(ref ((SystemBase)this).CheckedStateRef);
				__TypeHandle.__Game_Areas_SubArea_RO_BufferLookup.Update(ref ((SystemBase)this).CheckedStateRef);
				__TypeHandle.__Game_Objects_Attached_RO_ComponentLookup.Update(ref ((SystemBase)this).CheckedStateRef);
				__TypeHandle.__Game_Objects_Placeholder_RO_ComponentLookup.Update(ref ((SystemBase)this).CheckedStateRef);
				__TypeHandle.__Game_Citizens_Household_RO_ComponentLookup.Update(ref ((SystemBase)this).CheckedStateRef);
				__TypeHandle.__Game_Prefabs_BuildingPropertyData_RO_ComponentLookup.Update(ref ((SystemBase)this).CheckedStateRef);
				__TypeHandle.__Game_Prefabs_ConsumptionData_RO_ComponentLookup.Update(ref ((SystemBase)this).CheckedStateRef);
				__TypeHandle.__Game_Common_Destroyed_RO_ComponentLookup.Update(ref ((SystemBase)this).CheckedStateRef);
				__TypeHandle.__Game_Buildings_Abandoned_RO_ComponentLookup.Update(ref ((SystemBase)this).CheckedStateRef);
				__TypeHandle.__Game_Buildings_Renter_RO_BufferLookup.Update(ref ((SystemBase)this).CheckedStateRef);
				__TypeHandle.__Game_Buildings_PropertyRenter_RO_ComponentLookup.Update(ref ((SystemBase)this).CheckedStateRef);
				__TypeHandle.__Game_Prefabs_PrefabRef_RO_ComponentLookup.Update(ref ((SystemBase)this).CheckedStateRef);
				__TypeHandle.__Game_Net_LandValue_RW_ComponentLookup.Update(ref ((SystemBase)this).CheckedStateRef);
				__TypeHandle.__Game_Prefabs_BuildingData_RO_ComponentLookup.Update(ref ((SystemBase)this).CheckedStateRef);
				__TypeHandle.__Game_Buildings_ConnectedBuilding_RO_BufferTypeHandle.Update(ref ((SystemBase)this).CheckedStateRef);
				__TypeHandle.__Game_Net_Curve_RO_ComponentTypeHandle.Update(ref ((SystemBase)this).CheckedStateRef);
				__TypeHandle.__Game_Net_Edge_RO_ComponentTypeHandle.Update(ref ((SystemBase)this).CheckedStateRef);
				((EntityTypeHandle)(ref __TypeHandle.__Unity_Entities_Entity_TypeHandle)).Update(ref ((SystemBase)this).CheckedStateRef);
				__TypeHandle.__Game_Areas_BorderDistrict_RO_ComponentLookup.Update(ref ((SystemBase)this).CheckedStateRef);
				__TypeHandle.__Game_Areas_CurrentDistrict_RO_ComponentLookup.Update(ref ((SystemBase)this).CheckedStateRef);
				__TypeHandle.__Game_Areas_DistrictModifierData_RO_BufferLookup.Update(ref ((SystemBase)this).CheckedStateRef);
				__TypeHandle.__Game_Buildings_Building_RW_ComponentLookup.Update(ref ((SystemBase)this).CheckedStateRef);
				__TypeHandle.__Game_Companies_CompanyNotifications_RO_ComponentLookup.Update(ref ((SystemBase)this).CheckedStateRef);
				EdgeUpdateJob edgeUpdateJob = default(EdgeUpdateJob);
				edgeUpdateJob.m_EntityType = __TypeHandle.__Unity_Entities_Entity_TypeHandle;
				edgeUpdateJob.m_EdgeType = __TypeHandle.__Game_Net_Edge_RO_ComponentTypeHandle;
				edgeUpdateJob.m_CurveType = __TypeHandle.__Game_Net_Curve_RO_ComponentTypeHandle;
				edgeUpdateJob.m_ConnectedBuildingType = __TypeHandle.__Game_Buildings_ConnectedBuilding_RO_BufferTypeHandle;
				edgeUpdateJob.m_BuildingDatas = __TypeHandle.__Game_Prefabs_BuildingData_RO_ComponentLookup;
				edgeUpdateJob.m_LandValues = __TypeHandle.__Game_Net_LandValue_RW_ComponentLookup;
				edgeUpdateJob.m_Prefabs = __TypeHandle.__Game_Prefabs_PrefabRef_RO_ComponentLookup;
				edgeUpdateJob.m_PropertyRenters = __TypeHandle.__Game_Buildings_PropertyRenter_RO_ComponentLookup;
				edgeUpdateJob.m_RenterBuffers = __TypeHandle.__Game_Buildings_Renter_RO_BufferLookup;
				edgeUpdateJob.m_Abandoneds = __TypeHandle.__Game_Buildings_Abandoned_RO_ComponentLookup;
				edgeUpdateJob.m_Destroyeds = __TypeHandle.__Game_Common_Destroyed_RO_ComponentLookup;
				edgeUpdateJob.m_ConsumptionDatas = __TypeHandle.__Game_Prefabs_ConsumptionData_RO_ComponentLookup;
				edgeUpdateJob.m_PropertyDatas = __TypeHandle.__Game_Prefabs_BuildingPropertyData_RO_ComponentLookup;
				edgeUpdateJob.m_Households = __TypeHandle.__Game_Citizens_Household_RO_ComponentLookup;
				edgeUpdateJob.m_Placeholders = __TypeHandle.__Game_Objects_Placeholder_RO_ComponentLookup;
				edgeUpdateJob.m_Attached = __TypeHandle.__Game_Objects_Attached_RO_ComponentLookup;
				edgeUpdateJob.m_SubAreas = __TypeHandle.__Game_Areas_SubArea_RO_BufferLookup;
				edgeUpdateJob.m_Lots = __TypeHandle.__Game_Areas_Lot_RO_ComponentLookup;
				edgeUpdateJob.m_Geometries = __TypeHandle.__Game_Areas_Geometry_RO_ComponentLookup;
				edgeUpdateJob.m_CurrentDistrictData = __TypeHandle.__Game_Areas_CurrentDistrict_RO_ComponentLookup;
				edgeUpdateJob.m_BorderDistrictData = __TypeHandle.__Game_Areas_BorderDistrict_RO_ComponentLookup;
				edgeUpdateJob.m_DistrictModifierData = __TypeHandle.__Game_Areas_DistrictModifierData_RO_BufferLookup;
				EntityCommandBuffer val2 = ((SafeCommandBufferSystem)m_EndFrameBarrier).CreateCommandBuffer();
				edgeUpdateJob.m_CommandBuffer = ((EntityCommandBuffer)(ref val2)).AsParallelWriter();
				edgeUpdateJob.m_Buildings = __TypeHandle.__Game_Buildings_Building_RW_ComponentLookup;
				edgeUpdateJob.m_CompanyNotifications = __TypeHandle.__Game_Companies_CompanyNotifications_RO_ComponentLookup;
				val = JobChunkExtensions.ScheduleParallel<EdgeUpdateJob>(edgeUpdateJob, m_EdgeGroup, ((SystemBase)this).Dependency);
			}
			if (!((EntityQuery)(ref m_NodeGroup)).IsEmptyIgnoreFilter)
			{
				__TypeHandle.__Game_Net_LandValue_RW_ComponentLookup.Update(ref ((SystemBase)this).CheckedStateRef);
				__TypeHandle.__Game_Net_Curve_RO_ComponentLookup.Update(ref ((SystemBase)this).CheckedStateRef);
				__TypeHandle.__Game_Net_ConnectedEdge_RO_BufferTypeHandle.Update(ref ((SystemBase)this).CheckedStateRef);
				__TypeHandle.__Game_Net_Node_RO_ComponentTypeHandle.Update(ref ((SystemBase)this).CheckedStateRef);
				((EntityTypeHandle)(ref __TypeHandle.__Unity_Entities_Entity_TypeHandle)).Update(ref ((SystemBase)this).CheckedStateRef);
				__TypeHandle.__Game_Areas_BorderDistrict_RO_ComponentLookup.Update(ref ((SystemBase)this).CheckedStateRef);
				__TypeHandle.__Game_Areas_CurrentDistrict_RO_ComponentLookup.Update(ref ((SystemBase)this).CheckedStateRef);
				__TypeHandle.__Game_Areas_DistrictModifierData_RO_BufferLookup.Update(ref ((SystemBase)this).CheckedStateRef);
				NodeUpdateJob nodeUpdateJob = default(NodeUpdateJob);
				nodeUpdateJob.m_EntityType = __TypeHandle.__Unity_Entities_Entity_TypeHandle;
				nodeUpdateJob.m_NodeType = __TypeHandle.__Game_Net_Node_RO_ComponentTypeHandle;
				nodeUpdateJob.m_ConnectedEdgeType = __TypeHandle.__Game_Net_ConnectedEdge_RO_BufferTypeHandle;
				nodeUpdateJob.m_Curves = __TypeHandle.__Game_Net_Curve_RO_ComponentLookup;
				nodeUpdateJob.m_LandValues = __TypeHandle.__Game_Net_LandValue_RW_ComponentLookup;
				nodeUpdateJob.m_CurrentDistrictData = __TypeHandle.__Game_Areas_CurrentDistrict_RO_ComponentLookup;
				nodeUpdateJob.m_BorderDistrictData = __TypeHandle.__Game_Areas_BorderDistrict_RO_ComponentLookup;
				nodeUpdateJob.m_DistrictModifierData = __TypeHandle.__Game_Areas_DistrictModifierData_RO_BufferLookup;
				val = JobChunkExtensions.ScheduleParallel<NodeUpdateJob>(nodeUpdateJob, m_NodeGroup, val);
			}
			m_EndFrameBarrier.AddJobHandleForProducer(val);
			((SystemBase)this).Dependency = val;
		}

		private static float GetDistanceFade(float distance)
		{
			return math.saturate(1f - distance / 2000f);
		}

		[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);
		}

		private static float GetLandValueFactor(DynamicBuffer<DistrictModifier> modifierData)
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			float num = 0f;
			if (modifierData.Length > 1 && modifierData[1].m_Delta.y != 0f)
			{
				num += 1f;
			}
			if (modifierData.Length > 2 && modifierData[2].m_Delta.x != 0f)
			{
				num -= 2f;
			}
			if (modifierData.Length > 8 && modifierData[8].m_Delta.y != 0f)
			{
				num += 1f;
			}
			if (modifierData.Length > 10 && modifierData[10].m_Delta.y != 0f)
			{
				num -= 2f;
			}
			if (modifierData.Length > 11 && modifierData[11].m_Delta.y != 0f)
			{
				num -= 2f;
			}
			return num;
		}

		[Preserve]
		public LandValueSystem()
		{
		}
	}
	[HarmonyPatch]
	internal class LandValueSystemPatches
	{
		[HarmonyPatch(typeof(LandValueSystem), "GetUpdateInterval")]
		[HarmonyPrefix]
		public static bool GetUpdateInterval(ref int __result)
		{
			__result = 256;
			return false;
		}

		[HarmonyPatch(typeof(LandValueSystem), "OnCreate")]
		[HarmonyPrefix]
		public static bool OnCreate(LandValueSystem __instance)
		{
			((ComponentSystemBase)__instance).World.GetOrCreateSystemManaged<LandValueSystem>();
			return false;
		}

		[HarmonyPatch(typeof(LandValueSystem), "OnUpdate")]
		[HarmonyPrefix]
		public static bool OnUpdate(LandValueSystem __instance)
		{
			((ComponentSystemBase)((ComponentSystemBase)__instance).World.GetOrCreateSystemManaged<LandValueSystem>()).Update();
			return false;
		}

		[HarmonyPatch(typeof(LandValueSystem), "OnCreateForCompiler")]
		[HarmonyPrefix]
		public static bool OnCreateForCompiler()
		{
			return true;
		}
	}
}