{"action":"created","comment":{"url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/pulls/comments/305580899","pull_request_review_id":264497971,"id":305580899,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMwNTU4MDg5OQ==","diff_hunk":"@@ -1,374 +1,555 @@\n-using ColossalFramework;\n-using TrafficManager.State;\n-using TrafficManager.Geometry;\n-using TrafficManager.TrafficLight;\n-using TrafficManager.Manager;\n-using UnityEngine;\n-using TrafficManager.Traffic;\n-using TrafficManager.Custom.PathFinding;\n-using System;\n-using TrafficManager.Util;\n-using ColossalFramework.Math;\n-using TrafficManager.UI;\n-using CSUtil.Commons;\n-using TrafficManager.Manager.Impl;\n-using System.Runtime.CompilerServices;\n-using static TrafficManager.Traffic.Data.ExtCitizenInstance;\n-using TrafficManager.Traffic.Data;\n-using CSUtil.Commons.Benchmark;\n-using TrafficManager.Traffic.Enums;\n-using TrafficManager.RedirectionFramework.Attributes;\n-\n namespace TrafficManager.Custom.AI {\n-\tusing API.Traffic.Enums;\n-\tusing API.TrafficLight;\n-\n-\t[TargetType(typeof(HumanAI))]\n-\tpublic class CustomHumanAI : CitizenAI {\n-\t\t[RedirectMethod]\n-\t\tpublic void CustomSimulationStep(ushort instanceID, ref CitizenInstance instanceData, Vector3 physicsLodRefPos) {\n+    using System.Runtime.CompilerServices;\n+    using API.Traffic.Enums;\n+    using API.TrafficLight;\n+    using ColossalFramework;\n+    using CSUtil.Commons;\n+    using JetBrains.Annotations;\n+    using Manager;\n+    using Manager.Impl;\n+    using RedirectionFramework.Attributes;\n+    using State;\n+    using State.ConfigData;\n+    using Traffic.Data;\n+    using Traffic.Enums;\n+    using UnityEngine;\n+\n+    [TargetType(typeof(HumanAI))]\n+    public class CustomHumanAI : CitizenAI {\n+        [RedirectMethod]\n+        public void CustomSimulationStep(ushort instanceId,\n+                                         ref CitizenInstance instanceData,\n+                                         Vector3 physicsLodRefPos) {\n #if DEBUG\n-\t\t\tbool citDebug = (GlobalConfig.Instance.Debug.CitizenInstanceId == 0 || GlobalConfig.Instance.Debug.CitizenInstanceId == instanceID) &&\n-\t\t\t\t(GlobalConfig.Instance.Debug.CitizenId == 0 || GlobalConfig.Instance.Debug.CitizenId == instanceData.m_citizen) &&\n-\t\t\t\t(GlobalConfig.Instance.Debug.SourceBuildingId == 0 || GlobalConfig.Instance.Debug.SourceBuildingId == instanceData.m_sourceBuilding) &&\n-\t\t\t\t(GlobalConfig.Instance.Debug.TargetBuildingId == 0 || GlobalConfig.Instance.Debug.TargetBuildingId == instanceData.m_targetBuilding)\n-\t\t\t;\n-\t\t\tbool debug = GlobalConfig.Instance.Debug.Switches[2] && citDebug;\n-\t\t\tbool fineDebug = GlobalConfig.Instance.Debug.Switches[4] && citDebug;\n+            bool citizenDebug = (DebugSettings.CitizenInstanceId == 0\n+                            || DebugSettings.CitizenInstanceId == instanceId)\n+                           && (DebugSettings.CitizenId == 0\n+                               || DebugSettings.CitizenId == instanceData.m_citizen)\n+                           && (DebugSettings.SourceBuildingId == 0\n+                               || DebugSettings.SourceBuildingId == instanceData.m_sourceBuilding)\n+                           && (DebugSettings.TargetBuildingId == 0\n+                               || DebugSettings.TargetBuildingId == instanceData.m_targetBuilding);\n+            bool logParkingAi = DebugSwitch.BasicParkingAILog.Get() && citizenDebug;\n+#else\n+            var logParkingAi = false;\n #endif\n+            CitizenManager citizenManager = Singleton<CitizenManager>.instance;\n+            uint citizenId = instanceData.m_citizen;\n+\n+            if ((instanceData.m_flags & (CitizenInstance.Flags.Blown\n+                                         | CitizenInstance.Flags.Floating)) != CitizenInstance.Flags.None\n+                && (instanceData.m_flags & CitizenInstance.Flags.Character) == CitizenInstance.Flags.None)\n+            {\n+                citizenManager.ReleaseCitizenInstance(instanceId);\n+                if (citizenId != 0u) {\n+                    citizenManager.ReleaseCitizen(citizenId);\n+                }\n+\n+                return;\n+            }\n+\n+            Citizen[] ctzBuffer = citizenManager.m_citizens.m_buffer;\n+            if ((instanceData.m_flags & CitizenInstance.Flags.WaitingPath) != CitizenInstance.Flags.None) {\n+                PathManager pathManager = Singleton<PathManager>.instance;\n+                byte pathFindFlags = pathManager.m_pathUnits.m_buffer[instanceData.m_path].m_pathFindFlags;\n+\n+                // NON-STOCK CODE START\n+                ExtPathState mainPathState = ExtPathState.Calculating;\n+                if ((pathFindFlags & PathUnit.FLAG_FAILED) != 0 || instanceData.m_path == 0) {\n+                    mainPathState = ExtPathState.Failed;\n+                } else if ((pathFindFlags & PathUnit.FLAG_READY) != 0) {\n+                    mainPathState = ExtPathState.Ready;\n+                }\n+\n+                if (logParkingAi) {\n+                    Log._Debug(\n+                        $\"CustomHumanAI.CustomSimulationStep({instanceId}): \" +\n+                        $\"Path: {instanceData.m_path}, mainPathState={mainPathState}\");\n+                }\n \n-\t\t\tCitizenManager citizenManager = Singleton<CitizenManager>.instance;\n-\n-\t\t\tuint citizenId = instanceData.m_citizen;\n-\t\t\tif ((instanceData.m_flags & (CitizenInstance.Flags.Blown | CitizenInstance.Flags.Floating)) != CitizenInstance.Flags.None && (instanceData.m_flags & CitizenInstance.Flags.Character) == CitizenInstance.Flags.None) {\n-\t\t\t\tcitizenManager.ReleaseCitizenInstance(instanceID);\n-\t\t\t\tif (citizenId != 0u) {\n-\t\t\t\t\tcitizenManager.ReleaseCitizen(citizenId);\n-\t\t\t\t}\n-\t\t\t\treturn;\n-\t\t\t}\n-\n-\t\t\tif ((instanceData.m_flags & CitizenInstance.Flags.WaitingPath) != CitizenInstance.Flags.None) {\n-\t\t\t\tPathManager pathManager = Singleton<PathManager>.instance;\n-\t\t\t\tbyte pathFindFlags = pathManager.m_pathUnits.m_buffer[instanceData.m_path].m_pathFindFlags;\n-\n-\t\t\t\t// NON-STOCK CODE START\n-\t\t\t\tExtPathState mainPathState = ExtPathState.Calculating;\n-\t\t\t\tif ((pathFindFlags & PathUnit.FLAG_FAILED) != 0 || instanceData.m_path == 0) {\n-\t\t\t\t\tmainPathState = ExtPathState.Failed;\n-\t\t\t\t} else if ((pathFindFlags & PathUnit.FLAG_READY) != 0) {\n-\t\t\t\t\tmainPathState = ExtPathState.Ready;\n-\t\t\t\t}\n-\n-#if DEBUG\n-\t\t\t\tif (debug)\n-\t\t\t\t\tLog._Debug($\"CustomHumanAI.CustomSimulationStep({instanceID}): Path: {instanceData.m_path}, mainPathState={mainPathState}\");\n-#endif\n-\n-\t\t\t\tExtSoftPathState finalPathState = ExtSoftPathState.None;\n #if BENCHMARK\n-\t\t\t\tusing (var bm = new Benchmark(null, \"ConvertPathStateToSoftPathState+UpdateCitizenPathState\")) {\n-#endif\n-\t\t\t\t\tfinalPathState = ExtCitizenInstance.ConvertPathStateToSoftPathState(mainPathState);\n-\t\t\t\t\tif (Options.parkingAI) {\n-\t\t\t\t\t\tfinalPathState = AdvancedParkingManager.Instance.UpdateCitizenPathState(instanceID, ref instanceData, ref ExtCitizenInstanceManager.Instance.ExtInstances[instanceID], ref ExtCitizenManager.Instance.ExtCitizens[citizenId], ref citizenManager.m_citizens.m_buffer[instanceData.m_citizen], mainPathState);\n-#if DEBUG\n-\t\t\t\t\t\tif (debug)\n-\t\t\t\t\t\t\tLog._Debug($\"CustomHumanAI.CustomSimulationStep({instanceID}): Applied Parking AI logic. Path: {instanceData.m_path}, mainPathState={mainPathState}, finalPathState={finalPathState}, extCitizenInstance={ExtCitizenInstanceManager.Instance.ExtInstances[instanceID]}\");\n+                using (var bm = new Benchmark(null, \"ConvertPathStateToSoftPathState+UpdateCitizenPathState\")) {\n #endif\n-\t\t\t\t\t}\n+                ExtSoftPathState finalPathState = ExtCitizenInstance.ConvertPathStateToSoftPathState(mainPathState);\n+\n+                if (Options.parkingAI) {\n+                    finalPathState = AdvancedParkingManager.Instance.UpdateCitizenPathState(\n+                        instanceId,\n+                        ref instanceData,\n+                        ref ExtCitizenInstanceManager.Instance.ExtInstances[instanceId],\n+                        ref ExtCitizenManager.Instance.ExtCitizens[citizenId],\n+                        ref ctzBuffer[instanceData.m_citizen],\n+                        mainPathState);\n+                    if (logParkingAi) {\n+                        Log._Debug(\n+                            $\"CustomHumanAI.CustomSimulationStep({instanceId}): \" +\n+                            $\"Applied Parking AI logic. Path: {instanceData.m_path}, \" +\n+                            $\"mainPathState={mainPathState}, finalPathState={finalPathState}, \" +\n+                            $\"extCitizenInstance={ExtCitizenInstanceManager.Instance.ExtInstances[instanceId]}\");\n+                    }\n+                } // if Options.parkingAi\n #if BENCHMARK\n-\t\t\t\t}\n+                }\n #endif\n \n-\t\t\t\tswitch (finalPathState) {\n-\t\t\t\t\tcase ExtSoftPathState.Ready:\n-#if DEBUG\n-\t\t\t\t\t\tif (debug)\n-\t\t\t\t\t\t\tLog._Debug($\"CustomHumanAI.CustomSimulationStep({instanceID}): Path-finding succeeded for citizen instance {instanceID} (finalPathState={finalPathState}). Path: {instanceData.m_path} -- calling HumanAI.PathfindSuccess\");\n-#endif\n-\t\t\t\t\t\tif (citizenId == 0 || citizenManager.m_citizens.m_buffer[instanceData.m_citizen].m_vehicle == 0) {\n-\t\t\t\t\t\t\tthis.Spawn(instanceID, ref instanceData);\n-\t\t\t\t\t\t}\n-\t\t\t\t\t\tinstanceData.m_pathPositionIndex = 255;\n-\t\t\t\t\t\tinstanceData.m_flags &= ~CitizenInstance.Flags.WaitingPath;\n-\t\t\t\t\t\tinstanceData.m_flags &= ~(CitizenInstance.Flags.HangAround | CitizenInstance.Flags.Panicking | CitizenInstance.Flags.SittingDown | CitizenInstance.Flags.Cheering);\n-\t\t\t\t\t\t// NON-STOCK CODE START (transferred from ResidentAI.PathfindSuccess)\n-\t\t\t\t\t\tif (citizenId != 0 && (citizenManager.m_citizens.m_buffer[citizenId].m_flags & (Citizen.Flags.Tourist | Citizen.Flags.MovingIn | Citizen.Flags.DummyTraffic)) == Citizen.Flags.MovingIn) {\n-\t\t\t\t\t\t\tStatisticBase statisticBase = Singleton<StatisticsManager>.instance.Acquire<StatisticInt32>(StatisticType.MoveRate);\n-\t\t\t\t\t\t\tstatisticBase.Add(1);\n-\t\t\t\t\t\t}\n-\t\t\t\t\t\t// NON-STOCK CODE END\n-\t\t\t\t\t\tthis.PathfindSuccess(instanceID, ref instanceData);\n-\t\t\t\t\t\tbreak;\n-\t\t\t\t\tcase ExtSoftPathState.Ignore:\n-#if DEBUG\n-\t\t\t\t\t\tif (debug)\n-\t\t\t\t\t\t\tLog._Debug($\"CustomHumanAI.CustomSimulationStep({instanceID}): Path-finding result shall be ignored for citizen instance {instanceID} (finalPathState={finalPathState}). Path: {instanceData.m_path} -- ignoring\");\n-#endif\n-\t\t\t\t\t\treturn;\n-\t\t\t\t\tcase ExtSoftPathState.Calculating:\n-\t\t\t\t\tdefault:\n-#if DEBUG\n-\t\t\t\t\t\tif (debug)\n-\t\t\t\t\t\t\tLog._Debug($\"CustomHumanAI.CustomSimulationStep({instanceID}): Path-finding result undetermined for citizen instance {instanceID} (finalPathState={finalPathState}). Path: {instanceData.m_path} -- continue\");\n-#endif\n-\t\t\t\t\t\tbreak;\n-\t\t\t\t\tcase ExtSoftPathState.FailedHard:\n-#if DEBUG\n-\t\t\t\t\t\tif (debug)\n-\t\t\t\t\t\t\tLog._Debug($\"CustomHumanAI.CustomSimulationStep({instanceID}): HARD path-finding failure for citizen instance {instanceID} (finalPathState={finalPathState}). Path: {instanceData.m_path} -- calling HumanAI.PathfindFailure\");\n-#endif\n-\t\t\t\t\t\tinstanceData.m_flags &= ~CitizenInstance.Flags.WaitingPath;\n-\t\t\t\t\t\tinstanceData.m_flags &= ~(CitizenInstance.Flags.HangAround | CitizenInstance.Flags.Panicking | CitizenInstance.Flags.SittingDown | CitizenInstance.Flags.Cheering);\n-\t\t\t\t\t\tSingleton<PathManager>.instance.ReleasePath(instanceData.m_path);\n-\t\t\t\t\t\tinstanceData.m_path = 0u;\n-\t\t\t\t\t\tthis.PathfindFailure(instanceID, ref instanceData);\n-\t\t\t\t\t\treturn;\n-\t\t\t\t\tcase ExtSoftPathState.FailedSoft:\n-#if DEBUG\n-\t\t\t\t\t\tif (debug)\n-\t\t\t\t\t\t\tLog._Debug($\"CustomHumanAI.CustomSimulationStep({instanceID}): SOFT path-finding failure for citizen instance {instanceID} (finalPathState={finalPathState}). Path: {instanceData.m_path} -- calling HumanAI.InvalidPath\");\n-#endif\n-\t\t\t\t\t\t// path mode has been updated, repeat path-finding\n-\t\t\t\t\t\tinstanceData.m_flags &= ~CitizenInstance.Flags.WaitingPath;\n-\t\t\t\t\t\tinstanceData.m_flags &= ~(CitizenInstance.Flags.HangAround | CitizenInstance.Flags.Panicking | CitizenInstance.Flags.SittingDown | CitizenInstance.Flags.Cheering);\n-\t\t\t\t\t\tthis.InvalidPath(instanceID, ref instanceData);\n-\t\t\t\t\t\tbreak;\n-\t\t\t\t}\n-\t\t\t\t// NON-STOCK CODE END\n-\t\t\t}\n-\n-\t\t\t// NON-STOCK CODE START\n+                switch (finalPathState) {\n+                    case ExtSoftPathState.Ready: {\n+                        if (logParkingAi) {\n+                            Log._Debug(\n+                                $\"CustomHumanAI.CustomSimulationStep({instanceId}): Path-finding \" +\n+                                $\"succeeded for citizen instance {instanceId} \" +\n+                                $\"(finalPathState={finalPathState}). Path: {instanceData.m_path} \" +\n+                                \"-- calling HumanAI.PathfindSuccess\");\n+                        }\n+\n+                        if (citizenId == 0\n+                            || ctzBuffer[instanceData.m_citizen].m_vehicle == 0) {\n+                            Spawn(instanceId, ref instanceData);\n+                        }\n+\n+                        instanceData.m_pathPositionIndex = 255;\n+                        instanceData.m_flags &= ~CitizenInstance.Flags.WaitingPath;\n+                        instanceData.m_flags &= ~(CitizenInstance.Flags.HangAround\n+                                                  | CitizenInstance.Flags.Panicking\n+                                                  | CitizenInstance.Flags.SittingDown\n+                                                  | CitizenInstance.Flags.Cheering);\n+\n+                        // NON-STOCK CODE START (transferred from ResidentAI.PathfindSuccess)\n+                        const Citizen.Flags CTZ_MASK = Citizen.Flags.Tourist\n+                                                       | Citizen.Flags.MovingIn\n+                                                       | Citizen.Flags.DummyTraffic;\n+                        if (citizenId != 0\n+                            && (ctzBuffer[citizenId].m_flags & CTZ_MASK) == Citizen.Flags.MovingIn)\n+                        {\n+                            StatisticBase statisticBase = Singleton<StatisticsManager>\n+                                                .instance.Acquire<StatisticInt32>(StatisticType.MoveRate);\n+                            statisticBase.Add(1);\n+                        }\n+\n+                        // NON-STOCK CODE END\n+                        PathfindSuccess(instanceId, ref instanceData);\n+                        break;\n+                    }\n+\n+                    case ExtSoftPathState.Ignore: {\n+                        if (logParkingAi) {\n+                            Log._Debug(\n+                                $\"CustomHumanAI.CustomSimulationStep({instanceId}): \" +\n+                                \"Path-finding result shall be ignored for citizen instance \" +\n+                                $\"{instanceId} (finalPathState={finalPathState}). \" +\n+                                $\"Path: {instanceData.m_path} -- ignoring\");\n+                        }\n+\n+                        return;\n+                    }\n+\n+                    case ExtSoftPathState.Calculating:\n+                    default: {\n+                        if (logParkingAi) {\n+                            Log._Debug(\n+                                $\"CustomHumanAI.CustomSimulationStep({instanceId}): \" +\n+                                      $\"Path-finding result undetermined for citizen instance {instanceId} \" +\n+                                      $\"(finalPathState={finalPathState}). \" +\n+                                      $\"Path: {instanceData.m_path} -- continue\");\n+                        }\n+\n+                        break;\n+                    }\n+\n+                    case ExtSoftPathState.FailedHard: {\n+                        if (logParkingAi) {\n+                            Log._Debug(\n+                                $\"CustomHumanAI.CustomSimulationStep({instanceId}): \" +\n+                                $\"HARD path-finding failure for citizen instance {instanceId} \" +\n+                                $\"(finalPathState={finalPathState}). Path: {instanceData.m_path} \" +\n+                                \"-- calling HumanAI.PathfindFailure\");\n+                        }\n+\n+                        instanceData.m_flags &= ~CitizenInstance.Flags.WaitingPath;\n+                        instanceData.m_flags &= ~(CitizenInstance.Flags.HangAround\n+                                                  | CitizenInstance.Flags.Panicking\n+                                                  | CitizenInstance.Flags.SittingDown\n+                                                  | CitizenInstance.Flags.Cheering);\n+                        Singleton<PathManager>.instance.ReleasePath(instanceData.m_path);\n+                        instanceData.m_path = 0u;\n+                        PathfindFailure(instanceId, ref instanceData);\n+                        return;\n+                    }\n+\n+                    case ExtSoftPathState.FailedSoft: {\n+                        if (logParkingAi) {\n+                            Log._Debug(\n+                                $\"CustomHumanAI.CustomSimulationStep({instanceId}): \" +\n+                                $\"SOFT path-finding failure for citizen instance {instanceId} \" +\n+                                $\"(finalPathState={finalPathState}). Path: {instanceData.m_path} \" +\n+                                \"-- calling HumanAI.InvalidPath\");\n+                        }\n+\n+                        // path mode has been updated, repeat path-finding\n+                        instanceData.m_flags &= ~CitizenInstance.Flags.WaitingPath;\n+                        instanceData.m_flags &= ~(CitizenInstance.Flags.HangAround\n+                                                  | CitizenInstance.Flags.Panicking\n+                                                  | CitizenInstance.Flags.SittingDown\n+                                                  | CitizenInstance.Flags.Cheering);\n+                        InvalidPath(instanceId, ref instanceData);\n+                        break;\n+                    }\n+                }\n+\n+                // NON-STOCK CODE END\n+            }\n+\n+            // NON-STOCK CODE START\n #if BENCHMARK\n-\t\t\tusing (var bm = new Benchmark(null, \"ExtSimulationStep\")) {\n+            using (var bm = new Benchmark(null, \"ExtSimulationStep\")) {\n #endif\n-\t\t\t\tif (Options.parkingAI) {\n-\t\t\t\t\tif (ExtSimulationStep(instanceID, ref instanceData, ref ExtCitizenInstanceManager.Instance.ExtInstances[instanceID], physicsLodRefPos)) {\n-\t\t\t\t\t\treturn;\n-\t\t\t\t\t}\n-\t\t\t\t}\n+            if (Options.parkingAI) {\n+                if (ExtSimulationStep(\n+                    instanceId,\n+                    ref instanceData,\n+                    ref ExtCitizenInstanceManager.Instance.ExtInstances[instanceId],\n+                    physicsLodRefPos)) {\n+                    return;\n+                }\n+            }\n #if BENCHMARK\n-\t\t\t}\n-#endif\n-\t\t\t// NON-STOCK CODE END\n-\n-\t\t\tbase.SimulationStep(instanceID, ref instanceData, physicsLodRefPos);\n-\n-\t\t\tVehicleManager vehicleManager = Singleton<VehicleManager>.instance;\n-\t\t\tushort vehicleId = 0;\n-\t\t\tif (instanceData.m_citizen != 0u) {\n-\t\t\t\tvehicleId = citizenManager.m_citizens.m_buffer[instanceData.m_citizen].m_vehicle;\n-\t\t\t}\n-\t\t\tif (vehicleId != 0) {\n-\t\t\t\tVehicleInfo vehicleInfo = vehicleManager.m_vehicles.m_buffer[(int)vehicleId].Info;\n-\t\t\t\tif (vehicleInfo.m_vehicleType == VehicleInfo.VehicleType.Bicycle) {\n-\t\t\t\t\tvehicleInfo.m_vehicleAI.SimulationStep(vehicleId, ref vehicleManager.m_vehicles.m_buffer[(int)vehicleId], vehicleId, ref vehicleManager.m_vehicles.m_buffer[(int)vehicleId], 0);\n-\t\t\t\t\tvehicleId = 0;\n-\t\t\t\t}\n-\t\t\t}\n-\t\t\tif (vehicleId == 0 && (instanceData.m_flags & (CitizenInstance.Flags.Character | CitizenInstance.Flags.WaitingPath | CitizenInstance.Flags.Blown | CitizenInstance.Flags.Floating)) == CitizenInstance.Flags.None) {\n-\t\t\t\tinstanceData.m_flags &= ~(CitizenInstance.Flags.HangAround | CitizenInstance.Flags.Panicking | CitizenInstance.Flags.SittingDown);\n-\t\t\t\tArriveAtDestination(instanceID, ref instanceData, false);\n-\t\t\t\tcitizenManager.ReleaseCitizenInstance(instanceID);\n-\t\t\t}\n-\t\t}\n-\n-\t\tpublic bool ExtSimulationStep(ushort instanceID, ref CitizenInstance instanceData, ref ExtCitizenInstance extInstance, Vector3 physicsLodRefPos) {\n-\t\t\tIExtCitizenInstanceManager extCitInstMan = Constants.ManagerFactory.ExtCitizenInstanceManager;\n-#if DEBUG\n-\t\t\tbool citDebug = (GlobalConfig.Instance.Debug.CitizenInstanceId == 0 || GlobalConfig.Instance.Debug.CitizenInstanceId == instanceID) &&\n-\t\t\t\t(GlobalConfig.Instance.Debug.CitizenId == 0 || GlobalConfig.Instance.Debug.CitizenId == instanceData.m_citizen) &&\n-\t\t\t\t(GlobalConfig.Instance.Debug.SourceBuildingId == 0 || GlobalConfig.Instance.Debug.SourceBuildingId == instanceData.m_sourceBuilding) &&\n-\t\t\t\t(GlobalConfig.Instance.Debug.TargetBuildingId == 0 || GlobalConfig.Instance.Debug.TargetBuildingId == instanceData.m_targetBuilding)\n-\t\t\t;\n-\t\t\tbool debug = GlobalConfig.Instance.Debug.Switches[2] && citDebug;\n-\t\t\tbool fineDebug = GlobalConfig.Instance.Debug.Switches[4] && citDebug;\n+            }\n #endif\n \n-\t\t\t// check if the citizen has reached a parked car or target\n-\t\t\tif (extInstance.pathMode == ExtPathMode.WalkingToParkedCar || extInstance.pathMode == ExtPathMode.ApproachingParkedCar) {\n-\t\t\t\tushort parkedVehicleId = Singleton<CitizenManager>.instance.m_citizens.m_buffer[instanceData.m_citizen].m_parkedVehicle;\n-\t\t\t\tif (parkedVehicleId == 0) {\n-\t\t\t\t\t// citizen is reaching their parked car but does not own a parked car\n+            // NON-STOCK CODE END\n+            base.SimulationStep(instanceId, ref instanceData, physicsLodRefPos);\n+\n+            VehicleManager vehicleManager = Singleton<VehicleManager>.instance;\n+            ushort vehicleId = 0;\n+            if (instanceData.m_citizen != 0u) {\n+                vehicleId = ctzBuffer[instanceData.m_citizen].m_vehicle;\n+            }\n+\n+            if (vehicleId != 0) {\n+                Vehicle[] vehiclesBuffer = vehicleManager.m_vehicles.m_buffer;\n+                VehicleInfo vehicleInfo = vehiclesBuffer[vehicleId].Info;\n+\n+                if (vehicleInfo.m_vehicleType == VehicleInfo.VehicleType.Bicycle) {\n+                    vehicleInfo.m_vehicleAI.SimulationStep(\n+                        vehicleId,\n+                        ref vehiclesBuffer[vehicleId],\n+                        vehicleId,\n+                        ref vehiclesBuffer[vehicleId],\n+                        0);\n+                    vehicleId = 0;\n+                }\n+            }\n+\n+            if (vehicleId != 0\n+                || (instanceData.m_flags & (CitizenInstance.Flags.Character\n+                                            | CitizenInstance.Flags.WaitingPath\n+                                            | CitizenInstance.Flags.Blown\n+                                            | CitizenInstance.Flags.Floating)) !=\n+                CitizenInstance.Flags.None) {\n+                return;\n+            }\n+\n+            instanceData.m_flags &= ~(CitizenInstance.Flags.HangAround\n+                                      | CitizenInstance.Flags.Panicking\n+                                      | CitizenInstance.Flags.SittingDown);\n+            ArriveAtDestination(instanceId, ref instanceData, false);\n+            citizenManager.ReleaseCitizenInstance(instanceId);\n+        }\n+\n+        public bool ExtSimulationStep(ushort instanceId,\n+                                      ref CitizenInstance instanceData,\n+                                      ref ExtCitizenInstance extInstance,\n+                                      Vector3 physicsLodRefPos) {\n+            IExtCitizenInstanceManager extCitInstMan = Constants.ManagerFactory.ExtCitizenInstanceManager;\n #if DEBUG\n-\t\t\t\t\t\tif (debug)\n-\t\t\t\t\t\t\tLog.Warning($\"CustomHumanAI.ExtSimulationStep({instanceID}): Citizen instance {instanceID} was walking to / reaching their parked car ({extInstance.pathMode}) but parked car has disappeared. RESET.\");\n+            bool citizenDebug\n+                = (DebugSettings.CitizenInstanceId == 0\n+                   || DebugSettings.CitizenInstanceId == instanceId)\n+                  && (DebugSettings.CitizenId == 0\n+                      || DebugSettings.CitizenId == instanceData.m_citizen)\n+                  && (DebugSettings.SourceBuildingId == 0\n+                      || DebugSettings.SourceBuildingId == instanceData.m_sourceBuilding)\n+                  && (DebugSettings.TargetBuildingId == 0\n+                      || DebugSettings.TargetBuildingId == instanceData.m_targetBuilding);\n+            bool logParkingAi = DebugSwitch.BasicParkingAILog.Get() && citizenDebug;\n+            bool extendedLogParkingAi = DebugSwitch.ExtendedParkingAILog.Get() && citizenDebug;\n+#else\n+            var logParkingAi = false;\n+            var extendedLogParkingAi = false;\n #endif\n \n-\t\t\t\t\textCitInstMan.Reset(ref extInstance);\n-\n-\t\t\t\t\tinstanceData.m_flags &= ~CitizenInstance.Flags.WaitingPath;\n-\t\t\t\t\tinstanceData.m_flags &= ~(CitizenInstance.Flags.HangAround | CitizenInstance.Flags.Panicking | CitizenInstance.Flags.SittingDown | CitizenInstance.Flags.Cheering);\n-\t\t\t\t\tthis.InvalidPath(instanceID, ref instanceData);\n-\t\t\t\t\treturn true;\n-\t\t\t\t} else {\n-\t\t\t\t\tParkedCarApproachState approachState = AdvancedParkingManager.Instance.CitizenApproachingParkedCarSimulationStep(instanceID, ref instanceData, ref extInstance, physicsLodRefPos, ref Singleton<VehicleManager>.instance.m_parkedVehicles.m_buffer[parkedVehicleId]);\n-\t\t\t\t\tswitch (approachState) {\n-\t\t\t\t\t\tcase ParkedCarApproachState.None:\n-\t\t\t\t\t\tdefault:\n-\t\t\t\t\t\t\tbreak;\n-\t\t\t\t\t\tcase ParkedCarApproachState.Approaching:\n-\t\t\t\t\t\t\t// citizen approaches their parked car\n-\t\t\t\t\t\t\treturn true;\n-\t\t\t\t\t\tcase ParkedCarApproachState.Approached:\n-\t\t\t\t\t\t\t// citizen reached their parked car\n-#if DEBUG\n-\t\t\t\t\t\t\t\tif (fineDebug)\n-\t\t\t\t\t\t\t\t\tLog._Debug($\"CustomHumanAI.CustomSimulationStep({instanceID}): Citizen instance {instanceID} arrived at parked car. PathMode={extInstance.pathMode}\");\n-#endif\n-\t\t\t\t\t\t\tif (instanceData.m_path != 0) {\n-\t\t\t\t\t\t\t\tSingleton<PathManager>.instance.ReleasePath(instanceData.m_path);\n-\t\t\t\t\t\t\t\tinstanceData.m_path = 0;\n-\t\t\t\t\t\t\t}\n-\t\t\t\t\t\t\tinstanceData.m_flags = instanceData.m_flags & (CitizenInstance.Flags.Created | CitizenInstance.Flags.Cheering | CitizenInstance.Flags.Deleted | CitizenInstance.Flags.Underground | CitizenInstance.Flags.CustomName | CitizenInstance.Flags.Character | CitizenInstance.Flags.BorrowCar | CitizenInstance.Flags.HangAround | CitizenInstance.Flags.InsideBuilding | CitizenInstance.Flags.WaitingPath | CitizenInstance.Flags.TryingSpawnVehicle | CitizenInstance.Flags.CannotUseTransport | CitizenInstance.Flags.Panicking | CitizenInstance.Flags.OnPath | CitizenInstance.Flags.SittingDown | CitizenInstance.Flags.AtTarget | CitizenInstance.Flags.RequireSlowStart | CitizenInstance.Flags.Transition | CitizenInstance.Flags.RidingBicycle | CitizenInstance.Flags.OnBikeLane | CitizenInstance.Flags.CannotUseTaxi | CitizenInstance.Flags.CustomColor | CitizenInstance.Flags.Blown | CitizenInstance.Flags.Floating | CitizenInstance.Flags.TargetFlags);\n-\t\t\t\t\t\t\tif (!this.StartPathFind(instanceID, ref instanceData)) {\n-\t\t\t\t\t\t\t\tinstanceData.Unspawn(instanceID);\n-\t\t\t\t\t\t\t\textCitInstMan.Reset(ref extInstance);\n-\t\t\t\t\t\t\t}\n-\n-\t\t\t\t\t\t\treturn true;\n-\t\t\t\t\t\tcase ParkedCarApproachState.Failure:\n #if DEBUG\n-\t\t\t\t\t\t\t\tif (debug)\n-\t\t\t\t\t\t\t\t\tLog._Debug($\"CustomHumanAI.ExtSimulationStep({instanceID}): Citizen instance {instanceID} failed to arrive at parked car. PathMode={extInstance.pathMode}\");\n+            ExtPathMode logPathMode = extInstance.pathMode;\n+#else\n+            var logPathMode = 0;\n #endif\n-\t\t\t\t\t\t\t// repeat path-finding\n-\t\t\t\t\t\t\tinstanceData.m_flags &= ~CitizenInstance.Flags.WaitingPath;\n-\t\t\t\t\t\t\tinstanceData.m_flags &= ~(CitizenInstance.Flags.HangAround | CitizenInstance.Flags.Panicking | CitizenInstance.Flags.SittingDown | CitizenInstance.Flags.Cheering);\n-\t\t\t\t\t\t\tthis.InvalidPath(instanceID, ref instanceData);\n-\t\t\t\t\t\t\treturn true;\n-\n-\t\t\t\t\t}\n-\t\t\t\t}\n-\t\t\t} else if (extInstance.pathMode == ExtPathMode.WalkingToTarget ||\n-\t\t\t\t\textInstance.pathMode == ExtPathMode.TaxiToTarget\n-\t\t\t) {\n-\t\t\t\tAdvancedParkingManager.Instance.CitizenApproachingTargetSimulationStep(instanceID, ref instanceData, ref extInstance);\n-\t\t\t}\n-\t\t\treturn false;\n-\t\t}\n-\t\t\n-\t\t[RedirectMethod]\n-\t\tpublic bool CustomCheckTrafficLights(ushort nodeId, ushort segmentId) {\n+            switch (extInstance.pathMode) {\n+                // check if the citizen has reached a parked car or target\n+                case ExtPathMode.WalkingToParkedCar:\n+                case ExtPathMode.ApproachingParkedCar: {\n+                    Citizen[] citizensBuffer = Singleton<CitizenManager>.instance.m_citizens.m_buffer;\n+                    ushort parkedVehicleId = citizensBuffer[instanceData.m_citizen].m_parkedVehicle;\n+\n+                    if (parkedVehicleId == 0) {\n+                        // citizen is reaching their parked car but does not own a parked car\n+                        Log._DebugOnlyWarningIf(\n+                            logParkingAi,\n+                            () => $\"CustomHumanAI.ExtSimulationStep({instanceId}): \" +\n+                            $\"Citizen instance {instanceId} was walking to / reaching \" +\n+                            $\"their parked car ({logPathMode}) but parked \" +\n+                            \"car has disappeared. RESET.\");\n+\n+                        extCitInstMan.Reset(ref extInstance);\n+                        instanceData.m_flags &= ~CitizenInstance.Flags.WaitingPath;\n+                        instanceData.m_flags &= ~(CitizenInstance.Flags.HangAround\n+                                                  | CitizenInstance.Flags.Panicking\n+                                                  | CitizenInstance.Flags.SittingDown\n+                                                  | CitizenInstance.Flags.Cheering);\n+                        InvalidPath(instanceId, ref instanceData);\n+                        return true;\n+                    }\n+\n+                    VehicleParked[] parkedVehicles = Singleton<VehicleManager>.instance.m_parkedVehicles.m_buffer;\n+                    ParkedCarApproachState approachState =\n+                        AdvancedParkingManager.Instance.CitizenApproachingParkedCarSimulationStep(\n+                            instanceId,\n+                            ref instanceData,\n+                            ref extInstance,\n+                            physicsLodRefPos,\n+                            ref parkedVehicles[parkedVehicleId]);\n+\n+                    switch (approachState) {\n+                        case ParkedCarApproachState.None:\n+                        default:\n+                            break;\n+                        case ParkedCarApproachState.Approaching:\n+                            // citizen approaches their parked car\n+                            return true;\n+                        case ParkedCarApproachState.Approached: {\n+                            // citizen reached their parked car\n+                            Log._DebugIf(\n+                                extendedLogParkingAi,\n+                                () => $\"CustomHumanAI.CustomSimulationStep({instanceId}): \" +\n+                                $\"Citizen instance {instanceId} arrived at parked car. \" +\n+                                $\"PathMode={logPathMode}\");\n+\n+                            if (instanceData.m_path != 0) {\n+                                Singleton<PathManager>.instance.ReleasePath(instanceData.m_path);\n+                                instanceData.m_path = 0;\n+                            }\n+\n+                            instanceData.m_flags &= CitizenInstance.Flags.Created\n+                                                    | CitizenInstance.Flags.Cheering\n+                                                    | CitizenInstance.Flags.Deleted\n+                                                    | CitizenInstance.Flags.Underground\n+                                                    | CitizenInstance.Flags.CustomName\n+                                                    | CitizenInstance.Flags.Character\n+                                                    | CitizenInstance.Flags.BorrowCar\n+                                                    | CitizenInstance.Flags.HangAround\n+                                                    | CitizenInstance.Flags.InsideBuilding\n+                                                    | CitizenInstance.Flags.WaitingPath\n+                                                    | CitizenInstance.Flags.TryingSpawnVehicle\n+                                                    | CitizenInstance.Flags.CannotUseTransport\n+                                                    | CitizenInstance.Flags.Panicking\n+                                                    | CitizenInstance.Flags.OnPath\n+                                                    | CitizenInstance.Flags.SittingDown\n+                                                    | CitizenInstance.Flags.AtTarget\n+                                                    | CitizenInstance.Flags.RequireSlowStart\n+                                                    | CitizenInstance.Flags.Transition\n+                                                    | CitizenInstance.Flags.RidingBicycle\n+                                                    | CitizenInstance.Flags.OnBikeLane\n+                                                    | CitizenInstance.Flags.CannotUseTaxi\n+                                                    | CitizenInstance.Flags.CustomColor\n+                                                    | CitizenInstance.Flags.Blown\n+                                                    | CitizenInstance.Flags.Floating\n+                                                    | CitizenInstance.Flags.TargetFlags;\n+\n+                            if (StartPathFind(instanceId, ref instanceData)) {\n+                                return true;\n+                            }\n+\n+                            instanceData.Unspawn(instanceId);\n+                            extCitInstMan.Reset(ref extInstance);","path":"TLM/TLM/Custom/AI/CustomHumanAI.cs","position":606,"original_position":606,"commit_id":"cb01465f5b97cb5f893b985b6535d6b42e09387e","original_commit_id":"cb01465f5b97cb5f893b985b6535d6b42e09387e","user":{"login":"kvakvs","id":288724,"node_id":"MDQ6VXNlcjI4ODcyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/288724?v=4","gravatar_id":"","url":"https://api.github.com/users/kvakvs","html_url":"https://github.com/kvakvs","followers_url":"https://api.github.com/users/kvakvs/followers","following_url":"https://api.github.com/users/kvakvs/following{/other_user}","gists_url":"https://api.github.com/users/kvakvs/gists{/gist_id}","starred_url":"https://api.github.com/users/kvakvs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvakvs/subscriptions","organizations_url":"https://api.github.com/users/kvakvs/orgs","repos_url":"https://api.github.com/users/kvakvs/repos","events_url":"https://api.github.com/users/kvakvs/events{/privacy}","received_events_url":"https://api.github.com/users/kvakvs/received_events","type":"User","site_admin":false},"body":"Done. Now this creates Resharper warning: Redundant else","created_at":"2019-07-20T13:44:58Z","updated_at":"2019-07-20T13:44:59Z","html_url":"https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/pull/430#discussion_r305580899","pull_request_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/pulls/430","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/pulls/comments/305580899"},"html":{"href":"https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/pull/430#discussion_r305580899"},"pull_request":{"href":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/pulls/430"}},"in_reply_to_id":305578952},"pull_request":{"url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/pulls/430","id":298155387,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjk4MTU1Mzg3","html_url":"https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/pull/430","diff_url":"https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/pull/430.diff","patch_url":"https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/pull/430.patch","issue_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/issues/430","number":430,"state":"open","locked":false,"title":"C# Source Modernization initiative","user":{"login":"kvakvs","id":288724,"node_id":"MDQ6VXNlcjI4ODcyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/288724?v=4","gravatar_id":"","url":"https://api.github.com/users/kvakvs","html_url":"https://github.com/kvakvs","followers_url":"https://api.github.com/users/kvakvs/followers","following_url":"https://api.github.com/users/kvakvs/following{/other_user}","gists_url":"https://api.github.com/users/kvakvs/gists{/gist_id}","starred_url":"https://api.github.com/users/kvakvs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvakvs/subscriptions","organizations_url":"https://api.github.com/users/kvakvs/orgs","repos_url":"https://api.github.com/users/kvakvs/repos","events_url":"https://api.github.com/users/kvakvs/events{/privacy}","received_events_url":"https://api.github.com/users/kvakvs/received_events","type":"User","site_admin":false},"body":"# NOTE\r\n\r\nThis PR does not add, modify or remove features. This PR features code formatting, logging and quality of life changes to the developer experience.\r\n\r\n## Changes\r\n\r\nThis PR only includes files from `CSUtil.Commons` and `TLM/Custom`\r\n\r\nFor every file in TLM:\r\n- Untabify\r\n- Optimize imports (for FullDebug)\r\n- Format and wrap too long lines, or where StyleCop shows a warning\r\n- Apply minor Resharper suggestions and refactor\r\n  - every `var` becomes explicit type (solves #436, debatable)\r\n  -  `var Xxx` used in `out Xxx` args, are inlined into `out var Xxx` (latest C#)\r\n  - break deep nested if's where possible make the code more flat\r\n  - extract huge code blocks into separate functions\r\n- Get rid of magic constants where possible\r\n- Mark redirected functions as `[UsedImplicitly]` to get rid of the warning\r\n- `#if DEBUG if (condition) Log._Debug #endif` changed to something shorter (solves #349)","created_at":"2019-07-16T18:15:03Z","updated_at":"2019-07-20T13:44:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"19d565374b5a9cbf5f32e3471086e376cbec4461","assignee":{"login":"kvakvs","id":288724,"node_id":"MDQ6VXNlcjI4ODcyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/288724?v=4","gravatar_id":"","url":"https://api.github.com/users/kvakvs","html_url":"https://github.com/kvakvs","followers_url":"https://api.github.com/users/kvakvs/followers","following_url":"https://api.github.com/users/kvakvs/following{/other_user}","gists_url":"https://api.github.com/users/kvakvs/gists{/gist_id}","starred_url":"https://api.github.com/users/kvakvs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvakvs/subscriptions","organizations_url":"https://api.github.com/users/kvakvs/orgs","repos_url":"https://api.github.com/users/kvakvs/repos","events_url":"https://api.github.com/users/kvakvs/events{/privacy}","received_events_url":"https://api.github.com/users/kvakvs/received_events","type":"User","site_admin":false},"assignees":[{"login":"kvakvs","id":288724,"node_id":"MDQ6VXNlcjI4ODcyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/288724?v=4","gravatar_id":"","url":"https://api.github.com/users/kvakvs","html_url":"https://github.com/kvakvs","followers_url":"https://api.github.com/users/kvakvs/followers","following_url":"https://api.github.com/users/kvakvs/following{/other_user}","gists_url":"https://api.github.com/users/kvakvs/gists{/gist_id}","starred_url":"https://api.github.com/users/kvakvs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvakvs/subscriptions","organizations_url":"https://api.github.com/users/kvakvs/orgs","repos_url":"https://api.github.com/users/kvakvs/repos","events_url":"https://api.github.com/users/kvakvs/events{/privacy}","received_events_url":"https://api.github.com/users/kvakvs/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1385744168,"node_id":"MDU6TGFiZWwxMzg1NzQ0MTY4","url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/labels/code-cleanup","name":"code-cleanup","color":"31608e","default":false},{"id":1394664235,"node_id":"MDU6TGFiZWwxMzk0NjY0MjM1","url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/labels/under-review","name":"under-review","color":"26ad2a","default":false}],"milestone":{"url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/milestones/2","html_url":"https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/milestone/2","labels_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/milestones/2/labels","id":4022834,"node_id":"MDk6TWlsZXN0b25lNDAyMjgzNA==","number":2,"title":"11.0","description":"Transition to Harmony library. Major code refactoring and cleanup. API improvements.","creator":{"login":"krzychu124","id":19638970,"node_id":"MDQ6VXNlcjE5NjM4OTcw","avatar_url":"https://avatars2.githubusercontent.com/u/19638970?v=4","gravatar_id":"","url":"https://api.github.com/users/krzychu124","html_url":"https://github.com/krzychu124","followers_url":"https://api.github.com/users/krzychu124/followers","following_url":"https://api.github.com/users/krzychu124/following{/other_user}","gists_url":"https://api.github.com/users/krzychu124/gists{/gist_id}","starred_url":"https://api.github.com/users/krzychu124/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krzychu124/subscriptions","organizations_url":"https://api.github.com/users/krzychu124/orgs","repos_url":"https://api.github.com/users/krzychu124/repos","events_url":"https://api.github.com/users/krzychu124/events{/privacy}","received_events_url":"https://api.github.com/users/krzychu124/received_events","type":"User","site_admin":false},"open_issues":12,"closed_issues":7,"state":"open","created_at":"2019-02-01T20:45:22Z","updated_at":"2019-07-19T23:20:09Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/pulls/430/commits","review_comments_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/pulls/430/comments","review_comment_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/pulls/comments{/number}","comments_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/issues/430/comments","statuses_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/statuses/cb01465f5b97cb5f893b985b6535d6b42e09387e","head":{"label":"kvakvs:419-modernisation","ref":"419-modernisation","sha":"cb01465f5b97cb5f893b985b6535d6b42e09387e","user":{"login":"kvakvs","id":288724,"node_id":"MDQ6VXNlcjI4ODcyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/288724?v=4","gravatar_id":"","url":"https://api.github.com/users/kvakvs","html_url":"https://github.com/kvakvs","followers_url":"https://api.github.com/users/kvakvs/followers","following_url":"https://api.github.com/users/kvakvs/following{/other_user}","gists_url":"https://api.github.com/users/kvakvs/gists{/gist_id}","starred_url":"https://api.github.com/users/kvakvs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvakvs/subscriptions","organizations_url":"https://api.github.com/users/kvakvs/orgs","repos_url":"https://api.github.com/users/kvakvs/repos","events_url":"https://api.github.com/users/kvakvs/events{/privacy}","received_events_url":"https://api.github.com/users/kvakvs/received_events","type":"User","site_admin":false},"repo":{"id":192135944,"node_id":"MDEwOlJlcG9zaXRvcnkxOTIxMzU5NDQ=","name":"Cities-Skylines-Traffic-Manager-President-Edition","full_name":"kvakvs/Cities-Skylines-Traffic-Manager-President-Edition","private":false,"owner":{"login":"kvakvs","id":288724,"node_id":"MDQ6VXNlcjI4ODcyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/288724?v=4","gravatar_id":"","url":"https://api.github.com/users/kvakvs","html_url":"https://github.com/kvakvs","followers_url":"https://api.github.com/users/kvakvs/followers","following_url":"https://api.github.com/users/kvakvs/following{/other_user}","gists_url":"https://api.github.com/users/kvakvs/gists{/gist_id}","starred_url":"https://api.github.com/users/kvakvs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvakvs/subscriptions","organizations_url":"https://api.github.com/users/kvakvs/orgs","repos_url":"https://api.github.com/users/kvakvs/repos","events_url":"https://api.github.com/users/kvakvs/events{/privacy}","received_events_url":"https://api.github.com/users/kvakvs/received_events","type":"User","site_admin":false},"html_url":"https://github.com/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition","description":"Cities: Skylines Traffic Manager: Traffic President Edition","fork":true,"url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition","forks_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/forks","keys_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/teams","hooks_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/hooks","issue_events_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/issues/events{/number}","events_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/events","assignees_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/assignees{/user}","branches_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/branches{/branch}","tags_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/tags","blobs_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/git/refs{/sha}","trees_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/statuses/{sha}","languages_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/languages","stargazers_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/stargazers","contributors_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/contributors","subscribers_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/subscribers","subscription_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/subscription","commits_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/commits{/sha}","git_commits_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/git/commits{/sha}","comments_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/comments{/number}","issue_comment_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/issues/comments{/number}","contents_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/contents/{+path}","compare_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/merges","archive_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/downloads","issues_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/issues{/number}","pulls_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/pulls{/number}","milestones_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/milestones{/number}","notifications_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/labels{/name}","releases_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/releases{/id}","deployments_url":"https://api.github.com/repos/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition/deployments","created_at":"2019-06-16T00:42:28Z","updated_at":"2019-07-16T00:02:58Z","pushed_at":"2019-07-19T01:31:16Z","git_url":"git://github.com/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition.git","ssh_url":"git@github.com:kvakvs/Cities-Skylines-Traffic-Manager-President-Edition.git","clone_url":"https://github.com/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition.git","svn_url":"https://github.com/kvakvs/Cities-Skylines-Traffic-Manager-President-Edition","homepage":"https://steamcommunity.com/sharedfiles/filedetails/?id=1637663252","size":12428,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"krzychu124:master","ref":"master","sha":"ef4fc554016de26e7c468243dc6e3297cba58969","user":{"login":"krzychu124","id":19638970,"node_id":"MDQ6VXNlcjE5NjM4OTcw","avatar_url":"https://avatars2.githubusercontent.com/u/19638970?v=4","gravatar_id":"","url":"https://api.github.com/users/krzychu124","html_url":"https://github.com/krzychu124","followers_url":"https://api.github.com/users/krzychu124/followers","following_url":"https://api.github.com/users/krzychu124/following{/other_user}","gists_url":"https://api.github.com/users/krzychu124/gists{/gist_id}","starred_url":"https://api.github.com/users/krzychu124/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krzychu124/subscriptions","organizations_url":"https://api.github.com/users/krzychu124/orgs","repos_url":"https://api.github.com/users/krzychu124/repos","events_url":"https://api.github.com/users/krzychu124/events{/privacy}","received_events_url":"https://api.github.com/users/krzychu124/received_events","type":"User","site_admin":false},"repo":{"id":99053320,"node_id":"MDEwOlJlcG9zaXRvcnk5OTA1MzMyMA==","name":"Cities-Skylines-Traffic-Manager-President-Edition","full_name":"krzychu124/Cities-Skylines-Traffic-Manager-President-Edition","private":false,"owner":{"login":"krzychu124","id":19638970,"node_id":"MDQ6VXNlcjE5NjM4OTcw","avatar_url":"https://avatars2.githubusercontent.com/u/19638970?v=4","gravatar_id":"","url":"https://api.github.com/users/krzychu124","html_url":"https://github.com/krzychu124","followers_url":"https://api.github.com/users/krzychu124/followers","following_url":"https://api.github.com/users/krzychu124/following{/other_user}","gists_url":"https://api.github.com/users/krzychu124/gists{/gist_id}","starred_url":"https://api.github.com/users/krzychu124/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krzychu124/subscriptions","organizations_url":"https://api.github.com/users/krzychu124/orgs","repos_url":"https://api.github.com/users/krzychu124/repos","events_url":"https://api.github.com/users/krzychu124/events{/privacy}","received_events_url":"https://api.github.com/users/krzychu124/received_events","type":"User","site_admin":false},"html_url":"https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition","description":"Cities: Skylines Traffic Manager: Traffic President Edition","fork":true,"url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition","forks_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/forks","keys_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/keys{/key_id}","collaborators_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/teams","hooks_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/hooks","issue_events_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/issues/events{/number}","events_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/events","assignees_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/assignees{/user}","branches_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/branches{/branch}","tags_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/tags","blobs_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/git/refs{/sha}","trees_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/git/trees{/sha}","statuses_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/statuses/{sha}","languages_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/languages","stargazers_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/stargazers","contributors_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/contributors","subscribers_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/subscribers","subscription_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/subscription","commits_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/commits{/sha}","git_commits_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/git/commits{/sha}","comments_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/comments{/number}","issue_comment_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/issues/comments{/number}","contents_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/contents/{+path}","compare_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/compare/{base}...{head}","merges_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/merges","archive_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/downloads","issues_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/issues{/number}","pulls_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/pulls{/number}","milestones_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/milestones{/number}","notifications_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/labels{/name}","releases_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/releases{/id}","deployments_url":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/deployments","created_at":"2017-08-02T00:02:36Z","updated_at":"2019-07-19T00:08:35Z","pushed_at":"2019-07-19T23:56:13Z","git_url":"git://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition.git","ssh_url":"git@github.com:krzychu124/Cities-Skylines-Traffic-Manager-President-Edition.git","clone_url":"https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition.git","svn_url":"https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition","homepage":"https://steamcommunity.com/sharedfiles/filedetails/?id=1637663252","size":13780,"stargazers_count":54,"watchers_count":54,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":221,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":16,"open_issues":221,"watchers":54,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/pulls/430"},"html":{"href":"https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/pull/430"},"issue":{"href":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/issues/430"},"comments":{"href":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/issues/430/comments"},"review_comments":{"href":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/pulls/430/comments"},"review_comment":{"href":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/pulls/430/commits"},"statuses":{"href":"https://api.github.com/repos/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/statuses/cb01465f5b97cb5f893b985b6535d6b42e09387e"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"kvakvs"}}