Skip to content

Commit

Permalink
TMPE 1.9.0-alpha1
Browse files Browse the repository at this point in the history
- Updated for game version 1.7.0-f1
- Speed limits can be set up for individual lanes with the Control key
- Added monorail support (timed traffic lights & speed limits)
- Several performance improvements
- Unified traffic light toggling feature with game code
- Bugfix: Vehicle restriction and speed limit signs overlay is displayed on the wrong side on inverted road segments
- Bugfix: Influx statistics value is zero
  • Loading branch information
VictorPhilipp committed Apr 9, 2017
1 parent a4382a0 commit c604666
Show file tree
Hide file tree
Showing 62 changed files with 4,623 additions and 4,140 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ A work-in-progress modification for **Cities: Skylines** to add additional traff
User manual: http://www.viathinksoft.de/tmpe

# Changelog
1.9.0-alpha1, 04/09/2017
- Updated for game version 1.7.0-f1
- Speed limits can be set up for individual lanes with the Control key
- Added monorail support (timed traffic lights & speed limits)
- Several performance improvements
- Unified traffic light toggling feature with game code
- Bugfix: Vehicle restriction and speed limit signs overlay is displayed on the wrong side on inverted road segments
- Bugfix: Influx statistics value is zero

1.8.16, 03/20/2017
- Lane connections can now also be removed by pressing the backspace key
- Improved lane selection for busses if the option "Busses may ignore lane arrows" is activated
Expand Down
17 changes: 7 additions & 10 deletions TLM/TLM.sln
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GlobalConfigGenerator", "Gl
{7422AE58-8B0A-401C-9404-F4A438EFFE10} = {7422AE58-8B0A-401C-9404-F4A438EFFE10}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpiralLoopTest", "SpiralLoopTest\SpiralLoopTest.csproj", "{615EF202-3E13-4A15-A82F-594D90CD0ECD}"
ProjectSection(ProjectDependencies) = postProject
{7422AE58-8B0A-401C-9404-F4A438EFFE10} = {7422AE58-8B0A-401C-9404-F4A438EFFE10}
EndProjectSection
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TMUnitTest", "TMUnitTest\TMUnitTest.csproj", "{D0D1848A-9BAE-4121-89A0-66757D16BC73}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -39,12 +36,12 @@ Global
{48D1868B-EE81-4339-95C9-4C5EADEB9ECA}.QueuedStats|Any CPU.Build.0 = QueuedStats|Any CPU
{48D1868B-EE81-4339-95C9-4C5EADEB9ECA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{48D1868B-EE81-4339-95C9-4C5EADEB9ECA}.Release|Any CPU.Build.0 = Release|Any CPU
{615EF202-3E13-4A15-A82F-594D90CD0ECD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{615EF202-3E13-4A15-A82F-594D90CD0ECD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{615EF202-3E13-4A15-A82F-594D90CD0ECD}.QueuedStats|Any CPU.ActiveCfg = QueuedStats|Any CPU
{615EF202-3E13-4A15-A82F-594D90CD0ECD}.QueuedStats|Any CPU.Build.0 = QueuedStats|Any CPU
{615EF202-3E13-4A15-A82F-594D90CD0ECD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{615EF202-3E13-4A15-A82F-594D90CD0ECD}.Release|Any CPU.Build.0 = Release|Any CPU
{D0D1848A-9BAE-4121-89A0-66757D16BC73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D0D1848A-9BAE-4121-89A0-66757D16BC73}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D0D1848A-9BAE-4121-89A0-66757D16BC73}.QueuedStats|Any CPU.ActiveCfg = Release|Any CPU
{D0D1848A-9BAE-4121-89A0-66757D16BC73}.QueuedStats|Any CPU.Build.0 = Release|Any CPU
{D0D1848A-9BAE-4121-89A0-66757D16BC73}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D0D1848A-9BAE-4121-89A0-66757D16BC73}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
2 changes: 2 additions & 0 deletions TLM/TLM/Custom/AI/CustomAmbulanceAI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ public bool CustomStartPathFind(ushort vehicleID, ref Vehicle vehicleData, Vecto
endPosB = default(PathUnit.Position);
}
uint path;
// NON-STOCK CODE START
if (CustomPathManager._instance.CreatePath(vehicleType, vehicleID, ExtCitizenInstance.ExtPathType.None, out path, ref Singleton<SimulationManager>.instance.m_randomizer, Singleton<SimulationManager>.instance.m_currentBuildIndex, startPosA, startPosB, endPosA, endPosB, NetInfo.LaneType.Vehicle | NetInfo.LaneType.TransportVehicle, info.m_vehicleType, 20000f, this.IsHeavyVehicle(), this.IgnoreBlocked(vehicleID, ref vehicleData), false, false)) {
// NON-STOCK CODE END
#if USEPATHWAITCOUNTER
VehicleState state = VehicleStateManager.Instance._GetVehicleState(vehicleID);
state.PathWaitCounter = 0;
Expand Down
11 changes: 3 additions & 8 deletions TLM/TLM/Custom/AI/CustomBuildingAI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,9 @@ public class CustomBuildingAI : BuildingAI {
public Color CustomGetColor(ushort buildingID, ref Building data, InfoManager.InfoMode infoMode) {
// NON-STOCK CODE START
if (Options.prohibitPocketCars) {
if (infoMode == InfoManager.InfoMode.Traffic) {
// parking space demand info view
ExtBuilding extBuilding = ExtBuildingManager.Instance.GetExtBuilding(buildingID);
return Color.Lerp(Singleton<InfoManager>.instance.m_properties.m_modeProperties[(int)infoMode].m_targetColor, Singleton<InfoManager>.instance.m_properties.m_modeProperties[(int)infoMode].m_negativeColor, Mathf.Clamp01((float)extBuilding.ParkingSpaceDemand * 0.01f));
} else if (infoMode == InfoManager.InfoMode.Transport && !(data.Info.m_buildingAI is DepotAI)) {
// public transport demand info view
ExtBuilding extBuilding = ExtBuildingManager.Instance.GetExtBuilding(buildingID);
return Color.Lerp(Singleton<InfoManager>.instance.m_properties.m_modeProperties[(int)InfoManager.InfoMode.Traffic].m_targetColor, Singleton<InfoManager>.instance.m_properties.m_modeProperties[(int)InfoManager.InfoMode.Traffic].m_negativeColor, Mathf.Clamp01((float)(TrafficManagerTool.CurrentTransportDemandViewMode == TransportDemandViewMode.Outgoing ? extBuilding.OutgoingPublicTransportDemand : extBuilding.IncomingPublicTransportDemand) * 0.01f));
Color? color;
if (AdvancedParkingManager.Instance.GetBuildingInfoViewColor(buildingID, ref data, infoMode, out color)) {
return (Color)color;
}
}
// NON-STOCK CODE END
Expand Down
14 changes: 3 additions & 11 deletions TLM/TLM/Custom/AI/CustomBusAI.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#define PATHRECALCx

using ColossalFramework;
using ColossalFramework;
using System;
using System.Collections.Generic;
using System.Text;
Expand All @@ -17,11 +15,6 @@ public bool CustomStartPathFind(ushort vehicleID, ref Vehicle vehicleData, Vecto
//Log._Debug($"CustomBusAI.CustomStartPathFind called for vehicle {vehicleID}");
#endif

#if PATHRECALC
VehicleState state = VehicleStateManager._GetVehicleState(vehicleID);
bool recalcRequested = state.PathRecalculationRequested;
state.PathRecalculationRequested = false;
#endif
VehicleInfo info = this.m_info;
bool allowUnderground = (vehicleData.m_flags & (Vehicle.Flags.Underground | Vehicle.Flags.Transition)) != 0;
PathUnit.Position startPosA;
Expand All @@ -41,15 +34,14 @@ public bool CustomStartPathFind(ushort vehicleID, ref Vehicle vehicleData, Vecto
endPosB = default(PathUnit.Position);
}
uint path;
// NON-STOCK CODE START
if (CustomPathManager._instance.CreatePath(
#if PATHRECALC
recalcRequested,
#endif
ExtVehicleType.Bus, vehicleID, ExtCitizenInstance.ExtPathType.None, out path, ref Singleton<SimulationManager>.instance.m_randomizer, Singleton<SimulationManager>.instance.m_currentBuildIndex, startPosA, startPosB, endPosA, endPosB, NetInfo.LaneType.Vehicle | NetInfo.LaneType.TransportVehicle, info.m_vehicleType, 20000f, this.IsHeavyVehicle(), this.IgnoreBlocked(vehicleID, ref vehicleData), false, false)) {
#if USEPATHWAITCOUNTER
VehicleState state = VehicleStateManager.Instance._GetVehicleState(vehicleID);
state.PathWaitCounter = 0;
#endif
// NON-STOCK CODE END

if (vehicleData.m_path != 0u) {
Singleton<PathManager>.instance.ReleasePath(vehicleData.m_path);
Expand Down
Loading

0 comments on commit c604666

Please sign in to comment.