Decompiled source of Cities2Mods CityPlayerTrafficCustomMod v0.2.1
Cities2Mods.CityPlayerTrafficCustomMods 0.2.1.dll
Decompiled 11 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; 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 Colossal; using Colossal.Collections; using Colossal.Entities; using Colossal.IO.AssetDatabase; using Colossal.Mathematics; using Game; using Game.Agents; using Game.Areas; using Game.Buildings; using Game.Citizens; using Game.City; using Game.Common; using Game.Companies; using Game.Creatures; using Game.Debug; using Game.Economy; using Game.Modding; using Game.Net; using Game.Objects; using Game.Pathfind; using Game.Prefabs; using Game.SceneFlow; using Game.Settings; using Game.Simulation; using Game.Tools; using Game.Triggers; using Game.Vehicles; using Game.Zones; using HarmonyLib; using Unity.Burst; using Unity.Burst.Intrinsics; using Unity.Collections; using Unity.Collections.LowLevel.Unsafe; 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.2.1.0")] [assembly: AssemblyInformationalVersion("0.2.1")] [assembly: AssemblyProduct("Cities2Mods.CityPlayerTrafficCustomMods")] [assembly: AssemblyTitle("Cities2Mods.CityPlayerTrafficCustomMods")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.2.1.0")] [module: UnverifiableCode] namespace Cities2Mods.CityPlayerTrafficCustomMods; [CompilerGenerated] public class CityPlayerCustomHouseholdBehaviorSystem : GameSystemBase { private struct ProcessConsumptionJob : IJob { public NativeQueue<ResourceStack> m_Queue; public NativeArray<int> m_ConsumptionAccumulator; public NativeQueue<int> m_DebugResourceQueue; public NativeArray<int> m_DebugResourceCounter; public NativeArray<int> m_DebugResourceCounter2; [ReadOnly] public ResourcePrefabs m_ResourcePrefabs; [ReadOnly] public ComponentLookup<ResourceData> m_ResourceDatas; public void Execute() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000b: 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_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0047: 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_004d: 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_0067: 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_00b6: 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) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) int2 val = default(int2); ResourceStack val2 = default(ResourceStack); NativeArray<int> consumptionAccumulator; while (m_Queue.TryDequeue(ref val2)) { consumptionAccumulator = m_ConsumptionAccumulator; int resourceIndex = EconomyUtils.GetResourceIndex(val2.m_Resource); consumptionAccumulator[resourceIndex] += val2.m_Amount; float price = m_ResourceDatas[((ResourcePrefabs)(ref m_ResourcePrefabs))[val2.m_Resource]].m_Price; val.x += Mathf.RoundToInt((float)val2.m_Amount * price); } int num = default(int); while (m_DebugResourceQueue.TryDequeue(ref num)) { val.y += num; } consumptionAccumulator = m_DebugResourceCounter; consumptionAccumulator[0] = consumptionAccumulator[0] + val.x; consumptionAccumulator = m_DebugResourceCounter2; consumptionAccumulator[0] = consumptionAccumulator[0] + val.y; } } [BurstCompile] private struct HouseholdTickJob : IJobChunk { [ReadOnly] public EntityTypeHandle m_EntityType; public ComponentTypeHandle<Household> m_HouseholdType; public ComponentTypeHandle<HouseholdNeed> m_HouseholdNeedType; [ReadOnly] public BufferTypeHandle<HouseholdCitizen> m_HouseholdCitizenType; public BufferTypeHandle<Resources> m_ResourceType; [ReadOnly] public SharedComponentTypeHandle<UpdateFrame> m_UpdateFrameType; public ComponentTypeHandle<TouristHousehold> m_TouristHouseholdType; [ReadOnly] public ComponentTypeHandle<CommuterHousehold> m_CommuterHouseholdType; [ReadOnly] public ComponentTypeHandle<PropertyRenter> m_PropertyRenterType; [ReadOnly] public ComponentTypeHandle<LodgingSeeker> m_LodgingSeekerType; [ReadOnly] public ComponentTypeHandle<HomelessHousehold> m_HomelessHouseholdType; [ReadOnly] public BufferLookup<OwnedVehicle> m_OwnedVehicles; [ReadOnly] public ComponentLookup<PropertySeeker> m_PropertySeekers; [ReadOnly] public ComponentLookup<Worker> m_Workers; [ReadOnly] public ComponentLookup<ResourceData> m_ResourceDatas; [ReadOnly] public ComponentLookup<LodgingProvider> m_LodgingProviders; [ReadOnly] public ComponentLookup<HealthProblem> m_HealthProblems; [ReadOnly] public ComponentLookup<Population> m_Populations; [ReadOnly] public ComponentLookup<Citizen> m_CitizenDatas; [ReadOnly] public NativeArray<int> m_TaxRates; [ReadOnly] public ResourcePrefabs m_ResourcePrefabs; public RandomSeed m_RandomSeed; public EconomyParameterData m_EconomyParameters; public ParallelWriter<ResourceStack> m_ConsumptionQueue; public ParallelWriter m_CommandBuffer; public uint m_UpdateFrameIndex; public int m_BaseConsumptionSum; public Entity m_City; [NativeDisableContainerSafetyRestriction] public ParallelWriter<int> m_DebugWealthQueue; public bool m_DebugWealthQueueIsCreated; [NativeDisableContainerSafetyRestriction] public ParallelWriter<int> m_DebugResourcesQueue; public bool m_DebugResourcesQueueIsCreated; [NativeDisableContainerSafetyRestriction] public ParallelWriter<int> m_DebugConsumptionQueue; public bool m_DebugConsumptionQueueIsCreated; public ParallelWriter<int> m_DebugResourceQueue; public int m_HouseHoldTotal; private bool NeedsCar(Random random, int wealth, int cars) { if (cars > 0 || wealth < 0) { return false; } if (((Random)(ref random)).NextInt(5) < GetPreferBuyingCar(CityPlayerTrafficCustomMod.Settings)) { return true; } return false; } 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_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_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_003b: 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_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: 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_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0063: 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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007f: 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_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_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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: 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_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: 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_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_010f: 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_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0124: 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_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0145: 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_0160: 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_01ca: 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_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0233: 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_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_0268: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_0278: 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_0286: Unknown result type (might be due to invalid IL or missing references) //IL_0294: 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_029e: Unknown result type (might be due to invalid IL or missing references) //IL_0646: Unknown result type (might be due to invalid IL or missing references) //IL_034e: Unknown result type (might be due to invalid IL or missing references) //IL_033c: Unknown result type (might be due to invalid IL or missing references) //IL_033e: 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_035b: Unknown result type (might be due to invalid IL or missing references) //IL_035e: Unknown result type (might be due to invalid IL or missing references) //IL_0372: 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_0394: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_0383: Unknown result type (might be due to invalid IL or missing references) //IL_0388: 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_03be: Unknown result type (might be due to invalid IL or missing references) //IL_03c9: Unknown result type (might be due to invalid IL or missing references) //IL_05bc: Unknown result type (might be due to invalid IL or missing references) //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_05c9: Unknown result type (might be due to invalid IL or missing references) //IL_0413: Unknown result type (might be due to invalid IL or missing references) //IL_0418: Unknown result type (might be due to invalid IL or missing references) //IL_05dc: Unknown result type (might be due to invalid IL or missing references) //IL_05e3: Unknown result type (might be due to invalid IL or missing references) //IL_062e: Unknown result type (might be due to invalid IL or missing references) //IL_0635: Unknown result type (might be due to invalid IL or missing references) //IL_063b: Unknown result type (might be due to invalid IL or missing references) //IL_05ec: 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_042b: Unknown result type (might be due to invalid IL or missing references) //IL_0439: 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_0462: Unknown result type (might be due to invalid IL or missing references) //IL_0601: Unknown result type (might be due to invalid IL or missing references) //IL_0608: 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_046b: Unknown result type (might be due to invalid IL or missing references) //IL_046d: Unknown result type (might be due to invalid IL or missing references) //IL_0473: Unknown result type (might be due to invalid IL or missing references) //IL_0481: Unknown result type (might be due to invalid IL or missing references) //IL_04aa: Unknown result type (might be due to invalid IL or missing references) //IL_04ac: Unknown result type (might be due to invalid IL or missing references) //IL_04b1: Unknown result type (might be due to invalid IL or missing references) //IL_04c2: Unknown result type (might be due to invalid IL or missing references) //IL_04c4: Unknown result type (might be due to invalid IL or missing references) //IL_04c9: 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_04fb: 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_0515: Unknown result type (might be due to invalid IL or missing references) //IL_051d: Unknown result type (might be due to invalid IL or missing references) //IL_051f: 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_052b: Unknown result type (might be due to invalid IL or missing references) //IL_0547: Unknown result type (might be due to invalid IL or missing references) if (((ArchetypeChunk)(ref chunk)).GetSharedComponent<UpdateFrame>(m_UpdateFrameType).m_Index != m_UpdateFrameIndex) { return; } NativeArray<Entity> nativeArray = ((ArchetypeChunk)(ref chunk)).GetNativeArray(m_EntityType); NativeArray<Household> nativeArray2 = ((ArchetypeChunk)(ref chunk)).GetNativeArray<Household>(ref m_HouseholdType); NativeArray<HouseholdNeed> nativeArray3 = ((ArchetypeChunk)(ref chunk)).GetNativeArray<HouseholdNeed>(ref m_HouseholdNeedType); BufferAccessor<HouseholdCitizen> bufferAccessor = ((ArchetypeChunk)(ref chunk)).GetBufferAccessor<HouseholdCitizen>(ref m_HouseholdCitizenType); BufferAccessor<Resources> bufferAccessor2 = ((ArchetypeChunk)(ref chunk)).GetBufferAccessor<Resources>(ref m_ResourceType); NativeArray<TouristHousehold> nativeArray4 = ((ArchetypeChunk)(ref chunk)).GetNativeArray<TouristHousehold>(ref m_TouristHouseholdType); NativeArray<PropertyRenter> nativeArray5 = ((ArchetypeChunk)(ref chunk)).GetNativeArray<PropertyRenter>(ref m_PropertyRenterType); Random random = ((RandomSeed)(ref m_RandomSeed)).GetRandom(unfilteredChunkIndex); int population = m_Populations[m_City].m_Population; for (int i = 0; i < ((ArchetypeChunk)(ref chunk)).Count; i++) { Entity val = nativeArray[i]; Household val2 = nativeArray2[i]; DynamicBuffer<HouseholdCitizen> val3 = bufferAccessor[i]; if (val3.Length == 0) { ((ParallelWriter)(ref m_CommandBuffer)).AddComponent<Deleted>(unfilteredChunkIndex, val, default(Deleted)); continue; } DynamicBuffer<Resources> val4 = bufferAccessor2[i]; HouseholdNeed val5 = nativeArray3[i]; PropertyRenter val6 = (PropertyRenter)((nativeArray5.Length > 0) ? nativeArray5[i] : default(PropertyRenter)); int householdWealth = EconomyUtils.GetHouseholdWealth(val, val2, val4, bufferAccessor[i], ref m_Workers, ref m_CitizenDatas, ref m_HealthProblems, val6, ref m_EconomyParameters, m_ResourcePrefabs, ref m_ResourceDatas, m_BaseConsumptionSum, m_TaxRates); if (m_DebugWealthQueueIsCreated) { m_DebugWealthQueue.Enqueue(math.clamp(householdWealth, -20000, 20000)); } if (m_DebugResourcesQueueIsCreated) { m_DebugResourcesQueue.Enqueue(math.clamp(val2.m_Resources, -20000, 20000)); } float num = HouseholdBehaviorSystem.GetConsumptionMultiplier(Mathf.RoundToInt((float)householdWealth / math.max(1f, (float)bufferAccessor[i].Length))) * m_EconomyParameters.m_ResourceConsumption * (float)val3.Length; if (((ArchetypeChunk)(ref chunk)).Has<TouristHousehold>(ref m_TouristHouseholdType)) { num *= m_EconomyParameters.m_TouristConsumptionMultiplier; if (!((ArchetypeChunk)(ref chunk)).Has<LodgingSeeker>(ref m_LodgingSeekerType)) { TouristHousehold val7 = nativeArray4[i]; if (((Entity)(ref val7.m_Hotel)).Equals(Entity.Null)) { ((ParallelWriter)(ref m_CommandBuffer)).AddComponent<LodgingSeeker>(unfilteredChunkIndex, val, default(LodgingSeeker)); } else if (!m_LodgingProviders.HasComponent(val7.m_Hotel)) { val7.m_Hotel = Entity.Null; nativeArray4[i] = val7; ((ParallelWriter)(ref m_CommandBuffer)).AddComponent<LodgingSeeker>(unfilteredChunkIndex, val, default(LodgingSeeker)); } } } val2.m_LastConsumption = (short)Mathf.RoundToInt(256f * num); if (m_DebugConsumptionQueueIsCreated) { m_DebugConsumptionQueue.Enqueue(val2.m_LastConsumption / val3.Length); } int num2 = Mathf.FloorToInt(num); num -= (float)num2; m_DebugResourceQueue.Enqueue(num2); if (((Random)(ref random)).NextFloat() < num) { num2++; } val2.m_Resources -= num2; if ((int)val5.m_Resource == 0) { int num3 = 0; if (m_OwnedVehicles.HasBuffer(val)) { num3 = m_OwnedVehicles[val].Length; } if (val2.m_Resources < 0) { HouseholdBehaviorSystem.GetLastCommutePerCitizen(val3, m_Workers); int cars = 0; if (m_OwnedVehicles.HasBuffer(val)) { cars = m_OwnedVehicles[val].Length; } if (NeedsCar(random, householdWealth, cars)) { val5.m_Resource = (Resource)1024; val5.m_Amount = HouseholdBehaviorSystem.kCarAmount; nativeArray3[i] = val5; nativeArray2[i] = val2; break; } int num4 = math.min(80, Mathf.RoundToInt(200f / math.max(1f, math.sqrt(m_EconomyParameters.m_TrafficReduction * (float)population)))); if (((Random)(ref random)).NextInt(80) < num4) { ResourceIterator iterator = ResourceIterator.GetIterator(); int num5 = 0; while (((ResourceIterator)(ref iterator)).Next()) { num5 += HouseholdBehaviorSystem.GetWeight(householdWealth, iterator.resource, m_ResourcePrefabs, ref m_ResourceDatas, num3, false, val3, ref m_CitizenDatas); } int num6 = ((Random)(ref random)).NextInt(num5); iterator = ResourceIterator.GetIterator(); while (((ResourceIterator)(ref iterator)).Next()) { int weight = HouseholdBehaviorSystem.GetWeight(householdWealth, iterator.resource, m_ResourcePrefabs, ref m_ResourceDatas, num3, false, val3, ref m_CitizenDatas); num5 -= weight; if (weight > 0 && num5 <= num6) { val5.m_Resource = iterator.resource; float price = m_ResourceDatas[((ResourcePrefabs)(ref m_ResourcePrefabs))[iterator.resource]].m_Price; val5.m_Amount = Mathf.CeilToInt((float)(2000 * val3.Length) / price); nativeArray3[i] = val5; nativeArray2[i] = val2; m_ConsumptionQueue.Enqueue(new ResourceStack { m_Resource = val5.m_Resource, m_Amount = Mathf.RoundToInt((float)val5.m_Amount / (0.01f * (float)num4)) }); return; } } } } } if (m_HouseHoldTotal < 64 && !((ArchetypeChunk)(ref chunk)).Has<TouristHousehold>(ref m_TouristHouseholdType) && !((ArchetypeChunk)(ref chunk)).Has<CommuterHousehold>(ref m_CommuterHouseholdType) && !m_PropertySeekers.HasComponent(nativeArray[i])) { if (!((ArchetypeChunk)(ref chunk)).Has<PropertyRenter>(ref m_PropertyRenterType)) { ((ParallelWriter)(ref m_CommandBuffer)).AddComponent<PropertySeeker>(unfilteredChunkIndex, nativeArray[i], default(PropertySeeker)); } else if (m_HouseHoldTotal < 32 && val6.m_Rent >= val6.m_MaxRent && val6.m_MaxRent > 0) { ((ParallelWriter)(ref m_CommandBuffer)).AddComponent<PropertySeeker>(unfilteredChunkIndex, nativeArray[i], default(PropertySeeker)); } if (((ArchetypeChunk)(ref chunk)).Has<HomelessHousehold>(ref m_HomelessHouseholdType)) { ((ParallelWriter)(ref m_CommandBuffer)).AddComponent<PropertySeeker>(unfilteredChunkIndex, nativeArray[i], default(PropertySeeker)); } } nativeArray2[i] = val2; } } private int GetPreferBuyingCar(CustomSettings customSettings) { if (customSettings.PreferBuyingCar == CustomSettings.PreferTraffic.VeryLow) { return 1; } if (customSettings.PreferBuyingCar == CustomSettings.PreferTraffic.Low) { return 2; } if (customSettings.PreferBuyingCar == CustomSettings.PreferTraffic.Medium) { return 3; } if (customSettings.PreferBuyingCar == CustomSettings.PreferTraffic.High) { return 4; } if (customSettings.PreferBuyingCar == CustomSettings.PreferTraffic.VeryHigh) { return 5; } return 0; } 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; public ComponentTypeHandle<Household> __Game_Citizens_Household_RW_ComponentTypeHandle; public ComponentTypeHandle<HouseholdNeed> __Game_Citizens_HouseholdNeed_RW_ComponentTypeHandle; public BufferTypeHandle<Resources> __Game_Economy_Resources_RW_BufferTypeHandle; [ReadOnly] public BufferTypeHandle<HouseholdCitizen> __Game_Citizens_HouseholdCitizen_RO_BufferTypeHandle; public ComponentTypeHandle<TouristHousehold> __Game_Citizens_TouristHousehold_RW_ComponentTypeHandle; [ReadOnly] public ComponentTypeHandle<CommuterHousehold> __Game_Citizens_CommuterHousehold_RO_ComponentTypeHandle; public SharedComponentTypeHandle<UpdateFrame> __Game_Simulation_UpdateFrame_SharedComponentTypeHandle; [ReadOnly] public ComponentTypeHandle<LodgingSeeker> __Game_Citizens_LodgingSeeker_RO_ComponentTypeHandle; [ReadOnly] public ComponentTypeHandle<PropertyRenter> __Game_Buildings_PropertyRenter_RO_ComponentTypeHandle; [ReadOnly] public ComponentTypeHandle<HomelessHousehold> __Game_Citizens_HomelessHousehold_RO_ComponentTypeHandle; [ReadOnly] public ComponentLookup<Worker> __Game_Citizens_Worker_RO_ComponentLookup; [ReadOnly] public BufferLookup<OwnedVehicle> __Game_Vehicles_OwnedVehicle_RO_BufferLookup; [ReadOnly] public ComponentLookup<PropertySeeker> __Game_Agents_PropertySeeker_RO_ComponentLookup; [ReadOnly] public ComponentLookup<ResourceData> __Game_Prefabs_ResourceData_RO_ComponentLookup; [ReadOnly] public ComponentLookup<LodgingProvider> __Game_Companies_LodgingProvider_RO_ComponentLookup; [ReadOnly] public ComponentLookup<Citizen> __Game_Citizens_Citizen_RO_ComponentLookup; [ReadOnly] public ComponentLookup<HealthProblem> __Game_Citizens_HealthProblem_RO_ComponentLookup; [ReadOnly] public ComponentLookup<Population> __Game_City_Population_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_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: 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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: 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_00a2: 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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: 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_00c9: 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_00d6: 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_00eb: 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) __Unity_Entities_Entity_TypeHandle = ((SystemState)(ref state)).GetEntityTypeHandle(); __Game_Citizens_Household_RW_ComponentTypeHandle = ((SystemState)(ref state)).GetComponentTypeHandle<Household>(false); __Game_Citizens_HouseholdNeed_RW_ComponentTypeHandle = ((SystemState)(ref state)).GetComponentTypeHandle<HouseholdNeed>(false); __Game_Economy_Resources_RW_BufferTypeHandle = ((SystemState)(ref state)).GetBufferTypeHandle<Resources>(false); __Game_Citizens_HouseholdCitizen_RO_BufferTypeHandle = ((SystemState)(ref state)).GetBufferTypeHandle<HouseholdCitizen>(true); __Game_Citizens_TouristHousehold_RW_ComponentTypeHandle = ((SystemState)(ref state)).GetComponentTypeHandle<TouristHousehold>(false); __Game_Citizens_CommuterHousehold_RO_ComponentTypeHandle = ((SystemState)(ref state)).GetComponentTypeHandle<CommuterHousehold>(true); __Game_Simulation_UpdateFrame_SharedComponentTypeHandle = ((SystemState)(ref state)).GetSharedComponentTypeHandle<UpdateFrame>(); __Game_Citizens_LodgingSeeker_RO_ComponentTypeHandle = ((SystemState)(ref state)).GetComponentTypeHandle<LodgingSeeker>(true); __Game_Buildings_PropertyRenter_RO_ComponentTypeHandle = ((SystemState)(ref state)).GetComponentTypeHandle<PropertyRenter>(true); __Game_Citizens_HomelessHousehold_RO_ComponentTypeHandle = ((SystemState)(ref state)).GetComponentTypeHandle<HomelessHousehold>(true); __Game_Citizens_Worker_RO_ComponentLookup = ((SystemState)(ref state)).GetComponentLookup<Worker>(true); __Game_Vehicles_OwnedVehicle_RO_BufferLookup = ((SystemState)(ref state)).GetBufferLookup<OwnedVehicle>(true); __Game_Agents_PropertySeeker_RO_ComponentLookup = ((SystemState)(ref state)).GetComponentLookup<PropertySeeker>(true); __Game_Prefabs_ResourceData_RO_ComponentLookup = ((SystemState)(ref state)).GetComponentLookup<ResourceData>(true); __Game_Companies_LodgingProvider_RO_ComponentLookup = ((SystemState)(ref state)).GetComponentLookup<LodgingProvider>(true); __Game_Citizens_Citizen_RO_ComponentLookup = ((SystemState)(ref state)).GetComponentLookup<Citizen>(true); __Game_Citizens_HealthProblem_RO_ComponentLookup = ((SystemState)(ref state)).GetComponentLookup<HealthProblem>(true); __Game_City_Population_RO_ComponentLookup = ((SystemState)(ref state)).GetComponentLookup<Population>(true); } } public static readonly int kCarAmount = 50; private EntityQuery m_HouseholdGroup; private EntityQuery m_EconomyParameterGroup; private SimulationSystem m_SimulationSystem; private EndFrameBarrier m_EndFrameBarrier; private ResourceSystem m_ResourceSystem; private TaxSystem m_TaxSystem; private CountConsumptionSystem m_CountConsumptionSystem; private CitySystem m_CitySystem; private NativeQueue<ResourceStack> m_ConsumptionQueue; [DebugWatchDeps] private JobHandle m_ConsumptionQueueDeps; [DebugWatchValue] private DebugWatchDistribution m_DebugWealth; [DebugWatchValue] private DebugWatchDistribution m_DebugConsumption; [DebugWatchValue] private DebugWatchDistribution m_DebugResources; [DebugWatchValue] private NativeArray<int> m_DebugResourceCounter; [DebugWatchValue] private NativeArray<int> m_DebugResourceCounter2; private NativeQueue<int> m_DebugResourceQueue; private TypeHandle __TypeHandle; private CityPlayerCustomHouseholdFindPropertySystem m_HouseholdFindPropertySystem; public override int GetUpdateInterval(SystemUpdatePhase phase) { return 64; } public static float GetLastCommutePerCitizen(DynamicBuffer<HouseholdCitizen> householdCitizens, ComponentLookup<Worker> workers) { //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_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0020: 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_002c: Unknown result type (might be due to invalid IL or missing references) float num = 0f; float num2 = 0f; for (int i = 0; i < householdCitizens.Length; i++) { Entity citizen = householdCitizens[i].m_Citizen; if (workers.HasComponent(citizen)) { num2 += workers[citizen].m_LastCommuteTime; } num += 1f; } return num2 / num; } public static float GetConsumptionMultiplier(int wealth) { return 0.3f + 2.2f * math.smoothstep(0f, 1f, (float)(wealth + 1000) / 6000f); } public static int GetHouseholdExpectedIncome(DynamicBuffer<HouseholdCitizen> citizens, ref ComponentLookup<Student> students, ref ComponentLookup<HealthProblem> healthProblems, ref ComponentLookup<Citizen> citizenDatas, ref EconomyParameterData economyParameters, NativeArray<int> taxRates, NativeArray<int> unemployment) { //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_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0028: 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_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_0038: 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_004f: Invalid comparison between Unknown and I4 //IL_0068: 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) float num = 0f; for (int i = 0; i < citizens.Length; i++) { Entity citizen = citizens[i].m_Citizen; if (CitizenUtils.IsDead(citizen, ref healthProblems)) { continue; } Citizen val = citizenDatas[citizen]; CitizenAge age = ((Citizen)(ref val)).GetAge(); if ((int)age == 0) { num += (float)economyParameters.m_FamilyAllowance; continue; } if ((int)age == 3) { num += (float)economyParameters.m_Pension; continue; } int num2 = ((Citizen)(ref val)).GetEducationLevel(); if (students.HasComponent(citizen)) { num2++; } float num3 = ((EconomyParameterData)(ref economyParameters)).GetWage(num2); float num4 = num3 - (float)economyParameters.m_ResidentialMinimumEarnings; if (num4 > 0f) { num3 -= (float)Mathf.RoundToInt(num4 * ((float)TaxSystem.GetResidentialTaxRate(num2, taxRates) / 100f)); } num3 = math.lerp(num3, (float)economyParameters.m_UnemploymentBenefit, 0.01f * (float)unemployment[num2]); num += num3; } return Mathf.RoundToInt(num); } public static int GetHouseholdExpectedIncomeDefault(DynamicBuffer<HouseholdCitizen> citizens, ref ComponentLookup<Student> students, ref ComponentLookup<HealthProblem> healthProblems, ref ComponentLookup<Citizen> citizenDatas, ref EconomyParameterData economyParameters) { //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_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0028: 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_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_0038: 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_004c: Invalid comparison between Unknown and I4 //IL_0065: Unknown result type (might be due to invalid IL or missing references) float num = 0f; for (int i = 0; i < citizens.Length; i++) { Entity citizen = citizens[i].m_Citizen; if (CitizenUtils.IsDead(citizen, ref healthProblems)) { continue; } Citizen val = citizenDatas[citizen]; CitizenAge age = ((Citizen)(ref val)).GetAge(); if ((int)age == 0) { num += (float)economyParameters.m_FamilyAllowance; continue; } if ((int)age == 3) { num += (float)economyParameters.m_Pension; continue; } int num2 = ((Citizen)(ref val)).GetEducationLevel(); if (students.HasComponent(citizen)) { num2++; } float num3 = ((EconomyParameterData)(ref economyParameters)).GetWage(num2); float num4 = num3 - (float)economyParameters.m_ResidentialMinimumEarnings; if (num4 > 0f) { num3 -= (float)Mathf.RoundToInt(num4 * 0.1f); } num3 = math.lerp(num3, (float)economyParameters.m_UnemploymentBenefit, 0.1f); num += num3; } return Mathf.RoundToInt(num); } public static int GetHouseholdIncome(DynamicBuffer<HouseholdCitizen> citizens, ref ComponentLookup<Worker> workers, ref ComponentLookup<Citizen> citizenDatas, ref ComponentLookup<HealthProblem> healthProblems, ref EconomyParameterData economyParameters, NativeArray<int> taxRates) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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_0035: Unknown result type (might be due to invalid IL or missing references) //IL_008a: 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_003f: 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_008f: Invalid comparison between Unknown and I4 //IL_0072: 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: Invalid comparison between Unknown and I4 int num = 0; for (int i = 0; i < citizens.Length; i++) { Entity citizen = citizens[i].m_Citizen; if (CitizenUtils.IsDead(citizen, ref healthProblems)) { continue; } Citizen val = citizenDatas[citizen]; CitizenAge age = ((Citizen)(ref val)).GetAge(); if (workers.HasComponent(citizen)) { int level = workers[citizen].m_Level; int wage = ((EconomyParameterData)(ref economyParameters)).GetWage(level); num += wage; int num2 = wage - economyParameters.m_ResidentialMinimumEarnings; if (num2 > 0) { num -= Mathf.RoundToInt((float)num2 * ((float)TaxSystem.GetResidentialTaxRate(level, taxRates) / 100f)); } } else { num = (((int)age != 0 && (int)age != 1) ? (((int)age != 3) ? (num + economyParameters.m_UnemploymentBenefit) : (num + economyParameters.m_Pension)) : (num + economyParameters.m_FamilyAllowance)); } } return Mathf.RoundToInt((float)num); } public static int GetHouseholdIncomeDefaultTax(DynamicBuffer<HouseholdCitizen> citizens, ref ComponentLookup<Worker> workers, ref ComponentLookup<HealthProblem> healthProblems, ref ComponentLookup<Citizen> citizenDatas, ref EconomyParameterData economyParameters) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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_0035: Unknown result type (might be due to invalid IL or missing references) //IL_007f: 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_003f: 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_0084: Invalid comparison between Unknown and I4 //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Invalid comparison between Unknown and I4 int num = 0; for (int i = 0; i < citizens.Length; i++) { Entity citizen = citizens[i].m_Citizen; if (CitizenUtils.IsDead(citizen, ref healthProblems)) { continue; } Citizen val = citizenDatas[citizen]; CitizenAge age = ((Citizen)(ref val)).GetAge(); if (workers.HasComponent(citizen)) { int level = workers[citizen].m_Level; int wage = ((EconomyParameterData)(ref economyParameters)).GetWage(level); num += wage; int num2 = wage - economyParameters.m_ResidentialMinimumEarnings; if (num2 > 0) { num -= Mathf.RoundToInt((float)num2 * 0.1f); } } else { num = (((int)age != 0 && (int)age != 1) ? (((int)age != 3) ? (num + economyParameters.m_UnemploymentBenefit) : (num + economyParameters.m_Pension)) : (num + economyParameters.m_FamilyAllowance)); } } return Mathf.RoundToInt((float)num); } public static int EstimateHouseholdDailyExpenses(int familySize, ref EconomyParameterData economyParameters, ResourcePrefabs resourcePrefabs, ref ComponentLookup<ResourceData> resourceDatas, float baseConsumptionSum) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: 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_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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_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) float num = 0f; ResourceIterator iterator = ResourceIterator.GetIterator(); while (((ResourceIterator)(ref iterator)).Next()) { float num2 = (float)familySize * HouseholdBehaviorSystem.GetCitizenDailyConsumption(iterator.resource, ref economyParameters, resourcePrefabs, ref resourceDatas, baseConsumptionSum); if (num2 > 0f) { num += EconomyUtils.GetMarketPrice(iterator.resource, resourcePrefabs, ref resourceDatas) * num2; } } return Mathf.RoundToInt(num); } public static float GetCitizenDailyConsumption(Resource resource, ref EconomyParameterData parameters, ResourcePrefabs resourcePrefabs, ref ComponentLookup<ResourceData> resourceDatas, float baseConsumptionSum) { //IL_000b: 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_002b: 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_003b: 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) float num = Mathf.RoundToInt(128f * (parameters.m_ResourceConsumption / EconomyUtils.GetMarketPrice(resource, resourcePrefabs, ref resourceDatas)) * HouseholdBehaviorSystem.GetConsumptionMultiplier(900)); float num2 = math.lerp((float)HouseholdBehaviorSystem.GetWeight(900, resource, resourcePrefabs, ref resourceDatas, 1, true), (float)HouseholdBehaviorSystem.GetWeight(900, resource, resourcePrefabs, ref resourceDatas, 0, true), 0.2f); return num * num2 / baseConsumptionSum; } public static bool GetFreeCar(Entity household, BufferLookup<OwnedVehicle> ownedVehicles, ComponentLookup<PersonalCar> personalCars, ref Entity car) { //IL_0002: 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_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002d: 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_0041: 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_004e: Unknown result type (might be due to invalid IL or missing references) if (ownedVehicles.HasBuffer(household)) { DynamicBuffer<OwnedVehicle> val = ownedVehicles[household]; for (int i = 0; i < val.Length; i++) { car = val[i].m_Vehicle; if (personalCars.HasComponent(car)) { PersonalCar val2 = personalCars[car]; if (((Entity)(ref val2.m_Keeper)).Equals(Entity.Null)) { return true; } } } } car = Entity.Null; return false; } public static int GetTouristDailyConsumption(Resource resource, ref EconomyParameterData parameters, ResourcePrefabs resourcePrefabs, ref ComponentLookup<ResourceData> resourceDatas, float baseConsumptionSum) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Invalid comparison between Unknown and I8 //IL_0017: 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_0036: 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_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) if ((long)resource == 2048) { return 1; } int num = Mathf.RoundToInt(1024f * parameters.m_ResourceConsumption / EconomyUtils.GetMarketPrice(resource, resourcePrefabs, ref resourceDatas) * HouseholdBehaviorSystem.GetConsumptionMultiplier(900)); float num2 = math.lerp((float)HouseholdBehaviorSystem.GetWeight(200, resource, resourcePrefabs, ref resourceDatas, 1, true), (float)HouseholdBehaviorSystem.GetWeight(200, resource, resourcePrefabs, ref resourceDatas, 0, true), 0.2f); return Mathf.RoundToInt(parameters.m_TouristConsumptionMultiplier * (float)num * num2 / baseConsumptionSum); } public static int GetTotalDailyConsumption(Resource resource, ref EconomyParameterData parameters, int population, int averageTourists, ResourcePrefabs resourcePrefabs, ComponentLookup<ResourceData> resourceDatas, float baseConsumptionSum) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0003: 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_0016: Unknown result type (might be due to invalid IL or missing references) float num = averageTourists * HouseholdBehaviorSystem.GetTouristDailyConsumption(resource, ref parameters, resourcePrefabs, ref resourceDatas, baseConsumptionSum); float num2 = (float)(1 + population) * HouseholdBehaviorSystem.GetCitizenDailyConsumption(resource, ref parameters, resourcePrefabs, ref resourceDatas, baseConsumptionSum); return Mathf.RoundToInt(num + num2); } [Preserve] protected override void OnCreate() { //IL_000a: 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_0018: 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_0024: 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_0040: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: 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_00ed: 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_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_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: 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_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0130: 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_013c: 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_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0163: 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) ((GameSystemBase)this).OnCreate(); m_DebugResourceCounter = new NativeArray<int>(1, (Allocator)4, (NativeArrayOptions)1); m_DebugResourceCounter2 = new NativeArray<int>(1, (Allocator)4, (NativeArrayOptions)1); m_DebugResourceQueue = new NativeQueue<int>(AllocatorHandle.op_Implicit((Allocator)4)); m_DebugWealth = new DebugWatchDistribution(true, false); m_DebugConsumption = new DebugWatchDistribution(true, false); m_DebugResources = new DebugWatchDistribution(true, false); m_SimulationSystem = ((ComponentSystemBase)this).World.GetOrCreateSystemManaged<SimulationSystem>(); m_EndFrameBarrier = ((ComponentSystemBase)this).World.GetOrCreateSystemManaged<EndFrameBarrier>(); m_ResourceSystem = ((ComponentSystemBase)this).World.GetOrCreateSystemManaged<ResourceSystem>(); m_TaxSystem = ((ComponentSystemBase)this).World.GetOrCreateSystemManaged<TaxSystem>(); m_CountConsumptionSystem = ((ComponentSystemBase)this).World.GetOrCreateSystemManaged<CountConsumptionSystem>(); m_CitySystem = ((ComponentSystemBase)this).World.GetOrCreateSystemManaged<CitySystem>(); m_EconomyParameterGroup = ((ComponentSystemBase)this).GetEntityQuery((ComponentType[])(object)new ComponentType[1] { ComponentType.ReadOnly<EconomyParameterData>() }); m_HouseholdGroup = ((ComponentSystemBase)this).GetEntityQuery((ComponentType[])(object)new ComponentType[8] { ComponentType.ReadWrite<Household>(), ComponentType.ReadWrite<HouseholdNeed>(), ComponentType.ReadOnly<HouseholdCitizen>(), ComponentType.ReadOnly<Resources>(), ComponentType.ReadOnly<UpdateFrame>(), ComponentType.Exclude<MovingAway>(), ComponentType.Exclude<Deleted>(), ComponentType.Exclude<Temp>() }); m_ConsumptionQueue = new NativeQueue<ResourceStack>(AllocatorHandle.op_Implicit((Allocator)4)); ((ComponentSystemBase)this).RequireForUpdate(m_HouseholdGroup); ((ComponentSystemBase)this).RequireForUpdate(m_EconomyParameterGroup); m_HouseholdFindPropertySystem = ((ComponentSystemBase)this).World.GetOrCreateSystemManaged<CityPlayerCustomHouseholdFindPropertySystem>(); } [Preserve] protected override void OnDestroy() { m_DebugResourceCounter.Dispose(); m_DebugResourceCounter2.Dispose(); m_DebugResourceQueue.Dispose(); m_DebugWealth.Dispose(); m_DebugResources.Dispose(); m_DebugConsumption.Dispose(); m_ConsumptionQueue.Dispose(); ((GameSystemBase)this).OnDestroy(); } [Preserve] protected override void OnUpdate() { //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01df: 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_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: 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_0208: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0227: 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_0239: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: 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_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_0293: 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_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_02ff: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Unknown result type (might be due to invalid IL or missing references) //IL_0311: 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_0323: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_034c: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_037c: 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_0385: Unknown result type (might be due to invalid IL or missing references) //IL_039a: 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_03ac: 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_03be: 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_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_03f9: 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_0402: Unknown result type (might be due to invalid IL or missing references) //IL_042e: Unknown result type (might be due to invalid IL or missing references) //IL_0433: Unknown result type (might be due to invalid IL or missing references) //IL_0437: 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_048c: Unknown result type (might be due to invalid IL or missing references) //IL_0492: Unknown result type (might be due to invalid IL or missing references) //IL_0498: Unknown result type (might be due to invalid IL or missing references) //IL_049d: Unknown result type (might be due to invalid IL or missing references) //IL_04a2: Unknown result type (might be due to invalid IL or missing references) //IL_04a7: 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_04ba: Unknown result type (might be due to invalid IL or missing references) //IL_04c6: Unknown result type (might be due to invalid IL or missing references) //IL_04d2: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: 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_050d: 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_051a: Unknown result type (might be due to invalid IL or missing references) //IL_051f: Unknown result type (might be due to invalid IL or missing references) //IL_0527: Unknown result type (might be due to invalid IL or missing references) //IL_052c: 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_0539: 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_0558: Unknown result type (might be due to invalid IL or missing references) //IL_055d: Unknown result type (might be due to invalid IL or missing references) //IL_0569: Unknown result type (might be due to invalid IL or missing references) //IL_056a: 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) //IL_057d: Unknown result type (might be due to invalid IL or missing references) //IL_0582: 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_0468: Unknown result type (might be due to invalid IL or missing references) //IL_046d: Unknown result type (might be due to invalid IL or missing references) //IL_0471: Unknown result type (might be due to invalid IL or missing references) //IL_0476: Unknown result type (might be due to invalid IL or missing references) uint updateFrameWithInterval = SimulationUtils.GetUpdateFrameWithInterval(m_SimulationSystem.frameIndex, (uint)((GameSystemBase)this).GetUpdateInterval((SystemUpdatePhase)12), 16); __TypeHandle.__Game_City_Population_RO_ComponentLookup.Update(ref ((SystemBase)this).CheckedStateRef); __TypeHandle.__Game_Citizens_HealthProblem_RO_ComponentLookup.Update(ref ((SystemBase)this).CheckedStateRef); __TypeHandle.__Game_Citizens_Citizen_RO_ComponentLookup.Update(ref ((SystemBase)this).CheckedStateRef); __TypeHandle.__Game_Companies_LodgingProvider_RO_ComponentLookup.Update(ref ((SystemBase)this).CheckedStateRef); __TypeHandle.__Game_Prefabs_ResourceData_RO_ComponentLookup.Update(ref ((SystemBase)this).CheckedStateRef); __TypeHandle.__Game_Agents_PropertySeeker_RO_ComponentLookup.Update(ref ((SystemBase)this).CheckedStateRef); __TypeHandle.__Game_Vehicles_OwnedVehicle_RO_BufferLookup.Update(ref ((SystemBase)this).CheckedStateRef); __TypeHandle.__Game_Citizens_Worker_RO_ComponentLookup.Update(ref ((SystemBase)this).CheckedStateRef); __TypeHandle.__Game_Citizens_HomelessHousehold_RO_ComponentTypeHandle.Update(ref ((SystemBase)this).CheckedStateRef); __TypeHandle.__Game_Buildings_PropertyRenter_RO_ComponentTypeHandle.Update(ref ((SystemBase)this).CheckedStateRef); __TypeHandle.__Game_Citizens_LodgingSeeker_RO_ComponentTypeHandle.Update(ref ((SystemBase)this).CheckedStateRef); __TypeHandle.__Game_Simulation_UpdateFrame_SharedComponentTypeHandle.Update(ref ((SystemBase)this).CheckedStateRef); __TypeHandle.__Game_Citizens_CommuterHousehold_RO_ComponentTypeHandle.Update(ref ((SystemBase)this).CheckedStateRef); __TypeHandle.__Game_Citizens_TouristHousehold_RW_ComponentTypeHandle.Update(ref ((SystemBase)this).CheckedStateRef); __TypeHandle.__Game_Citizens_HouseholdCitizen_RO_BufferTypeHandle.Update(ref ((SystemBase)this).CheckedStateRef); __TypeHandle.__Game_Economy_Resources_RW_BufferTypeHandle.Update(ref ((SystemBase)this).CheckedStateRef); __TypeHandle.__Game_Citizens_HouseholdNeed_RW_ComponentTypeHandle.Update(ref ((SystemBase)this).CheckedStateRef); __TypeHandle.__Game_Citizens_Household_RW_ComponentTypeHandle.Update(ref ((SystemBase)this).CheckedStateRef); ((EntityTypeHandle)(ref __TypeHandle.__Unity_Entities_Entity_TypeHandle)).Update(ref ((SystemBase)this).CheckedStateRef); HouseholdTickJob householdTickJob = default(HouseholdTickJob); householdTickJob.m_EntityType = __TypeHandle.__Unity_Entities_Entity_TypeHandle; householdTickJob.m_HouseholdType = __TypeHandle.__Game_Citizens_Household_RW_ComponentTypeHandle; householdTickJob.m_HouseholdNeedType = __TypeHandle.__Game_Citizens_HouseholdNeed_RW_ComponentTypeHandle; householdTickJob.m_ResourceType = __TypeHandle.__Game_Economy_Resources_RW_BufferTypeHandle; householdTickJob.m_HouseholdCitizenType = __TypeHandle.__Game_Citizens_HouseholdCitizen_RO_BufferTypeHandle; householdTickJob.m_TouristHouseholdType = __TypeHandle.__Game_Citizens_TouristHousehold_RW_ComponentTypeHandle; householdTickJob.m_CommuterHouseholdType = __TypeHandle.__Game_Citizens_CommuterHousehold_RO_ComponentTypeHandle; householdTickJob.m_UpdateFrameType = __TypeHandle.__Game_Simulation_UpdateFrame_SharedComponentTypeHandle; householdTickJob.m_LodgingSeekerType = __TypeHandle.__Game_Citizens_LodgingSeeker_RO_ComponentTypeHandle; householdTickJob.m_PropertyRenterType = __TypeHandle.__Game_Buildings_PropertyRenter_RO_ComponentTypeHandle; householdTickJob.m_HomelessHouseholdType = __TypeHandle.__Game_Citizens_HomelessHousehold_RO_ComponentTypeHandle; householdTickJob.m_Workers = __TypeHandle.__Game_Citizens_Worker_RO_ComponentLookup; householdTickJob.m_OwnedVehicles = __TypeHandle.__Game_Vehicles_OwnedVehicle_RO_BufferLookup; householdTickJob.m_EconomyParameters = ((EntityQuery)(ref m_EconomyParameterGroup)).GetSingleton<EconomyParameterData>(); householdTickJob.m_PropertySeekers = __TypeHandle.__Game_Agents_PropertySeeker_RO_ComponentLookup; householdTickJob.m_ResourceDatas = __TypeHandle.__Game_Prefabs_ResourceData_RO_ComponentLookup; householdTickJob.m_LodgingProviders = __TypeHandle.__Game_Companies_LodgingProvider_RO_ComponentLookup; householdTickJob.m_CitizenDatas = __TypeHandle.__Game_Citizens_Citizen_RO_ComponentLookup; householdTickJob.m_HealthProblems = __TypeHandle.__Game_Citizens_HealthProblem_RO_ComponentLookup; householdTickJob.m_Populations = __TypeHandle.__Game_City_Population_RO_ComponentLookup; householdTickJob.m_TaxRates = m_TaxSystem.GetTaxRates(); householdTickJob.m_ResourcePrefabs = m_ResourceSystem.GetPrefabs(); householdTickJob.m_RandomSeed = RandomSeed.Next(); householdTickJob.m_BaseConsumptionSum = m_ResourceSystem.BaseConsumptionSum; EntityCommandBuffer val = ((SafeCommandBufferSystem)m_EndFrameBarrier).CreateCommandBuffer(); householdTickJob.m_CommandBuffer = ((EntityCommandBuffer)(ref val)).AsParallelWriter(); householdTickJob.m_UpdateFrameIndex = updateFrameWithInterval; householdTickJob.m_ConsumptionQueue = m_ConsumptionQueue.AsParallelWriter(); householdTickJob.m_City = m_CitySystem.City; householdTickJob.m_DebugResourceQueue = m_DebugResourceQueue.AsParallelWriter(); householdTickJob.m_HouseHoldTotal = m_HouseholdFindPropertySystem.householdTotal; HouseholdTickJob householdTickJob2 = householdTickJob; if (m_DebugWealth.IsEnabled) { JobHandle val2 = default(JobHandle); householdTickJob2.m_DebugWealthQueue = m_DebugWealth.GetQueue(false, ref val2).AsParallelWriter(); householdTickJob2.m_DebugWealthQueueIsCreated = true; ((JobHandle)(ref val2)).Complete(); } if (m_DebugConsumption.IsEnabled) { JobHandle val3 = default(JobHandle); householdTickJob2.m_DebugConsumptionQueue = m_DebugConsumption.GetQueue(false, ref val3).AsParallelWriter(); householdTickJob2.m_DebugConsumptionQueueIsCreated = true; ((JobHandle)(ref val3)).Complete(); } if (m_DebugResources.IsEnabled) { JobHandle val4 = default(JobHandle); householdTickJob2.m_DebugResourcesQueue = m_DebugResources.GetQueue(false, ref val4).AsParallelWriter(); householdTickJob2.m_DebugResourcesQueueIsCreated = true; ((JobHandle)(ref val4)).Complete(); } JobHandle val5 = JobChunkExtensions.ScheduleParallel<HouseholdTickJob>(householdTickJob2, m_HouseholdGroup, JobHandle.CombineDependencies(m_ConsumptionQueueDeps, ((SystemBase)this).Dependency)); m_CountConsumptionSystem.AddConsumptionWriter(val5); m_EndFrameBarrier.AddJobHandleForProducer(val5); m_ResourceSystem.AddPrefabsReader(val5); m_TaxSystem.AddReader(val5); __TypeHandle.__Game_Prefabs_ResourceData_RO_ComponentLookup.Update(ref ((SystemBase)this).CheckedStateRef); ProcessConsumptionJob processConsumptionJob = default(ProcessConsumptionJob); processConsumptionJob.m_Queue = m_ConsumptionQueue; JobHandle val6 = default(JobHandle); processConsumptionJob.m_ConsumptionAccumulator = m_CountConsumptionSystem.GetConsumptionAccumulator(ref val6); processConsumptionJob.m_DebugResourceQueue = m_DebugResourceQueue; processConsumptionJob.m_DebugResourceCounter = m_DebugResourceCounter; processConsumptionJob.m_DebugResourceCounter2 = m_DebugResourceCounter2; processConsumptionJob.m_ResourceDatas = __TypeHandle.__Game_Prefabs_ResourceData_RO_ComponentLookup; processConsumptionJob.m_ResourcePrefabs = m_ResourceSystem.GetPrefabs(); ProcessConsumptionJob processConsumptionJob2 = processConsumptionJob; ((SystemBase)this).Dependency = IJobExtensions.Schedule<ProcessConsumptionJob>(processConsumptionJob2, JobHandle.CombineDependencies(val5, val6)); m_ConsumptionQueueDeps = ((SystemBase)this).Dependency; m_CountConsumptionSystem.AddConsumptionWriter(((SystemBase)this).Dependency); } public static int GetAgeWeight(ResourceData resourceData, DynamicBuffer<HouseholdCitizen> citizens, ref ComponentLookup<Citizen> citizenDatas) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: 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_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //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_0025: 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_0035: Invalid comparison between Unknown and I4 //IL_0029: 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: Invalid comparison between Unknown and I4 //IL_0038: 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_0047: Unknown result type (might be due to invalid IL or missing references) int num = 0; for (int i = 0; i < citizens.Length; i++) { Entity citizen = citizens[i].m_Citizen; Citizen val = citizenDatas[citizen]; CitizenAge age = ((Citizen)(ref val)).GetAge(); num = (((int)age != 0) ? (((int)age != 1) ? (((int)age != 3) ? (num + resourceData.m_AdultWeight) : (num + resourceData.m_ElderlyWeight)) : (num + resourceData.m_TeenWeight)) : (num + resourceData.m_ChildWeight)); } return num; } public static int GetWeight(int wealth, Resource resource, ResourcePrefabs resourcePrefabs, ref ComponentLookup<ResourceData> resourceDatas, int carCount, bool leisureIncluded, DynamicBuffer<HouseholdCitizen> citizens, ref ComponentLookup<Citizen> citizenDatas) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: 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) ResourceData val = resourceDatas[((ResourcePrefabs)(ref resourcePrefabs))[resource]]; return HouseholdBehaviorSystem.GetWeight(wealth, val, carCount, leisureIncluded, citizens, ref citizenDatas); } public static int GetWeight(int wealth, ResourceData resourceData, int carCount, bool leisureIncluded, DynamicBuffer<HouseholdCitizen> citizens, ref ComponentLookup<Citizen> citizenDatas) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_001b: 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_0028: 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_003f: Unknown result type (might be due to invalid IL or missing references) float num = ((leisureIncluded || !resourceData.m_IsLeisure) ? resourceData.m_BaseConsumption : 0f); num += (float)(carCount * resourceData.m_CarConsumption); float num2 = ((leisureIncluded || !resourceData.m_IsLeisure) ? resourceData.m_WealthModifier : 0f); float num3 = HouseholdBehaviorSystem.GetAgeWeight(resourceData, citizens, ref citizenDatas); return Mathf.RoundToInt(100f * num3 * num * math.smoothstep(num2, 1f, math.max(0.01f, ((float)wealth + 5000f) / 10000f))); } public static int GetWeight(int wealth, Resource resource, ResourcePrefabs resourcePrefabs, ref ComponentLookup<ResourceData> resourceDatas, int carCount, bool leisureIncluded) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: 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) ResourceData val = resourceDatas[((ResourcePrefabs)(ref resourcePrefabs))[resource]]; return HouseholdBehaviorSystem.GetWeight(wealth, val, carCount, leisureIncluded); } public static int GetWeight(int wealth, ResourceData resourceData, int carCount, bool leisureIncluded) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0003: 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_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) float num = ((leisureIncluded || !resourceData.m_IsLeisure) ? resourceData.m_BaseConsumption : 0f) + (float)(carCount * resourceData.m_CarConsumption); float num2 = ((leisureIncluded || !resourceData.m_IsLeisure) ? resourceData.m_WealthModifier : 0f); return Mathf.RoundToInt(num * math.smoothstep(num2, 1f, math.clamp(((float)wealth + 5000f) / 10000f, 0.1f, 0.9f))); } public static int GetHighestEducation(DynamicBuffer<HouseholdCitizen> citizenBuffer, ref ComponentLookup<Citizen> citizens) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: 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_001e: Unknown result type (might be due to invalid IL or missing references) //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_0027: 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_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Invalid comparison between Unknown and I4 //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Invalid comparison between Unknown and I4 int num = 0; for (int i = 0; i < citizenBuffer.Length; i++) { Entity citizen = citizenBuffer[i].m_Citizen; if (citizens.HasComponent(citizen)) { Citizen val = citizens[citizen]; CitizenAge age = ((Citizen)(ref val)).GetAge(); if ((int)age == 1 || (int)age == 2) { num = math.max(num, ((Citizen)(ref val)).GetEducationLevel()); } } } return num; } [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 CityPlayerCustomHouseholdBehaviorSystem() { } } [CompilerGenerated] public class CityPlayerCustomHouseholdFindPropertySystem : GameSystemBase { public struct GenericApartmentQuality { public float apartmentSize; public float2 educationBonus; public float welfareBonus; public float score; public int level; } private struct CachedPropertyInformation { public GenericApartmentQuality quality; public int free; } [BurstCompile] private struct PreparePropertyJob : IJobChunk { [ReadOnly] public EntityTypeHandle m_EntityType; [ReadOnly] public ComponentLookup<BuildingPropertyData> m_BuildingProperties; [ReadOnly] public ComponentLookup<PrefabRef> m_Prefabs; [ReadOnly] public BufferLookup<Renter> m_Renters; [ReadOnly] public ComponentLookup<Abandoned> m_Abandoneds; [ReadOnly] public ComponentLookup<Park> m_Parks; [ReadOnly] public ComponentLookup<BuildingData> m_BuildingDatas; [ReadOnly] public ComponentLookup<ParkData> m_ParkDatas; [ReadOnly] public ComponentLookup<Household> m_Households; [ReadOnly] public ComponentLookup<Building> m_Buildings; [ReadOnly] public ComponentLookup<SpawnableBuildingData> m_SpawnableDatas; [ReadOnly] public ComponentLookup<BuildingPropertyData> m_BuildingPropertyData; [ReadOnly] public BufferLookup<ServiceCoverage> m_ServiceCoverages; [ReadOnly] public ComponentLookup<CrimeProducer> m_Crimes; [ReadOnly] public ComponentLookup<Transform> m_Transforms; [ReadOnly] public ComponentLookup<Locked> m_Locked; [ReadOnly] public BufferLookup<CityModifier> m_CityModifiers; [ReadOnly] public ComponentLookup<ElectricityConsumer> m_ElectricityConsumers; [ReadOnly] public ComponentLookup<AdjustHappinessData> m_AdjustHappinessData; [ReadOnly] public ComponentLookup<WaterConsumer> m_WaterConsumers; [ReadOnly] public ComponentLookup<GarbageProducer> m_GarbageProducers; [ReadOnly] public ComponentLookup<MailProducer> m_MailProducers; [ReadOnly] public NativeArray<AirPollution> m_AirPollutionMap; [ReadOnly] public NativeArray<GroundPollution> m_PollutionMap; [ReadOnly] public NativeArray<NoisePollution> m_NoiseMap; [ReadOnly] public CellMapData<TelecomCoverage> m_TelecomCoverages; public HealthcareParameterData m_HealthcareParameters; public ParkParameterData m_ParkParameters; public EducationParameterData m_EducationParameters; public TelecomParameterData m_TelecomParameters; public GarbageParameterData m_GarbageParameters; public PoliceConfigurationData m_PoliceParameters; public CitizenHappinessParameterData m_CitizenHappinessParameterData; public Entity m_City; public ParallelWriter<Entity, CachedPropertyInformation> m_PropertyData; [ReadOnly] public uint m_SimulationFrameIndex; private int CalculateFree(Entity property) { //IL_0006: 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_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001a: 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_0028: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: 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_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: 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_0057: 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_0063: 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_007c: 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_006d: 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_0044: 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_00d9: 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_00eb: 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_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) Entity prefab = m_Prefabs[property].m_Prefab; int num = 0; if (m_BuildingDatas.HasComponent(prefab) && (m_Abandoneds.HasComponent(property) || (m_Parks.HasComponent(property) && m_ParkDatas[prefab].m_AllowHomeless))) { num = HomelessShelterAISystem.GetShelterCapacity(m_BuildingDatas[prefab], (BuildingPropertyData)(m_BuildingPropertyData.HasComponent(prefab) ? m_BuildingPropertyData[prefab] : default(BuildingPropertyData))) - m_Renters[property].Length; } if (m_BuildingProperties.HasComponent(prefab)) { BuildingPropertyData val = m_BuildingProperties[prefab]; DynamicBuffer<Renter> val2 = m_Renters[property]; num = ((BuildingPropertyData)(ref val)).CountProperties((AreaType)1); for (int i = 0; i < val2.Length; i++) { Entity renter = val2[i].m_Renter; if (m_Households.HasComponent(renter)) { num--; } } } return num; } 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_0017: 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_001e: 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_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: 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_0046: 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_0053: 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_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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: 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_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0094: 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_00a2: Unknown result type (might be due to invalid IL or missing references) //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_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010e: 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_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: 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_0123: 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_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0134: 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) NativeArray<Entity> nativeArray = ((ArchetypeChunk)(ref chunk)).GetNativeArray(m_EntityType); for (int i = 0; i < nativeArray.Length; i++) { Entity val = nativeArray[i]; int num = CalculateFree(val); if (num > 0) { Entity prefab = m_Prefabs[val].m_Prefab; Building buildingData = m_Buildings[val]; Entity healthcareServicePrefab = m_HealthcareParameters.m_HealthcareServicePrefab; Entity parkServicePrefab = m_ParkParameters.m_ParkServicePrefab; Entity educationServicePrefab = m_EducationParameters.m_EducationServicePrefab; Entity telecomServicePrefab = m_TelecomParameters.m_TelecomServicePrefab; Entity garbageServicePrefab = m_GarbageParameters.m_GarbageServicePrefab; Entity policeServicePrefab = m_PoliceParameters.m_PoliceServicePrefab; DynamicBuffer<CityModifier> cityModifiers = m_CityModifiers[m_City]; GenericApartmentQuality genericApartmentQuality = GetGenericApartmentQuality(val, ref buildingData, prefab, ref m_BuildingProperties, ref m_BuildingDatas, ref m_SpawnableDatas, ref m_Crimes, ref m_ServiceCoverages, ref m_Locked, ref m_ElectricityConsumers, ref m_AdjustHappinessData, ref m_WaterConsumers, ref m_GarbageProducers, ref m_MailProducers, ref m_Prefabs, ref m_Transforms, ref m_Abandoneds, m_PollutionMap, m_AirPollutionMap, m_NoiseMap, m_TelecomCoverages, cityModifiers, healthcareServicePrefab, parkServicePrefab, educationServicePrefab, telecomServicePrefab, garbageServicePrefab, policeServicePrefab, m_CitizenHappinessParameterData, m_GarbageParameters); m_PropertyData.TryAdd(val, new CachedPropertyInformation { free = num, quality = genericApartmentQuality }); } } } void IJobChunk.Execute(in ArchetypeChunk chunk, int unfilteredChunkIndex, bool useEnabledMask, in v128 chunkEnabledMask) { Execute(in chunk, unfilteredChunkIndex, useEnabledMask, in chunkEnabledMask); } } [BurstCompile] private struct FindPropertyJob : IJob { public static int m_EntitiesLength = 0; public static int m_Size = 32; public NativeList<Entity> m_Entities; public NativeParallelHashMap<Entity, CachedPropertyInformation> m_PropertyData; [ReadOnly] public ComponentLookup<BuildingData> m_BuildingDatas; [ReadOnly] public ComponentLookup<PropertyOnMarket> m_PropertiesOnMarket; [ReadOnly] public BufferLookup<PathInformations> m_MultiPathInfos; [ReadOnly] public ComponentLookup<PrefabRef> m_Prefabs; [ReadOnly] public ComponentLookup<Building> m_Buildings; [ReadOnly] public ComponentLookup<Worker> m_Workers; [ReadOnly] public ComponentLookup<Student> m_Students; [ReadOnly] public ComponentLookup<BuildingPropertyData> m_BuildingProperties; [ReadOnly] public ComponentLookup<SpawnableBuildingData> m_SpawnableDatas; [ReadOnly] public ComponentLookup<PropertyRenter> m_PropertyRenters; [ReadOnly] public BufferLookup<ResourceAvailability> m_Availabilities; [ReadOnly] public BufferLookup<ServiceCoverage> m_ServiceCoverages; [ReadOnly] public ComponentLookup<ResourceData> m_ResourceDatas; [ReadOnly] public ComponentLookup<Citizen> m_Citizens; [ReadOnly] public ComponentLookup<CrimeProducer> m_Crimes; [ReadOnly] public ComponentLookup<Transform> m_Transforms; [ReadOnly] public ComponentLookup<Locked> m_Locked; [ReadOnly] public BufferLookup<CityModifier> m_CityModifiers; [ReadOnly] public ComponentLookup<HealthProblem> m_HealthProblems; [ReadOnly] public ComponentLookup<Park> m_Parks; [ReadOnly] public ComponentLookup<Abandoned> m_Abandoneds; [ReadOnly] public BufferLookup<OwnedVehicle> m_OwnedVehicles; [ReadOnly] public ComponentLookup<ElectricityConsumer> m_ElectricityConsumers; [ReadOnly] public ComponentLookup<AdjustHappinessData> m_AdjustHappinessData; [ReadOnly] public ComponentLookup<WaterConsumer> m_WaterConsumers; [ReadOnly] public ComponentLookup<GarbageProducer> m_GarbageProducers; [ReadOnly] public ComponentLookup<MailProducer> m_MailProducers; [ReadOnly] public ComponentLookup<Household> m_Households; [ReadOnly] public ComponentLookup<CurrentBuilding> m_CurrentBuildings; [ReadOnly] public ComponentLookup<CurrentTransport> m_CurrentTransports; [ReadOnly] public BufferLookup<HouseholdCitizen> m_CitizenBuffers; public ComponentLookup<PropertySeeker> m_PropertySeekers; [ReadOnly] public NativeArray<AirPollution> m_AirPollutionMap; [ReadOnly] public NativeArray<GroundPollution> m_PollutionMap; [ReadOnly] public NativeArray<NoisePollution> m_NoiseMap; [ReadOnly] public CellMapData<TelecomCoverage> m_TelecomCoverages; [ReadOnly] public ResourcePrefabs m_ResourcePrefabs; [ReadOnly] public NativeArray<int> m_TaxRates; [ReadOnly] public NativeArray<int> m_Unemployment; public HealthcareParameterData m_HealthcareParameters; public ParkParameterData m_ParkParameters; public EducationParameterData m_EducationParameters; public TelecomParameterData m_TelecomParameters; public GarbageParameterData m_GarbageParameters; public PoliceConfigurationData m_PoliceParameters; public CitizenHappinessParameterData m_CitizenHappinessParameterData; public RandomSeed m_RandomSeed; public float m_BaseConsumptionSum; public EntityCommandBuffer m_CommandBuffer; [ReadOnly] public Entity m_City; public ParallelWriter<SetupQueueItem> m_PathfindQueue; public ParallelWriter<RentAction> m_RentQueue; public EconomyParameterData m_EconomyParameters; public DemandParameterData m_DemandParameters; public ParallelWriter<TriggerAction> m_TriggerBuffer; public NativeQueue<StatisticsEvent> m_StatisticsQueue; public NativeValue<int> m_HouseholdNone; public NativeValue<int> m_HouseholdTotal; [ReadOnly] public uint m_SimulationFrameIndex; private void InitiateEvaluation(Entity household, Entity workplace, Entity oldHome, float minimumScore, bool movingIn, DynamicBuffer<HouseholdCitizen> citizens) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0016: 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_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: 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_0059: 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_008c: 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_00c2: 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_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: 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_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: 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_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013b: 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_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0181: 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: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_0198: 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_01ae: 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_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01be: 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_01ce: 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_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_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0209: 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_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown