diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md new file mode 100644 index 000000000..e788ff605 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -0,0 +1,36 @@ +--- +name: Bug Report +about: Help us understand what we need to fix. +labels: bug, triage +--- + + + +### Description + + +### Reproduction Steps +Add more steps as nessecary. +1. +2. +3. + +### Mod List +Please list the mods enabled when you noticed the bug. +- TM:PE xx.xx +- +- + +### Output Log + + + +### Savegame (Optional) + + + +### Screenshots (Optional) + + + +### Additional Info diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md new file mode 100644 index 000000000..3ae6d87ed --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -0,0 +1,20 @@ +--- +name: Feature Request +about: Make suggestions on how TM:PE could improve. +labels: feature, triage +--- + + + +### Description + + +### Sources / Links (Optional) + + + +### Screenshots (Optional) + + + +### Additional Info diff --git a/.github/ISSUE_TEMPLATE/translation-update.md b/.github/ISSUE_TEMPLATE/translation-update.md new file mode 100644 index 000000000..44e982895 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/translation-update.md @@ -0,0 +1,18 @@ +--- +name: Translation Update +about: Help us make TM:PE available for everyone, no matter what language. +labels: localisation, triage +--- + + + +### Language to be Updated + + +### Localization File +If you're familiar with github, go ahead and send us a Pull Request instead of submitting this issue. +If you're not, click below then drag-and-drop your translation file to upload it here. Alternatively, you can paste the URL to the file below. + + + +### Additional Info diff --git a/CHANGELOG.md b/CHANGELOG.md index 737a17665..5bdb514a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,19 @@ # Cities: Skylines - Traffic Manager: *President Edition* [![Discord](https://img.shields.io/discord/545065285862948894.svg)](https://discord.gg/faKUnST) # Changelog +10.20, 21/05/2019 +- Updated for game version 1.12.0-f5 +- Updated Korean translation (thanks Twotoolus-FLY-LShst) (#294) +- Updated French translation (thanks PierreTSE) (#311) + +10.19, 20/04/2019 +- Bugfix: Mod options overlapping issue (#250, #266). +- Added: Japanese language (thanks mashitaro) (#258). +- Update: Chinese language (thanks Emphasia) (#285, #286). +- Update: "Vanilla Trees Remover" as incompatible mod (it breaks mod options screen) (#271, #290). +- Update: Moved "Delete" step button on timed traffic lights (#283, #285). +- Update: Mod incompatibility checker can now be disabled, or skip disabled mods (#264, #284, #286). + 10.18, 29/03/2019 - Bugfix: Parking AI: Cars do not spawn at outside connections (#245) - Bugfix: Trams perform turns on red (#248) diff --git a/README.md b/README.md index 75abcb214..491d07f82 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# Traffic Manager: *President Edition* [![Discord](https://img.shields.io/discord/545065285862948894.svg)](https://discord.gg/faKUnST) [![Build status](https://ci.appveyor.com/api/projects/status/dehkvuxk8b3h66e7/branch/master?svg=true)](https://ci.appveyor.com/project/krzychu124/cities-skylines-traffic-manager-president-edition/branch/master) +# Traffic Manager: *President Edition* [![Steam](https://img.shields.io/endpoint.svg?url=https://shieldsio-steam-workshop.jross.me/583429740)](https://steamcommunity.com/sharedfiles/filedetails/?id=583429740) [![Discord](https://img.shields.io/discord/545065285862948894.svg?logo=discord&logoColor=F5F5F5)](https://discord.gg/faKUnST) [![Build status](https://ci.appveyor.com/api/projects/status/dehkvuxk8b3h66e7/branch/master?svg=true)](https://ci.appveyor.com/project/krzychu124/cities-skylines-traffic-manager-president-edition/branch/master) A mod for **Cities: Skylines** that gives you more control over road and rail traffic in your city. -[Steam Workshop](https://steamcommunity.com/sharedfiles/filedetails/?id=1637663252) • [Installation](https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/wiki/Installation) • [User Guide](http://www.viathinksoft.de/tmpe/wiki) • [Issue Tracker](https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/issues) • [Report a Bug](https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/wiki/Report-a-Bug) +[Steam Workshop](https://steamcommunity.com/sharedfiles/filedetails/?id=583429740) • [Discord Guild](https://discord.gg/faKUnST) • [Installation](https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/wiki/Installation) • [User Guide](http://www.viathinksoft.de/tmpe/wiki) • [Issue Tracker](https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/issues) • [Report a Bug](https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/wiki/Report-a-Bug) # Features @@ -22,10 +22,10 @@ A mod for **Cities: Skylines** that gives you more control over road and rail tr * Clear traffic, stuck cims, etc. # Changelog -### [10.18](https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/compare/10.17...10.18), 29/03/2019 -- Bugfix: Parking AI: Cars do not spawn at outside connections (#245) -- Bugfix: Trams perform turns on red (#248) -- Update: Service Radius Adjuster mod by Egi removed from incompatible mods list (#255) +### [10.20](https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/compare/10.19...10.20), 21/05/2019 +- Updated for game version 1.12.0-f5 +- Updated Korean translation (thanks Twotoolus-FLY-LShst) (#294) +- Updated French translation (thanks PierreTSE) (#311) See [Full Changelog](https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/blob/master/CHANGELOG.md) for details of earlier releases. @@ -37,8 +37,22 @@ Contact us: * [Issue tracker](https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/issues) * [Discord (chat)](https://discord.gg/faKUnST) -* [Steam Workshop](https://steamcommunity.com/sharedfiles/filedetails/?id=1637663252) +* [Steam Workshop (Stable)](https://steamcommunity.com/sharedfiles/filedetails/?id=583429740) +* [Steam Workshop (Labs)](https://steamcommunity.com/sharedfiles/filedetails/?id=1637663252) # License [MIT License](https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/blob/master/LICENSE) (open source) + +# Notice + +The TM:PE team is happy to support you if you have any issues with the mod under the following conditions: +- You are using the latest version of the STABLE and/or LABS mod. +- You are using a properly purchased version of Cities: Skylines. + +We will not provide support if: +- You are using a pirated version of Cities: Skylines. +- You are using an older version of the mod. +- You are using an older version of Cities: Skylines. + +TM:PE is only tested on and updated for the latest version of Cities: Skylines. diff --git a/TLM/TLM/Custom/AI/CustomPostVanAI.cs b/TLM/TLM/Custom/AI/CustomPostVanAI.cs new file mode 100644 index 000000000..86ee385b8 --- /dev/null +++ b/TLM/TLM/Custom/AI/CustomPostVanAI.cs @@ -0,0 +1,115 @@ +using ColossalFramework; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using TrafficManager.Custom.PathFinding; +using TrafficManager.Traffic; +using TrafficManager.Traffic.Data; +using UnityEngine; +using static TrafficManager.Custom.PathFinding.CustomPathManager; + +namespace TrafficManager.Custom.AI { + public class CustomPostVanAI : CarAI { + public bool CustomStartPathFind(ushort vehicleID, ref Vehicle vehicleData, Vector3 startPos, Vector3 endPos, bool startBothWays, bool endBothWays, bool undergroundTarget) { + if (vehicleData.m_transferType == (byte)TransferManager.TransferReason.Mail) { + return base.StartPathFind(vehicleID, ref vehicleData, startPos, endPos, startBothWays, endBothWays, undergroundTarget); + } + + if ((vehicleData.m_flags & (Vehicle.Flags.TransferToSource | Vehicle.Flags.GoingBack)) != 0) { + return base.StartPathFind(vehicleID, ref vehicleData, startPos, endPos, startBothWays, endBothWays, undergroundTarget); + } + + bool allowUnderground = (vehicleData.m_flags & (Vehicle.Flags.Underground | Vehicle.Flags.Transition)) != (Vehicle.Flags)0; + PathUnit.Position startPosA = default(PathUnit.Position); + PathUnit.Position startPosB = default(PathUnit.Position); + float startDistSqrA = default(float); + float startDistSqrB = default(float); + + // try to find road start position + bool startPosFound = CustomPathManager.FindPathPosition(startPos, ItemClass.Service.Road, NetInfo.LaneType.Vehicle | NetInfo.LaneType.TransportVehicle, VehicleInfo.VehicleType.Car, allowUnderground, false, 32f, out startPosA, out startPosB, out startDistSqrA, out startDistSqrB); + + // try to find other start position (plane, train, ship) + PathUnit.Position altStartPosA = default(PathUnit.Position); + PathUnit.Position altStartPosB = default(PathUnit.Position); + float altStartDistSqrA = default(float); + float altStartDistSqrB = default(float); + if (PathManager.FindPathPosition(startPos, ItemClass.Service.PublicTransport, NetInfo.LaneType.Vehicle, VehicleInfo.VehicleType.Train | VehicleInfo.VehicleType.Ship | VehicleInfo.VehicleType.Plane, allowUnderground, false, 32f, out altStartPosA, out altStartPosB, out altStartDistSqrA, out altStartDistSqrB)) { + if (!startPosFound || (altStartDistSqrA < startDistSqrA && (Mathf.Abs(startPos.x) > 4800f || Mathf.Abs(startPos.z) > 4800f))) { + startPosA = altStartPosA; + startPosB = altStartPosB; + startDistSqrA = altStartDistSqrA; + startDistSqrB = altStartDistSqrB; + } + startPosFound = true; + } + + PathUnit.Position endPosA = default(PathUnit.Position); + PathUnit.Position endPosB = default(PathUnit.Position); + float endDistSqrA = default(float); + float endDistSqrB = default(float); + + // try to find road end position + bool endPosFound = PathManager.FindPathPosition(endPos, ItemClass.Service.Road, NetInfo.LaneType.Vehicle | NetInfo.LaneType.TransportVehicle, VehicleInfo.VehicleType.Car, undergroundTarget, false, 32f, out endPosA, out endPosB, out endDistSqrA, out endDistSqrB); + + // try to find other end position (plane, train, ship) + PathUnit.Position altEndPosA = default(PathUnit.Position); + PathUnit.Position altEndPosB = default(PathUnit.Position); + float altEndDistSqrA = default(float); + float altEndDistSqrB = default(float); + if (PathManager.FindPathPosition(endPos, ItemClass.Service.PublicTransport, NetInfo.LaneType.Vehicle, VehicleInfo.VehicleType.Train | VehicleInfo.VehicleType.Ship | VehicleInfo.VehicleType.Plane, undergroundTarget, false, 32f, out altEndPosA, out altEndPosB, out altEndDistSqrA, out altEndDistSqrB)) { + if (!endPosFound || (altEndDistSqrA < endDistSqrA && (Mathf.Abs(endPos.x) > 4800f || Mathf.Abs(endPos.z) > 4800f))) { + endPosA = altEndPosA; + endPosB = altEndPosB; + endDistSqrA = altEndDistSqrA; + endDistSqrB = altEndDistSqrB; + } + endPosFound = true; + } + + if (startPosFound && endPosFound) { + CustomPathManager pathManager = CustomPathManager._instance; + if (!startBothWays || startDistSqrA < 10f) { + startPosB = default(PathUnit.Position); + } + if (!endBothWays || endDistSqrA < 10f) { + endPosB = default(PathUnit.Position); + } + uint path; + + PathCreationArgs args; + args.extPathType = ExtCitizenInstance.ExtPathType.None; + args.extVehicleType = ExtVehicleType.Service; + args.vehicleId = vehicleID; + args.spawned = (vehicleData.m_flags & Vehicle.Flags.Spawned) != 0; + args.buildIndex = Singleton.instance.m_currentBuildIndex; + args.startPosA = startPosA; + args.startPosB = startPosB; + args.endPosA = endPosA; + args.endPosB = endPosB; + args.vehiclePosition = default(PathUnit.Position); + args.laneTypes = NetInfo.LaneType.Vehicle | NetInfo.LaneType.CargoVehicle; + args.vehicleTypes = VehicleInfo.VehicleType.Car | VehicleInfo.VehicleType.Train | VehicleInfo.VehicleType.Ship | VehicleInfo.VehicleType.Plane; + args.maxLength = 20000f; + args.isHeavyVehicle = this.IsHeavyVehicle(); + args.hasCombustionEngine = this.CombustionEngine(); + args.ignoreBlocked = this.IgnoreBlocked(vehicleID, ref vehicleData); + args.ignoreFlooded = false; + args.ignoreCosts = false; + args.randomParking = false; + args.stablePath = false; + args.skipQueue = (vehicleData.m_flags & Vehicle.Flags.Spawned) != 0; + + if (pathManager.CreatePath(out path, ref Singleton.instance.m_randomizer, args)) { + if (vehicleData.m_path != 0) { + pathManager.ReleasePath(vehicleData.m_path); + } + vehicleData.m_path = path; + vehicleData.m_flags |= Vehicle.Flags.WaitingPath; + return true; + } + } + return false; + } + } +} diff --git a/TLM/TLM/Custom/PathFinding/CustomPathFind2.cs b/TLM/TLM/Custom/PathFinding/CustomPathFind2.cs index ccc859e57..fbcff6bef 100644 --- a/TLM/TLM/Custom/PathFinding/CustomPathFind2.cs +++ b/TLM/TLM/Custom/PathFinding/CustomPathFind2.cs @@ -414,7 +414,12 @@ private void PathFindImplementation(uint unit, ref PathUnit data) { } #if DEBUG - if (m_debug) { + bool detourMissing = (m_vehicleTypes & (VehicleInfo.VehicleType.Car | VehicleInfo.VehicleType.Train | VehicleInfo.VehicleType.Tram | VehicleInfo.VehicleType.Monorail | VehicleInfo.VehicleType.Metro)) != VehicleInfo.VehicleType.None && !m_queueItem.queued; + if (detourMissing) { + Log.Warning($"Path-finding for unhandled vehicle requested!"); + } + + if (m_debug || detourMissing) { Debug(unit, $"PathFindImplementation: Preparing calculation:\n" + $"\tbufferItemStartA: segment={bufferItemStartA.m_position.m_segment} lane={bufferItemStartA.m_position.m_lane} off={bufferItemStartA.m_position.m_offset} laneId={bufferItemStartA.m_laneID}\n" + $"\tbufferItemStartB: segment={bufferItemStartB.m_position.m_segment} lane={bufferItemStartB.m_position.m_lane} off={bufferItemStartB.m_position.m_offset} laneId={bufferItemStartB.m_laneID}\n" + diff --git a/TLM/TLM/LoadingExtension.cs b/TLM/TLM/LoadingExtension.cs index 717cd5c51..3d2f5fd1c 100644 --- a/TLM/TLM/LoadingExtension.cs +++ b/TLM/TLM/LoadingExtension.cs @@ -2266,6 +2266,28 @@ public void initDetours() { detourFailed = true; } + Log.Info("Redirection PostVanAI::StartPathFind calls"); + try { + Detours.Add(new Detour(typeof(PostVanAI).GetMethod("StartPathFind", + BindingFlags.NonPublic | BindingFlags.Instance, + null, + new[] + { + typeof (ushort), + typeof (Vehicle).MakeByRefType(), + typeof (Vector3), + typeof (Vector3), + typeof (bool), + typeof (bool), + typeof (bool) + }, + null), + typeof(CustomPostVanAI).GetMethod("CustomStartPathFind"))); + } catch (Exception) { + Log.Error("Could not redirect PostVanAI::StartPathFind"); + detourFailed = true; + } + Log.Info("Redirection RoadBaseAI::SetTrafficLightState calls"); try { Detours.Add(new Detour(typeof(RoadBaseAI).GetMethod("SetTrafficLightState", diff --git a/TLM/TLM/Manager/Impl/OptionsManager.cs b/TLM/TLM/Manager/Impl/OptionsManager.cs index 93afe71d7..8d88a21af 100644 --- a/TLM/TLM/Manager/Impl/OptionsManager.cs +++ b/TLM/TLM/Manager/Impl/OptionsManager.cs @@ -130,7 +130,7 @@ public bool LoadData(byte[] data) { } if (data.Length >= 28) { - Options.setRealisticSpeeds(data[27] == (byte)1); + Options.setIndividualDrivingStyle(data[27] == (byte)1); } if (data.Length >= 29) { @@ -221,7 +221,7 @@ public byte[] SaveData(ref bool success) { (byte)(Options.junctionRestrictionsEnabled ? 1 : 0), (byte)(Options.prohibitPocketCars ? 1 : 0), (byte)(Options.preferOuterLane ? 1 : 0), - (byte)(Options.realisticSpeeds ? 1 : 0), + (byte)(Options.individualDrivingStyle ? 1 : 0), (byte)(Options.evacBussesMayIgnoreRules ? 1 : 0), (byte)(Options.instantEffects ? 1 : 0), (byte)(Options.parkingRestrictionsEnabled ? 1 : 0), diff --git a/TLM/TLM/Manager/Impl/VehicleBehaviorManager.cs b/TLM/TLM/Manager/Impl/VehicleBehaviorManager.cs index 693a2fc78..7d13a3803 100644 --- a/TLM/TLM/Manager/Impl/VehicleBehaviorManager.cs +++ b/TLM/TLM/Manager/Impl/VehicleBehaviorManager.cs @@ -694,18 +694,11 @@ public uint GetStaticVehicleRand(ushort vehicleId) { } public uint GetTimedVehicleRand(ushort vehicleId) { - uint intv = VehicleState.MAX_TIMED_RAND / 2u; - uint range = intv * (uint)(vehicleId % (100u / intv)); // is one of [0, 50] - uint step = VehicleStateManager.Instance.VehicleStates[vehicleId].timedRand; - if (step >= intv) { - step = VehicleState.MAX_TIMED_RAND - step; - } - - return range + step; + return (uint)(vehicleId % 2) * 50u + VehicleStateManager.Instance.VehicleStates[vehicleId].timedRand; } public float ApplyRealisticSpeeds(float speed, ushort vehicleId, ref VehicleState state, VehicleInfo vehicleInfo) { - if (Options.realisticSpeeds) { + if (Options.individualDrivingStyle) { float vehicleRand = 0.01f * (float)GetTimedVehicleRand(vehicleId); if (vehicleInfo.m_isLargeVehicle) { speed *= 0.75f + vehicleRand * 0.25f; // a little variance, 0.75 .. 1 @@ -751,6 +744,9 @@ public int FindBestLane(ushort vehicleId, ref Vehicle vehicleData, ref VehicleSt Log._Debug($"VehicleBehaviorManager.FindBestLane({vehicleId}): currentLaneId={currentLaneId}, currentPathPos=[seg={currentPathPos.m_segment}, lane={currentPathPos.m_lane}, off={currentPathPos.m_offset}] next1PathPos=[seg={next1PathPos.m_segment}, lane={next1PathPos.m_lane}, off={next1PathPos.m_offset}] next2PathPos=[seg={next2PathPos.m_segment}, lane={next2PathPos.m_lane}, off={next2PathPos.m_offset}] next3PathPos=[seg={next3PathPos.m_segment}, lane={next3PathPos.m_lane}, off={next3PathPos.m_offset}] next4PathPos=[seg={next4PathPos.m_segment}, lane={next4PathPos.m_lane}, off={next4PathPos.m_offset}]"); } #endif + if (!vehicleState.dlsReady) { + vehicleState.UpdateDynamicLaneSelectionParameters(); + } if (vehicleState.lastAltLaneSelSegmentId == currentPathPos.m_segment) { #if DEBUG @@ -763,6 +759,7 @@ public int FindBestLane(ushort vehicleId, ref Vehicle vehicleData, ref VehicleSt vehicleState.lastAltLaneSelSegmentId = currentPathPos.m_segment; bool recklessDriver = vehicleState.recklessDriver; + float maxReservedSpace = vehicleState.maxReservedSpace; // cur -> next1 float vehicleLength = 1f + vehicleState.totalLength; @@ -1168,7 +1165,7 @@ public int FindBestLane(ushort vehicleId, ref Vehicle vehicleData, ref VehicleSt #endif Services.NetService.ProcessLane(next1BackTransitions[j].laneId, delegate (uint prevLaneId, ref NetLane prevLane) { - prevLanesClear = prevLane.GetReservedSpace() <= (recklessDriver ? conf.DynamicLaneSelection.MaxRecklessReservedSpace : conf.DynamicLaneSelection.MaxReservedSpace); + prevLanesClear = prevLane.GetReservedSpace() <= maxReservedSpace; return true; }); @@ -1213,8 +1210,8 @@ public int FindBestLane(ushort vehicleId, ref Vehicle vehicleData, ref VehicleSt float relMeanSpeedInPercent = meanSpeed / (TrafficMeasurementManager.REF_REL_SPEED / TrafficMeasurementManager.REF_REL_SPEED_PERCENT_DENOMINATOR); float randSpeed = 0f; - if (conf.DynamicLaneSelection.LaneSpeedRandInterval > 0) { - randSpeed = Services.SimulationService.Randomizer.Int32((uint)conf.DynamicLaneSelection.LaneSpeedRandInterval + 1u) - conf.DynamicLaneSelection.LaneSpeedRandInterval / 2f; + if (vehicleState.laneSpeedRandInterval > 0) { + randSpeed = Services.SimulationService.Randomizer.Int32((uint)vehicleState.laneSpeedRandInterval + 1u) - vehicleState.laneSpeedRandInterval / 2f; relMeanSpeedInPercent += randSpeed; } @@ -1312,14 +1309,14 @@ public int FindBestLane(ushort vehicleId, ref Vehicle vehicleData, ref VehicleSt // decide if vehicle should stay or change // vanishing lane change opportunity detection - int vehSel = vehicleId % 6; + int vehSel = vehicleId % 12; #if DEBUG if (debug) { Log._Debug($"VehicleBehaviorManager.FindBestLane({vehicleId}): vehMod4={vehSel} numReachableNext2Lanes={numReachableNext2Lanes} numReachableNext3Lanes={numReachableNext3Lanes}"); } #endif - if ((numReachableNext3Lanes == 1 && vehSel <= 2) || // 3/6 % of all vehicles will change lanes 3 segments in front - (numReachableNext2Lanes == 1 && vehSel <= 4) // 2/6 % of all vehicles will change lanes 2 segments in front, 1/5 will change at the last opportunity + if ((numReachableNext3Lanes == 1 && vehSel <= 5) || // 50% of all vehicles will change lanes 3 segments in front + (numReachableNext2Lanes == 1 && vehSel <= 9) // 33% of all vehicles will change lanes 2 segments in front, 16.67% will change at the last opportunity ) { // vehicle must reach a certain lane since lane changing opportunities will vanish @@ -1360,7 +1357,7 @@ public int FindBestLane(ushort vehicleId, ref Vehicle vehicleData, ref VehicleSt return bestStayNext1LaneIndex; } - if (bestStayTotalLaneDist != bestOptTotalLaneDist && Math.Max(bestStayTotalLaneDist, bestOptTotalLaneDist) > conf.DynamicLaneSelection.MaxOptLaneChanges) { + if (bestStayTotalLaneDist != bestOptTotalLaneDist && Math.Max(bestStayTotalLaneDist, bestOptTotalLaneDist) > vehicleState.maxOptLaneChanges) { /* * best route contains more lane changes than allowed: choose lane with the least number of future lane changes */ @@ -1397,8 +1394,8 @@ public int FindBestLane(ushort vehicleId, ref Vehicle vehicleData, ref VehicleSt Log._Debug($"VehicleBehaviorManager.FindBestLane({vehicleId}): a lane change for speed improvement is possible. optImprovementInKmH={optImprovementInKmH} km/h speedDiff={speedDiff} (bestOptMeanSpeed={bestOptMeanSpeed}, vehicleCurVelocity={vehicleCurSpeed}, foundSafeLaneChange={foundSafeLaneChange})"); } #endif - if (optImprovementInKmH >= conf.DynamicLaneSelection.MinSafeSpeedImprovement && - (foundSafeLaneChange || (speedDiff <= conf.DynamicLaneSelection.MaxUnsafeSpeedDiff)) + if (optImprovementInKmH >= vehicleState.minSafeSpeedImprovement && + (foundSafeLaneChange || (speedDiff <= vehicleState.maxUnsafeSpeedDiff)) ) { // speed improvement is significant #if DEBUG @@ -1424,7 +1421,7 @@ public int FindBestLane(ushort vehicleId, ref Vehicle vehicleData, ref VehicleSt Log._Debug($"VehicleBehaviorManager.FindBestLane({vehicleId}): found a lane change that optimizes overall traffic. optimization={optimization}%"); } #endif - if (optimization >= conf.DynamicLaneSelection.MinSafeTrafficImprovement) { + if (optimization >= vehicleState.minSafeTrafficImprovement) { // traffic optimization is significant #if DEBUG if (debug) { diff --git a/TLM/TLM/Manager/Impl/VehicleStateManager.cs b/TLM/TLM/Manager/Impl/VehicleStateManager.cs index 188f6c32e..1dfaf04a5 100644 --- a/TLM/TLM/Manager/Impl/VehicleStateManager.cs +++ b/TLM/TLM/Manager/Impl/VehicleStateManager.cs @@ -58,8 +58,6 @@ protected void LogTraffic(ushort vehicleId, ref VehicleState state) { } #endif - state.StepRand(); - TrafficMeasurementManager.Instance.AddTraffic(state.currentSegmentId, state.currentLaneIndex #if MEASUREDENSITY , length diff --git a/TLM/TLM/Resources/lang.txt b/TLM/TLM/Resources/lang.txt index 1d56d62d1..68534b7ca 100644 --- a/TLM/TLM/Resources/lang.txt +++ b/TLM/TLM/Resources/lang.txt @@ -150,7 +150,7 @@ Reset_global_configuration Reset global configuration General General Gameplay Gameplay Overlays Overlays -Realistic_speeds Realistic speeds +Individual_driving_styles Individual driving styles Evacuation_busses_may_ignore_traffic_rules Evacuation buses may ignore traffic rules Evacuation_busses_may_only_be_used_to_reach_a_shelter Evacuation buses may only be used to reach a shelter Vehicle_behavior Vehicle behavior @@ -222,10 +222,13 @@ Compact_main_menu Compact main menu Window_transparency Window transparency Overlay_transparency Overlay transparency Remove_this_citizen Remove this citizen -Show_error_message_if_a_mod_incompatibility_is_detected Show error message if a mod incompatibility is detected Remove_parked_vehicles Remove parked vehicles Node_is_level_crossing This junction is a level crossing.\nYou cannot disable traffic lights here. Experimental_features Experimental features Turn_on_red Turn on red Vehicles_may_turn_on_red Vehicles may turn at red traffic lights -Also_apply_to_left/right_turns_between_one-way_streets Also apply to left & right turns between one-way streets \ No newline at end of file +Also_apply_to_left/right_turns_between_one-way_streets Also apply to left & right turns between one-way streets +Scan_for_known_incompatible_mods_on_startup Scan for known incompatible mods on startup +Ignore_disabled_mods Ignore disabled mods +Traffic_Manager_detected_incompatible_mods Traffic Manager detected incompatible mods +Notify_me_if_there_is_an_unexpected_mod_conflict Notify me if there is an unexpected mod conflict \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_de.txt b/TLM/TLM/Resources/lang_de.txt index f8d3f2962..63b2c749a 100644 --- a/TLM/TLM/Resources/lang_de.txt +++ b/TLM/TLM/Resources/lang_de.txt @@ -150,7 +150,7 @@ Reset_global_configuration Globale Konfiguration zurücksetzen General Allgemein Gameplay Gameplay Overlays Overlays -Realistic_speeds Realistische Geschwindigkeiten +Individual_driving_styles Individuelle Fahrstile Evacuation_busses_may_ignore_traffic_rules Evakuierungsbusse dürfen Verkehrsregeln missachten Evacuation_busses_may_only_be_used_to_reach_a_shelter Evakuierungsbusse dienen nur zum Erreichen einer Notunterkunft Vehicle_behavior Fahrzeugverhalten @@ -222,10 +222,13 @@ Compact_main_menu Kompaktes Hauptmenü Window_transparency Fenstertransparenz Overlay_transparency Overlaytransparenz Remove_this_citizen Diesen Cim entfernen -Show_error_message_if_a_mod_incompatibility_is_detected Zeige Fehlermeldung, wenn eine Mod-Inkompatibilität erkannt wurde Remove_parked_vehicles Entferne geparkte Autos Node_is_level_crossing Diese Kreuzung ist ein Bahnübergang.\nDu kannst die Ampeln hier nicht entfernen. Experimental_features Experimentelle Features Turn_on_red Turn on red Vehicles_may_turn_on_red Fahrzeuge dürfen an roten Ampeln abbiegen -Also_apply_to_left/right_turns_between_one-way_streets Gilt auch für Links- & Rechtskurven zwischen Einbahnstraßen \ No newline at end of file +Also_apply_to_left/right_turns_between_one-way_streets Gilt auch für Links- & Rechtskurven zwischen Einbahnstraßen +Scan_for_known_incompatible_mods_on_startup Scan for known incompatible mods on startup +Ignore_disabled_mods Ignore disabled mods +Traffic_Manager_detected_incompatible_mods Traffic Manager detected incompatible mods +Notify_me_if_there_is_an_unexpected_mod_conflict Zeige Fehlermeldung, wenn eine Mod-Inkompatibilität erkannt wurde \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_es.txt b/TLM/TLM/Resources/lang_es.txt index cfeb903c2..21457ec8a 100644 --- a/TLM/TLM/Resources/lang_es.txt +++ b/TLM/TLM/Resources/lang_es.txt @@ -150,7 +150,7 @@ Reset_global_configuration Restablecer configuración global General General Gameplay Jugabilidad Overlays Capas de información -Realistic_speeds Velocidades realistas +Individual_driving_styles Individual driving styles Evacuation_busses_may_ignore_traffic_rules Los buses de evacuación pueden ignorar reglas de tránsito Evacuation_busses_may_only_be_used_to_reach_a_shelter Los buses de evacuación sólo pueden usarse para llegar a un refugio Vehicle_behavior Comportamiento vehícular @@ -222,10 +222,13 @@ Compact_main_menu Compact main menu Window_transparency Window transparency Overlay_transparency Overlay transparency Remove_this_citizen Remove this citizen -Show_error_message_if_a_mod_incompatibility_is_detected Show error message if a mod incompatibility is detected Remove_parked_vehicles Remove parked vehicles Node_is_level_crossing This junction is a level crossing.\nYou cannot disable traffic lights here. Experimental_features Experimental features Turn_on_red Turn on red Vehicles_may_turn_on_red Los vehículos pueden girar en los semáforos rojos. -Also_apply_to_left/right_turns_between_one-way_streets Also apply to left & right turns between one-way streets \ No newline at end of file +Also_apply_to_left/right_turns_between_one-way_streets Also apply to left & right turns between one-way streets +Scan_for_known_incompatible_mods_on_startup Scan for known incompatible mods on startup +Ignore_disabled_mods Ignore disabled mods +Traffic_Manager_detected_incompatible_mods Traffic Manager detected incompatible mods +Notify_me_if_there_is_an_unexpected_mod_conflict Notify me if there is an unexpected mod conflict \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_fr.txt b/TLM/TLM/Resources/lang_fr.txt index a91c80690..b40634d4b 100644 --- a/TLM/TLM/Resources/lang_fr.txt +++ b/TLM/TLM/Resources/lang_fr.txt @@ -13,18 +13,18 @@ Select_nodes Sélectionnez des intersections Node Intersection Deselect_all_nodes Désélectionner toutes les intersections Setup_timed_traffic_light Créer un chronométrage des feux -State Etat +State État Skip Passer up haut down bas View Voir Edit Modifier Delete Suppr. -Timed_traffic_lights_manager Gestionnaire de Feux tricolores chronométrés +Timed_traffic_lights_manager Gestionnaire de feux tricolores chronométrés Add_step Ajouter un état Remove_timed_traffic_light Retirer le chronométrage -Min._Time: Temps Min: -Max._Time: Temps Max: +Min._Time: Temps Min : +Max._Time: Temps Max : Save Sauvegarder Add Ajouter Sensitivity Sensibilité @@ -57,12 +57,12 @@ Enable_Advanced_Vehicle_AI Activer l'IA avancée des véhicules Vehicles_may_enter_blocked_junctions Les véhicules peuvent entrer dans les intersections bloquées All_vehicles_may_ignore_lane_arrows Tous les véhicules peuvent ignorer les directions des voies Busses_may_ignore_lane_arrows Les bus peuvent ignorer les directions des voies -Reckless_driving Conduite téméraire (fonctionnalité Bêta) -TMPE_Title Traffic Manager: Edition Président +Reckless_driving Conduite téméraire +TMPE_Title Gestionnaire de trafic : Édition Président Settings_are_defined_for_each_savegame_separately Paramètres définis pour chaque sauvegarde séparément Simulation_accuracy Précision de la simulation (une plus haute précision réduit les performances) Enable_highway_specific_lane_merging/splitting_rules Activer les règles spécifiques de divergence/convergence sur les autoroutes -Drivers_want_to_change_lanes_(only_applied_if_Advanced_AI_is_enabled): Les conducteurs veulent changer de voies: (seulement si l'IA avancée est activée) +Drivers_want_to_change_lanes_(only_applied_if_Advanced_AI_is_enabled): Les conducteurs veulent changer de voies (seulement si l'IA avancée est activée) : Maintenance Maintenance Very_often Très souvent Often Souvent @@ -70,15 +70,15 @@ Sometimes Parfois Rarely Rarement Very_rarely Très rarement Only_if_necessary Seulement si nécessaire -Nodes_and_segments Nœuds et segments +Nodes_and_segments Intersections et segments Lanes Voies Path_Of_Evil_(10_%) Chemin du Mal (10 %) -Rush_Hour_(5_%) Heures de Pointe (5 %) +Rush_Hour_(5_%) Heure de Pointe (5 %) Minor_Complaints_(2_%) Plaintes mineures (2 %) Holy_City_(0_%) Ville Sainte (0 %) Forget_toggled_traffic_lights Oublier les feux tricolores retirés -Road_is_already_in_a_group! Cette route est déjà dans un groupe ! -All_selected_roads_must_be_of_the_same_type! Toutes les routes sélectionnées doivent être du même type! +Road_is_already_in_a_group! Cette route est déjà dans un groupe ! +All_selected_roads_must_be_of_the_same_type! Toutes les routes sélectionnées doivent être du même type ! Create_group Créer un groupe Delete_group Supprimer un groupe Add_zoning Ajouter le zonage @@ -95,26 +95,26 @@ Vehicles_may_do_u-turns_at_junctions Les véhicules peuvent faire demi-tour aux Vehicles_going_straight_may_change_lanes_at_junctions Les véhicules allant tout droit peuvent changer de voie aux intersections Allow_u-turns Autoriser les demi-tours Allow_lane_changing_for_vehicles_going_straight Autoriser le changement de voie pour les véhicules allant tout droit -Allow_vehicles_to_enter_a_blocked_junction Autoriser les véhicules à entrer dans une jonction bloquée -Road_condition_has_a_bigger_impact_on_vehicle_speed La condition de la voirie a une plus grand impact sur la vitesse des véhicules +Allow_vehicles_to_enter_a_blocked_junction Autoriser les véhicules à entrer dans une intersection bloquée +Road_condition_has_a_bigger_impact_on_vehicle_speed La condition de la voirie a un plus grand impact sur la vitesse des véhicules Vehicle_restrictions Restrictions des véhicules Copy Copier Paste Coller Invert Inverser -Apply_vehicle_restrictions_to_all_road_segments_between_two_junctions Appliquer les restrictions de véhicules à tous les segments de route entre deux jonctions +Apply_vehicle_restrictions_to_all_road_segments_between_two_junctions Appliquer les restrictions de véhicules à tous les segments de route entre deux intersections Allow_all_vehicles Autoriser tous les véhicules -Ban_all_vehicles Bannir tous les véhicules +Ban_all_vehicles Interdire tous les véhicules Set_all_traffic_lights_to_red Mettre tous les feux au rouge Rotate_left Rotation vers la gauche Rotate_right Rotation vers la droite Name Nommer Apply Appliquer -Select_a_timed_traffic_light_program Sélectionner un programme de chronométrage de feux -The_chosen_traffic_light_program_is_incompatible_to_this_junction Le modèle de chronométrage choisi est incompatible avec cette jonction +Select_a_timed_traffic_light_program Sélectionner un programme de chronométrage des feux +The_chosen_traffic_light_program_is_incompatible_to_this_junction Le modèle de chronométrage choisi est incompatible avec cette intersection Advanced_AI_cannot_be_activated L'IA avancée ne peut pas être activée -The_Advanced_Vehicle_AI_cannot_be_activated L'IA avancée de véhicule ne peut être activée car vous utilisez déjà un autre mod qui modifie modifie le comportement des véhicules (par exemple Improved AI ou Traffic++). +The_Advanced_Vehicle_AI_cannot_be_activated L'IA des véhicules avancée ne peut être activée car vous utilisez déjà un autre mod qui modifie le comportement des véhicules (par exemple Improved AI ou Traffic++). Enable_dynamic_path_calculation Activer le calcul dynamique des chemins -Lane_Arrow_Changer_Disabled_Connection Le modificateur des directions de voies est désactivé pour cette voie car vous avez manuellement créé des connections de voies. +Lane_Arrow_Changer_Disabled_Connection Le modificateur des directions de voies est désactivé pour cette voie car vous avez manuellement créé des connexions de voies. Lane_connector Connecteur de voies Connected_lanes Voies connectées Use_alternative_view_mode Utiliser le mode de vue alternatif @@ -124,11 +124,11 @@ Unit_system Système d'unités Metric Système métrique Imperial Système impérial Use_more_CPU_cores_for_route_calculation_if_available Utiliser plus de cœurs du CPU pour le calcul de trajets (si disponible) -Activated_features caractéristiques activées -Junction_restrictions Restrictions de jonction -Prohibit_spawning_of_pocket_cars Prohibit spawning of pocket cars +Activated_features Fonctionnalités activées +Junction_restrictions Restrictions des intersections +Prohibit_spawning_of_pocket_cars Empêcher l'apparition de voitures de poche Reset_stuck_cims_and_vehicles Réinit. citoyens et véhicules coincés -Default_speed_limits Limites des vitesse par défaut +Default_speed_limits Limites de vitesse par défaut Looking_for_a_parking_spot Cherche une place de stationnement Driving_to_a_parking_spot Se dirige vers un stationnement Driving_to_another_parking_spot Se dirige vers un autre stationnement @@ -136,11 +136,11 @@ Entering_vehicle Entre dans un véhicule Walking_to_car Se dirige vers une voiture Using_public_transport Utilise les transports en commun Walking Marche -Thinking_of_a_good_parking_spot Réfléchi à un bon stationnement +Thinking_of_a_good_parking_spot Réfléchit à un bon stationnement Switch_view Changer de vue Outgoing_demand Demande sortante Incoming_demand Demande entrante -Advanced_Vehicle_AI IA avancée des véhicules +Advanced_Vehicle_AI IA des véhicules avancée Heavy_trucks_prefer_outer_lanes_on_highways Les véhicules lourds préfèrent les voies extérieures sur les autoroutes Parking_AI IA de stationnement Enable_more_realistic_parking Activer le stationnement plus réaliste @@ -150,14 +150,14 @@ Reset_global_configuration Réinitialiser la config. globale General Général Gameplay Gameplay Overlays Interface -Realistic_speeds Vitesses réalistes -Evacuation_busses_may_ignore_traffic_rules Les bus d'évacuation peuvent ignorer les règles de traffic -Evacuation_busses_may_only_be_used_to_reach_a_shelter Les bus d'évacuation peuvent peut-être n'être utilisés que pour atteindre un abri +Individual_driving_styles Individual driving styles +Evacuation_busses_may_ignore_traffic_rules Les bus d'évacuation peuvent ignorer les règles de trafic +Evacuation_busses_may_only_be_used_to_reach_a_shelter Les bus d'évacuation ne peuvent être utilisés que pour atteindre un abri Vehicle_behavior Comportement des véhicules Policies_&_Restrictions Restrictions et politiques -At_junctions Aux jonctions +At_junctions Aux intersections In_case_of_emergency En cas d'urgence -Show_lane-wise_speed_limits Voir limites de vitesse par voie +Show_lane-wise_speed_limits Afficher les limites de vitesse par voie Language Langue Game_language Langue du jeu requires_game_restart nécessite le redémarrage du jeu @@ -165,7 +165,7 @@ Customizations_come_into_effect_instantaneously Les personnalisations prennent e Options Options Lock_main_menu_button_position Verrouiller la position du bouton du menu principal Lock_main_menu_position Verrouiller la position du menu principal -Recalculating_lane_routing Recalcul en cours des routing des voies +Recalculating_lane_routing Recalcul des itinéraires en cours Please_wait Merci de patienter Parking_restrictions Restrictions de stationnement Simulation Simulation @@ -175,57 +175,60 @@ default par défaut flow_ratio ratio de mouvement wait_ratio ratio d'attente After_min._time_has_elapsed_switch_to_next_step_if Après le temps minimum écoulé, passez à l'étape suivante si -Adaptive_step_switching Commutation d'étape adaptive +Adaptive_step_switching Commutation d'étape adaptative Dynamic_lane_section Sélection de voie dynamique Percentage_of_vehicles_performing_dynamic_lane_section Pourcentage de véhicules effectuant une sélection de voie dynamique Vehicle_restrictions_aggression Restrictions agressives des véhicules Strict Stricte -Show_path-find_stats Afficher le chemin d'acès des stats +Show_path-find_stats Afficher le chemin d'accès des stats Remove_this_vehicle Retirer ce véhicule -Vehicles_follow_priority_rules_at_junctions_with_timed_traffic_lights Les véhicules suivent les règles de priorité aux carrefours avec des feux de circulations temporiés -Enable_tutorial_messages Activier les messages du didactitiel -TMPE_TUTORIAL_HEAD_MainMenu Gestionnaire de traffic : Édition Président -TMPE_TUTORIAL_BODY_MainMenu Bienvenue à TM:PE !\n\nManuel d'utilisateur : http://www.viathinksoft.de/tmpe +Vehicles_follow_priority_rules_at_junctions_with_timed_traffic_lights Les véhicules suivent les règles de priorité aux carrefours avec des feux de circulations chronométrés +Enable_tutorial_messages Activer les messages du didactitiel +TMPE_TUTORIAL_HEAD_MainMenu Gestionnaire de trafic : Édition Président +TMPE_TUTORIAL_BODY_MainMenu Bienvenue sur TM:PE !\n\nManuel d'utilisateur : http://www.viathinksoft.de/tmpe TMPE_TUTORIAL_HEAD_JunctionRestrictionsTool Restrictions aux carrefours -TMPE_TUTORIAL_BODY_JunctionRestrictionsTool Comment contrôler le comportement des véhicules et des piétons aux carrefours.\n\n1. Cliquer sur le carrefour que vous voulez gérer\n2. Cliquez sur l'icône appropriée pour basculer entre les restrictions.\n\nRestrictions disponibles :\n- Autoriser/Interdire le changement de voie pour que le véhicule continue tout droit\n- Autoriser/Interdire les demi-tours\n- Autoriser/Interdire aux véhicules d'entrer dans un carrefour bloqué\n- Autoriser/Interdire aux pietons de traverser la rue -TMPE_TUTORIAL_HEAD_LaneArrowTool Flèche des voies de circulation +TMPE_TUTORIAL_BODY_JunctionRestrictionsTool Comment contrôler le comportement des véhicules et des piétons aux carrefours.\n\n1. Cliquez sur le carrefour que vous voulez gérer\n2. Cliquez sur l'icône appropriée pour basculer entre les restrictions.\n\nRestrictions disponibles :\n- Autoriser/Interdire le changement de voie pour que le véhicule continue tout droit\n- Autoriser/Interdire les demi-tours\n- Autoriser/Interdire aux véhicules d'entrer dans un carrefour bloqué\n- Autoriser/Interdire aux pietons de traverser la rue +TMPE_TUTORIAL_HEAD_LaneArrowTool Flèches directionnelles TMPE_TUTORIAL_BODY_LaneArrowTool Restreindre l'ensemble des directions que les véhicules sont autorisés à prendre.\n\n1. Cliquez sur un segment de route à côté d'une intersection\n2. Sélectionnez les directions autorisées. TMPE_TUTORIAL_HEAD_LaneConnectorTool Connecteur des voies de circulation -TMPE_TUTORIAL_BODY_LaneConnectorTool Reliez deux ou plusieurs voies entre elles afin de déterminer les voies que les véhicules peuvent utiliser.\n\n1. Cliquez sur une intersection (cercles gris).\n2. Cliquez sur un marqueur de source.\n3. Cliquez sur un marqueur cible pour le relier au marqueur source.\n4. Cliquez n'importe où avec votre bouton secondaire de la souris pour revenir à la sélection du marqueur source.\n\nTouches de raccourci disponibles :\n\n- Supprimer ou Retour arrière : Supprimer toutes les connexions de voie\n- Shift + S : Parcourez tous les modèles disponibles "rester sur la voie" +TMPE_TUTORIAL_BODY_LaneConnectorTool Reliez deux ou plusieurs voies entre elles afin de déterminer les voies que les véhicules peuvent utiliser.\n\n1. Cliquez sur une intersection (cercles gris).\n2. Cliquez sur un marqueur de source.\n3. Cliquez sur un marqueur cible pour le relier au marqueur source.\n4. Cliquez n'importe où avec le bouton secondaire de la souris pour revenir à la sélection du marqueur source.\n\nTouches de raccourci disponibles :\n\n- Supprimer ou Retour arrière : Supprimer toutes les connexions de voie\n- Shift + S : Parcourir tous les modèles "rester sur la voie" disponibles TMPE_TUTORIAL_HEAD_ManualTrafficLightsTool Manuel des feux de circulation TMPE_TUTORIAL_BODY_ManualTrafficLightsTool Essayez les feux de circulation personnalisés.\n\n1. Cliquez sur une intersection\n2. Utilisez l'outil pour contrôler les feux de circulation. TMPE_TUTORIAL_HEAD_ParkingRestrictionsTool Restrictions de stationnement -TMPE_TUTORIAL_BODY_ParkingRestrictionsTool Contrôler où le stationnement est autorisé.\n\nCliquez sur les icônes "P".\n\nTouches de raccourci disponibles :\n\n- Shift : Maintenez la touche enfoncée tout en cliquant pour appliquer des restrictions de stationnement à plusieurs segments de route à la fois +TMPE_TUTORIAL_BODY_ParkingRestrictionsTool Contrôler où le stationnement est autorisé.\n\nCliquez sur les icônes "P".\n\nTouches de raccourci disponibles :\n\n- Shift : Maintenez la touche enfoncée tout en cliquant pour appliquer des restrictions de stationnement à plusieurs segments de route à la fois TMPE_TUTORIAL_HEAD_PrioritySignsTool Signes prioritaires -TMPE_TUTORIAL_BODY_PrioritySignsTool Définir les règles de priorité aux intersations.\n\n1. Cliquer sur l'intersection.\n2. Cliquez sur les cercles vides pour parcourir les panneaux de priorité disponibles (route prioritaire, cédez le passage, stop, vide).\n\nTouches de raccourci disponibles :\n\n- Shift : Maintenez la touche Maj enfoncée pour ajouter des signes de priorité à plusieurs segments de route à la fois. Cliquez à nouveau tout en maintenant la touche Maj enfoncée pour parcourir tous les motifs disponibles. +TMPE_TUTORIAL_BODY_PrioritySignsTool Définir les règles de priorité aux intersections.\n\n1. Cliquer sur l'intersection.\n2. Cliquez sur les cercles vides pour parcourir les panneaux de priorité disponibles (route prioritaire, cédez-le-passage, stop, vide).\n\nTouches de raccourci disponibles :\n\n- Shift : Maintenez la touche Maj enfoncée pour ajouter des signes de priorité à plusieurs segments de route à la fois. Cliquez à nouveau tout en maintenant la touche Maj enfoncée pour parcourir tous les modèles disponibles. TMPE_TUTORIAL_HEAD_SpeedLimitsTool Limites de vitesse -TMPE_TUTORIAL_BODY_SpeedLimitsTool Configurer les restrictions de limitation de vitesse.\n\n1. Dans la fenêtre, cliquez sur la limite de vitesse que vous souhaitez définir.\n2. Cliquez sur un segment de route pour changer la limitation de vitesse.\n\nTouches de raccourci disponibles :\n\n- Shift : Maintenez la touche Maj enfoncée tout en cliquant pour appliquer des limitations de vitesse à plusieurs segments de route à la fois.\n- Ctrl : Maintenez la touche Ctrl enfoncée pour contrôler les limitations de vitesse par voie individuelle. +TMPE_TUTORIAL_BODY_SpeedLimitsTool Configurer les restrictions de limitation de vitesse.\n\n1. Dans la fenêtre, cliquez sur la limite de vitesse que vous souhaitez définir.\n2. Cliquez sur un segment de route pour changer la limitation de vitesse.\n\nTouches de raccourci disponibles :\n\n- Shift : Maintenez la touche Maj enfoncée tout en cliquant pour appliquer des limitations de vitesse à plusieurs segments de route à la fois.\n- Ctrl : Maintenez la touche Ctrl enfoncée pour contrôler les limitations de vitesse par voie individuelle. TMPE_TUTORIAL_HEAD_TimedTrafficLightsTool Feux de circulation chronométrés -TMPE_TUTORIAL_BODY_TimedTrafficLightsTool Mettre en place des feux de circulation chronométrés.\n\n1. Cliquez sur une intersection.\n2. Dans la fenêtre, cliquez sur "Ajouter une étape".\n3. Cliquez sur les éléments de superposition pour définir les états de feux de circulation souhaités.\n4. Cliquez sur "Ajouter".\n5. Répétez comme vous le désiré. +TMPE_TUTORIAL_BODY_TimedTrafficLightsTool Mettre en place des feux de circulation chronométrés.\n\n1. Cliquez sur une intersection.\n2. Dans la fenêtre, cliquez sur "Ajouter une étape".\n3. Cliquez sur les éléments de superposition pour définir les états de feux de circulation souhaités.\n4. Cliquez sur "Ajouter".\n5. Répétez comme vous le désirez. TMPE_TUTORIAL_HEAD_ToggleTrafficLightsTool Basculer les feux de circulation -TMPE_TUTORIAL_BODY_ToggleTrafficLightsTool Ajouter ou supprimer des feux de circulation/aux intersections.\n\nCliquez sur une intersection pour basculer les feux de circulation.. +TMPE_TUTORIAL_BODY_ToggleTrafficLightsTool Ajouter ou supprimer des feux de circulation aux intersections.\n\nCliquez sur une intersection pour basculer l'état des feux de circulation. TMPE_TUTORIAL_HEAD_VehicleRestrictionsTool Restrictions de véhicules -TMPE_TUTORIAL_BODY_VehicleRestrictionsTool Interdire les véhicules sur certaines portion de route.\n\n1. Cliquez sur une portion ou segment de route.\n2. Cliquez sur les icônes pour faire basculer les restrictions.\n\nDistinction des types de véhicules :\n\n- Véhicules routiers : Voitures de tourisme, autobus, taxis, camions de fret, véhicules de service, véhicules d'urgence\n- Véhicules ferroviaires : Trains de voyageurs, trains de marchandises\n\nTouches de raccourci disponibles :\n\n- Shift : Maintenez la touche Maj enfoncée tout en cliquant pour appliquer des restrictions à plusieurs portions ou segments de route à la fois. +TMPE_TUTORIAL_BODY_VehicleRestrictionsTool Interdire les véhicules sur certaines portions de route.\n\n1. Cliquez sur une portion ou segment de route.\n2. Cliquez sur les icônes pour faire basculer les restrictions.\n\nDistinction des types de véhicules :\n\n- Véhicules routiers : Voitures de tourisme, autobus, taxis, camions de fret, véhicules de service, véhicules d'urgence\n- Véhicules ferroviaires : Trains de voyageurs, trains de marchandises\n\nTouches de raccourci disponibles :\n\n- Shift : Maintenez la touche Maj enfoncée tout en cliquant pour appliquer des restrictions à plusieurs portions ou segments de route à la fois. TMPE_TUTORIAL_HEAD_SpeedLimitsTool_Defaults Limites de vitesse par défaut TMPE_TUTORIAL_BODY_SpeedLimitsTool_Defaults 1. Utilisez les flèches dans la moitié supérieure pour parcourir tous les types de routes.\n2. Dans la moitié inférieure, sélectionnez une limite de vitesse.\n3. Cliquez sur "Enregistrer" pour définir la limite de vitesse sélectionnée par défaut pour les futurs segments de route du type sélectionné. Cliquez sur "Enregistrer et appliquer" pour également mettre à jour toutes les routes existantes du type sélectionné. -TMPE_TUTORIAL_HEAD_TimedTrafficLightsTool_AddStep Ajouter une étape chronométrée -TMPE_TUTORIAL_BODY_TimedTrafficLightsTool_AddStep 1. Pendant le jeu, cliquez sur les feux de circulation pour changer leur état. Utilisez le bouton "Changer de mode" pour ajouter des feux de circulation directionnels.\n2. Entrez à la fois une durée minimale et maximale pour l'étape. Après le temps minimum écoulé, le feu de circulation comptera et comparera les véhicules qui approchent.\n3. En option, sélectionnez un type de changement d'étape. Par défaut, l'étape change si à peu près moins de véhicules roulent qu'en attente.\n4. En option, ajustez la sensibilité de la lumière. Par exemple, déplacez le curseur vers la gauche pour rendre le feu de circulation temporisé moins sensible pour les véhicules en attente. -TMPE_TUTORIAL_HEAD_TimedTrafficLightsTool_Copy Copier un feu de circulation minuté -TMPE_TUTORIAL_BODY_TimedTrafficLightsTool_Copy Cliquez sur un autre carrefour pour coller le feu de circulation chronométré.\n\nCliquez n'importe où avec votre bouton secondaire de la souris pour annuler l'opération. -TMPE_TUTORIAL_HEAD_TimedTrafficLightsTool_AddJunction Ajouter à l'intersection ou au carrefour un feu de circulation minuté -TMPE_TUTORIAL_BODY_TimedTrafficLightsTool_AddJunction Cliquez sur une autre intersection pour l'ajouter. Les deux lumières seront jointes de sorte que le programme chronométré contrôlera ensuite les deux intersections à la fois.\n\nCliquez n'importe où avec votre bouton secondaire de la souris pour annuler l'opération. -TMPE_TUTORIAL_HEAD_TimedTrafficLightsTool_RemoveJunction Retirer à l'intersection le feu de circulation minuté -TMPE_TUTORIAL_BODY_TimedTrafficLightsTool_RemoveJunction Cliquez sur l'une des jonctions contrôlées par ce programme temporisé. Le feu de signalisation sélectionné sera supprimé de telle sorte que le programme chronométré ne le gérera plus.\n\nCliquez n'importe où avec votre bouton secondaire de la souris pour annuler l'opération. +TMPE_TUTORIAL_HEAD_TimedTrafficLightsTool_AddStep Ajouter une étape chronométrée +TMPE_TUTORIAL_BODY_TimedTrafficLightsTool_AddStep 1. Pendant le jeu, cliquez sur les feux de circulation pour changer leur état. Utilisez le bouton "Changer de mode" pour ajouter des feux de circulation directionnels.\n2. Entrez à la fois une durée minimale et maximale pour l'étape. Après le temps minimum écoulé, le feu de circulation comptera et comparera les véhicules qui approchent.\n3. En option, sélectionnez un type de changement d'étape. Par défaut, l'étape change si à peu près moins de véhicules sont en train de rouler qu'en attente.\n4. En option, ajustez la sensibilité du feu. Par exemple, déplacez le curseur vers la gauche pour le rendre moins sensible aux véhicules en attente. +TMPE_TUTORIAL_HEAD_TimedTrafficLightsTool_Copy Copier un feu de circulation chronométré +TMPE_TUTORIAL_BODY_TimedTrafficLightsTool_Copy Cliquez sur un autre carrefour pour coller le feu de circulation chronométré.\n\nCliquez n'importe où avec le bouton secondaire de la souris pour annuler l'opération. +TMPE_TUTORIAL_HEAD_TimedTrafficLightsTool_AddJunction Ajouter une intersection à un feu de circulation chronométré +TMPE_TUTORIAL_BODY_TimedTrafficLightsTool_AddJunction Cliquez sur une autre intersection pour l'ajouter. Les deux feux seront associés de sorte que le programme chronométré contrôlera ensuite les deux intersections à la fois.\n\nCliquez n'importe où avec le bouton secondaire de la souris pour annuler l'opération. +TMPE_TUTORIAL_HEAD_TimedTrafficLightsTool_RemoveJunction Retirer une intersection d'un feu de circulation chronométré +TMPE_TUTORIAL_BODY_TimedTrafficLightsTool_RemoveJunction Cliquez sur l'une des intersections contrôlées par ce programme chronométré. Le feu sélectionné sera supprimé de telle sorte que le programme chronométré ne le gérera plus.\n\nCliquez n'importe où avec le bouton secondaire de la souris pour annuler l'opération. Public_transport Transport public Prevent_excessive_transfers_at_public_transport_stations Empêcher les transferts inutiles dans les stations de transport public Compact_main_menu Menu principal compact -Window_transparency Fenêtre transparente -Overlay_transparency Superposition de transparence +Window_transparency Transparence de la fenêtre +Overlay_transparency Transparence de l'interface Remove_this_citizen Retirer ce citoyen -Show_error_message_if_a_mod_incompatibility_is_detected Afficher le message d'erreur si une incompatibilité d'un mod est détectée -Remove_parked_vehicles Enlever les véhicules stationnés -Node_is_level_crossing Cette intersection est un passage à niveau.\nous ne pouvez pas désactiver les feux de circulation ici. -Experimental_features Experimental features +Remove_parked_vehicles Retirer les véhicules stationnés +Node_is_level_crossing Cette intersection est un passage à niveau.\nVous ne pouvez pas désactiver les feux de circulation ici. +Experimental_features Fonctionnalités expérimentales Turn_on_red Tourner aux feux rouges Vehicles_may_turn_on_red Les véhicules peuvent tourner aux feux rouges -Also_apply_to_left/right_turns_between_one-way_streets Also apply to left & right turns between one-way streets \ No newline at end of file +Also_apply_to_left/right_turns_between_one-way_streets Appliquer de même aux virages gauche/droite entre des rues à sens unique +Scan_for_known_incompatible_mods_on_startup Rechercher les mods incompatibles au lancement +Ignore_disabled_mods Ignorer les mods désactivés +Traffic_Manager_detected_incompatible_mods Le gestionnaire de trafic a détecté des mods incompatibles +Notify_me_if_there_is_an_unexpected_mod_conflict Afficher un message d'erreur si un mod incompatible est détecté diff --git a/TLM/TLM/Resources/lang_it.txt b/TLM/TLM/Resources/lang_it.txt index 7c3307c27..a4f86a030 100644 --- a/TLM/TLM/Resources/lang_it.txt +++ b/TLM/TLM/Resources/lang_it.txt @@ -150,7 +150,7 @@ Reset_global_configuration Resetta configurazione globale General Generale Gameplay Gameplay Overlays Overlays -Realistic_speeds Velocità realistica dei veicoli +Individual_driving_styles Individual driving styles Evacuation_busses_may_ignore_traffic_rules I bus di evacuazione possono ignorare le regole stradali Evacuation_busses_may_only_be_used_to_reach_a_shelter I bus di evacuazione possono essere usati solo per raggiungere un rifugio Vehicle_behavior Comportamente del veicolo @@ -222,10 +222,13 @@ Compact_main_menu Compact main menu Window_transparency Window transparency Overlay_transparency Overlay transparency Remove_this_citizen Remove this citizen -Show_error_message_if_a_mod_incompatibility_is_detected Show error message if a mod incompatibility is detected Remove_parked_vehicles Remove parked vehicles Node_is_level_crossing This junction is a level crossing.\nYou cannot disable traffic lights here. Experimental_features Experimental features Turn_on_red Girare ai semafori rossi Vehicles_may_turn_on_red I veicoli possono girare ai semafori rossi -Also_apply_to_left/right_turns_between_one-way_streets Also apply to left & right turns between one-way streets \ No newline at end of file +Also_apply_to_left/right_turns_between_one-way_streets Also apply to left & right turns between one-way streets +Scan_for_known_incompatible_mods_on_startup Scan for known incompatible mods on startup +Ignore_disabled_mods Ignore disabled mods +Traffic_Manager_detected_incompatible_mods Traffic Manager detected incompatible mods +Notify_me_if_there_is_an_unexpected_mod_conflict Notify me if there is an unexpected mod conflict \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_ja.txt b/TLM/TLM/Resources/lang_ja.txt index 86f171a40..fdbd694c5 100644 --- a/TLM/TLM/Resources/lang_ja.txt +++ b/TLM/TLM/Resources/lang_ja.txt @@ -113,119 +113,122 @@ Select_a_timed_traffic_light_program 時間設定付き信号のプログラム The_chosen_traffic_light_program_is_incompatible_to_this_junction 選択された信号パターンはこの交差点と互換性がありません Advanced_AI_cannot_be_activated Advanced Vehicle AIは有効にできません The_Advanced_Vehicle_AI_cannot_be_activated Advanced Vehicle AIは、車両の振る舞いを変える他のMOD(例えばImproved AIやTraffic++)を既に使っているため、有効にできません. -Enable_dynamic_path_calculation Enable dynamic path calculation -Lane_Arrow_Changer_Disabled_Connection The lane arrow changer for this lane is disabled because you have created lane connections by hand. -Lane_connector Lane connector -Connected_lanes Connected lanes -Use_alternative_view_mode Use alternative view mode -Road_type Road type -Default_speed_limit Default speed limit -Unit_system Unit system -Metric Metric -Imperial Imperial -Use_more_CPU_cores_for_route_calculation_if_available Use more CPU cores for route calculation (if available) -Activated_features Activated features -Junction_restrictions Junction restrictions -Prohibit_spawning_of_pocket_cars Prohibit spawning of pocket cars -Reset_stuck_cims_and_vehicles Reset stuck cims and vehicles -Default_speed_limits Default speed limits -Looking_for_a_parking_spot Looking for a parking spot -Driving_to_a_parking_spot Driving to a parking spot -Driving_to_another_parking_spot Driving to another parking spot -Entering_vehicle Entering vehicle -Walking_to_car Walking to car -Using_public_transport Using public transport -Walking Walking -Thinking_of_a_good_parking_spot Thinking of a good parking spot -Switch_view Switch view -Outgoing_demand Outgoing demand -Incoming_demand Incoming demand -Advanced_Vehicle_AI Advanced Vehicle AI -Heavy_trucks_prefer_outer_lanes_on_highways Heavy vehicles prefer outer lanes on highways -Parking_AI Parking AI -Enable_more_realistic_parking Enable more realistic parking -Reset_custom_speed_limits Reset custom speed limits -Reload_global_configuration Reload global configuration -Reset_global_configuration Reset global configuration -General General -Gameplay Gameplay -Overlays Overlays -Realistic_speeds Realistic speeds -Evacuation_busses_may_ignore_traffic_rules Evacuation busses may ignore traffic rules -Evacuation_busses_may_only_be_used_to_reach_a_shelter Evacuation busses may only be used to reach a shelter -Vehicle_behavior Vehicle behavior -Policies_&_Restrictions Policies & Restrictions -At_junctions At junctions -In_case_of_emergency In case of emergency -Show_lane-wise_speed_limits Show lane-wise speed limits -Language Language -Game_language Game language -requires_game_restart requires game restart -Customizations_come_into_effect_instantaneously Customizations come into effect instantaneously -Options Options -Lock_main_menu_button_position Lock main menu button position -Lock_main_menu_position Lock main menu position -Recalculating_lane_routing Recalculating lane routing -Please_wait Please wait -Parking_restrictions Parking restrictions -Simulation Simulation -On_roads On roads -Ban_private_cars_and_trucks_on_bus_lanes Ban private cars and trucks on bus lanes -default default -flow_ratio flow ratio -wait_ratio wait ratio -After_min._time_has_elapsed_switch_to_next_step_if After min. time has elapsed, switch to next step if -Adaptive_step_switching Adaptive step switching -Dynamic_lane_section Dynamic lane selection -Percentage_of_vehicles_performing_dynamic_lane_section Percentage of vehicles performing dynamic lane selection -Vehicle_restrictions_aggression Vehicle restrictions aggression -Strict Strict -Show_path-find_stats Show path-find stats -Remove_this_vehicle Remove this vehicle -Vehicles_follow_priority_rules_at_junctions_with_timed_traffic_lights Vehicles follow priority rules at junctions with timed traffic lights -Enable_tutorial_messages Enable tutorial messages +Enable_dynamic_path_calculation 動的なパス計算を有効にする +Lane_Arrow_Changer_Disabled_Connection 手動で車線接続を作成したため、この車線の矢印の変更は無効になっています +Lane_connector 車線を接続 +Connected_lanes 接続した車線 +Use_alternative_view_mode 代替表示モードを使用する +Road_type 道路の種類 +Default_speed_limit デフォルトの制限速度 +Unit_system 単位系 +Metric メートル法 +Imperial ヤード・ポンド法 +Use_more_CPU_cores_for_route_calculation_if_available ルート計算にもっとCPUコアを使用する(利用可能な場合) +Activated_features 有効な機能 +Junction_restrictions 交差点の制限 +Prohibit_spawning_of_pocket_cars ポケットカーの生成禁止 +Reset_stuck_cims_and_vehicles 立ち往生している人や車両をリセットする +Default_speed_limits デフォルトの制限速度 +Looking_for_a_parking_spot 駐車場を探す +Driving_to_a_parking_spot 駐車場への運転 +Driving_to_another_parking_spot 別の駐車場への運転 +Entering_vehicle 入庫 +Walking_to_car 車まで歩く +Using_public_transport 公共交通機関を利用する +Walking 歩く +Thinking_of_a_good_parking_spot 好ましい駐車場を考える +Switch_view ビューを切り替える +Outgoing_demand 出ていく需要 +Incoming_demand 入っていく需要 +Advanced_Vehicle_AI 高度な車両AI +Heavy_trucks_prefer_outer_lanes_on_highways 高速道路では大型車は外側車線を選択します +Parking_AI 駐車AI +Enable_more_realistic_parking より現実的な駐車を有効にする +Reset_custom_speed_limits カスタム速度制限をリセットする +Reload_global_configuration グローバル設定のリロード +Reset_global_configuration グローバル設定をリセット +General 全般 +Gameplay ゲームプレイ +Overlays オーバーレイ +Individual_driving_styles Individual driving styles +Evacuation_busses_may_ignore_traffic_rules 避難バスは交通規則を無視するであろう +Evacuation_busses_may_only_be_used_to_reach_a_shelter 避難バスは避難所へのアクセスにのみ使用できます +Vehicle_behavior 車両の挙動 +Policies_&_Restrictions ポリシーと制限 +At_junctions 交差点で +In_case_of_emergency 緊急の場合に +Show_lane-wise_speed_limits 車線毎の制限速度を表示する +Language 言語 +Game_language ゲームの言語 +requires_game_restart ゲームの再起動が必要 +Customizations_come_into_effect_instantaneously カスタマイズが即座に有効になります +Options オプション +Lock_main_menu_button_position メインメニューボタン位置をロックする +Lock_main_menu_position メインメニュー位置をロック +Recalculating_lane_routing レーンルーティングの再計算 +Please_wait お待ちください +Parking_restrictions 駐車規制 +Simulation シミュレーション +On_roads 道路上 +Ban_private_cars_and_trucks_on_bus_lanes 自家用車やトラックのバスレーン通行禁止 +default デフォルト +flow_ratio 流動割合 +wait_ratio 待ち割合 +After_min._time_has_elapsed_switch_to_next_step_if 最小時間が経過した後、次のステップに切り替える条件 +Adaptive_step_switching 適応ステップスイッチング +Dynamic_lane_section 動的レーン選択 +Percentage_of_vehicles_performing_dynamic_lane_section 動的レーン選択を実行する車両の割合 +Vehicle_restrictions_aggression 車両制限適用の厳格さ +Strict 厳密 +Show_path-find_stats パス検索統計情報を表示する +Remove_this_vehicle この車両を削除する +Vehicles_follow_priority_rules_at_junctions_with_timed_traffic_lights 車両は時間設定付き信号機がある交差点で一般的な優先のルールに従います +Enable_tutorial_messages チュートリアルメッセージを有効にする TMPE_TUTORIAL_HEAD_MainMenu Traffic Manager: President Edition -TMPE_TUTORIAL_BODY_MainMenu Welcome to TM:PE!\n\nUser manual: http://www.viathinksoft.de/tmpe -TMPE_TUTORIAL_HEAD_JunctionRestrictionsTool Junction restrictions -TMPE_TUTORIAL_BODY_JunctionRestrictionsTool Control how vehicles and pedestrians shall behave at junctions.\n\n1. Click on the junction you want to manage\n2. Click on the appropriate icon to toggle restrictions.\n\nAvailable restrictions:\n- Allow/Disallow lane changing for vehicle going straight on\n- Allow/Disallow u-turns\n- Allow/Disallow vehicles to enter a blocked junction\n- Allow/disallow pedestrians to cross the street -TMPE_TUTORIAL_HEAD_LaneArrowTool Lane arrows -TMPE_TUTORIAL_BODY_LaneArrowTool Restrict the set of directions that vehicles are allowed to take.\n\n1. Click on a road segment next to a junction\n2. Select the allowed directions. -TMPE_TUTORIAL_HEAD_LaneConnectorTool Lane connector -TMPE_TUTORIAL_BODY_LaneConnectorTool Connect two or more lanes with each other in order to tell which lanes vehicles may use.\n\n1. Click on a lane changing point (grey circles).\n2. Click on a source marker.\n3. Click on a target marker to connect it with the source marker.\n4. Click anywhere with your secondary mouse button to return back to source marker selection.\n\nAvailable hotkeys:\n\n- Delete or Backspace: Remove all lane connections\n- Shift + S: Cycle through all available "stay on lane" patterns -TMPE_TUTORIAL_HEAD_ManualTrafficLightsTool Manual traffic lights -TMPE_TUTORIAL_BODY_ManualTrafficLightsTool Try out custom traffic lights.\n\n1. Click on a junction\n2. Use the tool to control traffic lights. -TMPE_TUTORIAL_HEAD_ParkingRestrictionsTool Parking restrictions -TMPE_TUTORIAL_BODY_ParkingRestrictionsTool Control where parking is allowed.\n\nClick on the "P" icons.\n\nAvailable hotkeys:\n\n- Shift: Hold while clicking to apply parking restrictions to multiple road segments at once -TMPE_TUTORIAL_HEAD_PrioritySignsTool Priority signs -TMPE_TUTORIAL_BODY_PrioritySignsTool Define priority rules at junctions.\n\n1. Click on a junction.\n2. Click on the blank spots to cycle through the available priority signs (priority road, yield, stop).\n\nAvailable hotkeys:\n\n- Shift: Hold Shift to add priority signs to multiple road segments at once. Click again while holding Shift to cycle through all available patterns. -TMPE_TUTORIAL_HEAD_SpeedLimitsTool Speed limits -TMPE_TUTORIAL_BODY_SpeedLimitsTool Set up speed restrictions.\n\n1. In the window, click on the speed limit you want to set.\n2. Click on a road segment to change the speed limit.\n\nAvailable hotkeys:\n\n- Shift: Hold Shift while clicking to apply speed limits to multiple road segments at once.\n- Ctrl: Hold Ctrl to control speed limits per individual lane. -TMPE_TUTORIAL_HEAD_TimedTrafficLightsTool Timed traffic lights -TMPE_TUTORIAL_BODY_TimedTrafficLightsTool Set up timed traffic lights.\n\n1. Click on a junction.\n2. In the window, click on "Add step".\n3. Click on the overlay elements to set desired traffic lights states.\n4. Click on "Add".\n5. Repeat as desired. -TMPE_TUTORIAL_HEAD_ToggleTrafficLightsTool Toggle traffic lights -TMPE_TUTORIAL_BODY_ToggleTrafficLightsTool Add or remove traffic lights to/from junctions.\n\nClick on a junction to toggle traffic lights. -TMPE_TUTORIAL_HEAD_VehicleRestrictionsTool Vehicle restrictions -TMPE_TUTORIAL_BODY_VehicleRestrictionsTool Ban vehicles from certain road segments.\n\n1. Click on a road segment.\n2. Click on the icons to toggle restrictions.\n\nDistinguished vehicle types:\n\n- Road vehicles: Passenger cars, busses, taxis, cargo trucks, service vehicles, emergency vehicles\n- Rail vehicles: Passenger trains, cargo trains\n\nAvailable hotkeys:\n\n- Shift: Hold Shift while clicking to apply restrictions to multiple road segments at once. -TMPE_TUTORIAL_HEAD_SpeedLimitsTool_Defaults Default speed limits -TMPE_TUTORIAL_BODY_SpeedLimitsTool_Defaults 1. Use the arrows in the upper half to cycle through all road types.\n2. In the lower half, select a speed limit.\n3. Click on "Save" to set the selected speed limit as default for future road segments of the selected type. Click on "Save & Apply" to also update all existing roads of the selected type. -TMPE_TUTORIAL_HEAD_TimedTrafficLightsTool_AddStep Add a timed step -TMPE_TUTORIAL_BODY_TimedTrafficLightsTool_AddStep 1. Within the in-game overlay, click on the traffic lights to change their state. Use the "Change mode" button to add directional traffic lights.\n2. Enter both a minimum and maximum duration for the step. After the min. time has elapsed the traffic light will count and compare approaching vehicles.\n3. Optionally, select a step switching type. Per default, the step changes if roughly less vehicles are driving than waiting.\n4. Optionally, adjust the light's sensitivity. For example, move the slider to the left to make the timed traffic light less sensitive for waiting vehicles. -TMPE_TUTORIAL_HEAD_TimedTrafficLightsTool_Copy Copy a timed traffic light -TMPE_TUTORIAL_BODY_TimedTrafficLightsTool_Copy Click on another junction to paste the timed traffic light.\n\nClick anywhere with your secondary mouse button to cancel the operation. -TMPE_TUTORIAL_HEAD_TimedTrafficLightsTool_AddJunction Add a junction to the timed traffic light -TMPE_TUTORIAL_BODY_TimedTrafficLightsTool_AddJunction Click on another junction to add it. Both lights will be joined such that the timed program will then control both junctions at once.\n\nClick anywhere with your secondary mouse button to cancel the operation. -TMPE_TUTORIAL_HEAD_TimedTrafficLightsTool_RemoveJunction Remove a junction from the timed traffic light -TMPE_TUTORIAL_BODY_TimedTrafficLightsTool_RemoveJunction Click on one of the junctions that are controlled by this timed program. The selected traffic light will be removed such that the timed programm will no longer manage it.\n\nClick anywhere with your secondary mouse button to cancel the operation. -Public_transport Public transport -Prevent_excessive_transfers_at_public_transport_stations Prevent unnecessary transfers at public transport stations -Compact_main_menu Compact main menu -Window_transparency Window transparency -Overlay_transparency Overlay transparency -Remove_this_citizen Remove this citizen -Show_error_message_if_a_mod_incompatibility_is_detected Show error message if a mod incompatibility is detected -Remove_parked_vehicles Remove parked vehicles -Node_is_level_crossing This junction is a level crossing.\nYou cannot disable traffic lights here. -Experimental_features Experimental features -Turn_on_red Turn on red +TMPE_TUTORIAL_BODY_MainMenu ようこそ TM:PE!\n\nユーザーマニュアル: http://www.viathinksoft.de/tmpe +TMPE_TUTORIAL_HEAD_JunctionRestrictionsTool 交差点の制限 +TMPE_TUTORIAL_BODY_JunctionRestrictionsTool 車両や歩行者が交差点でどのように行動するのかを制御します。\n\n1. 管理したい交差点をクリックします。\n2. 適切なアイコンをクリックして、制限を切り替えます。\n\n利用可能な制限:\n- 直進中の車両の車線変更を許可/禁止\n- Uターンの許可/禁止\n- 交差点の先が渋滞している交差点への車両の進入を許可/禁止\n- 歩行者が道路を横断することを許可/禁止する +TMPE_TUTORIAL_HEAD_LaneArrowTool 車線の矢印 +TMPE_TUTORIAL_BODY_LaneArrowTool 車両が進行する方向を制限します。\n\n1. 交差点の横にある道路区間をクリックします\n2. 許可する方向を選択してください。 +TMPE_TUTORIAL_HEAD_LaneConnectorTool 車線の接続 +TMPE_TUTORIAL_BODY_LaneConnectorTool 車両がどの車線を使用できるかを知るために、2つ以上の車線を互いに接続します。\n\n1. 車線変更点(灰色の丸)をクリックします。\n2. ソースマーカーをクリックします。\n3. ターゲットマーカーをクリックしてソースマーカーと接続します。\n4. 任意の場所で右クリックすると、ソースマーカーの選択に戻ります。\n\n利用可能なホットキー:\n\n- Delete または Backspace: すべての車線接続を削除\n- Shift + S: 利用可能なすべての「車線を維持する」パターンを順番に切り替えます +TMPE_TUTORIAL_HEAD_ManualTrafficLightsTool 手動信号機 +TMPE_TUTORIAL_BODY_ManualTrafficLightsTool カスタム信号機を試してみてください。\n\n1. 交差点をクリックします。\n2. ツールを使用して信号機を制御します。 +TMPE_TUTORIAL_HEAD_ParkingRestrictionsTool 駐車規制 +TMPE_TUTORIAL_BODY_ParkingRestrictionsTool 駐車を許可する場所を制御します。\n\n「P」アイコンをクリックします。\n\n利用可能なホットキー:\n\n- Shift: クリックしながら押したままにすると、一度に複数の道路区間に駐車制限が適用されます +TMPE_TUTORIAL_HEAD_PrioritySignsTool 優先標識 +TMPE_TUTORIAL_BODY_PrioritySignsTool 交差点で優先順位規則を定義します。\n\n1. 交差点をクリックします。\n2. 空白の箇所をクリックして、利用可能な優先標識(優先道路,徐行,一時停止)を順に切り替えます。\n\n利用可能なホットキー:\n\n- Shift: Shiftキーを押しながら一度に複数の道路区間に優先標識を追加します。 Shiftキーを押しながらもう一度クリックすると、使用可能なすべてのパターンが順に切り替わります。 +TMPE_TUTORIAL_HEAD_SpeedLimitsTool 制限速度 +TMPE_TUTORIAL_BODY_SpeedLimitsTool 速度制限を設定します。\n\n1. ウィンドウで、設定したい制限速度をクリックします。\n2. 制限速度を変更するには、道路区間をクリックしてください。\n\n利用可能なホットキー:\n\n- Shift: Shiftキーを押しながらクリックすると、一度に複数の道路区間に制限速度が適用されます。\n- Ctrl: 個々の車線ごとの制限速度を制御するにはCtrlを押します。 +TMPE_TUTORIAL_HEAD_TimedTrafficLightsTool 時間設定付き信号 +TMPE_TUTORIAL_BODY_TimedTrafficLightsTool 時間設定付き信号を設定します。\n\n1. 交差点をクリックします。\n2. ウィンドウ内で、 「状態の追加」をクリックしてください。\n3. オーバーレイ要素をクリックして、目的の信号機の状態を設定します。\n4. 「追加」をクリックしてください。\n5. 必要に応じて繰り返してください。 +TMPE_TUTORIAL_HEAD_ToggleTrafficLightsTool 信号機の付け外し +TMPE_TUTORIAL_BODY_ToggleTrafficLightsTool 信号機の交差点への追加または削除をします。\n\n交差点をクリックして信号を付け外しします。 +TMPE_TUTORIAL_HEAD_VehicleRestrictionsTool 車両の制限 +TMPE_TUTORIAL_BODY_VehicleRestrictionsTool 特定の道路区間の車両を禁止する。\n\n1. 道路区間をクリックします。\n2. アイコンをクリックして制限を切り替えます。\n\n区別された車種:\n\n- 道路車両: 乗用車,バス,タクシー,貨物トラック,公共サービス車両、緊急車両\n- 鉄道車両:旅客列車、貨物列車\n\n利用可能なホットキー:\n\n- Shift: Shiftキーを押しながらクリックすると、一度に複数の道路区間に制限が適用されます。 +TMPE_TUTORIAL_HEAD_SpeedLimitsTool_Defaults デフォルトの制限速度 +TMPE_TUTORIAL_BODY_SpeedLimitsTool_Defaults 1. 上半分の矢印を使用して、すべての道路タイプを順に切り替えます。\n2. 下半分で、制限速度を選択します。\n3. 「保存」をクリックして、選択した制限速度を選択したタイプの将来の道路区間のデフォルトとして設定します。 選択した種類の既存の道路をすべて更新するには、「保存して適用」をクリックします。 +TMPE_TUTORIAL_HEAD_TimedTrafficLightsTool_AddStep 時間設定を追加する +TMPE_TUTORIAL_BODY_TimedTrafficLightsTool_AddStep 1. ゲーム内オーバーレイ内で、信号機をクリックして状態を変更します。 矢印信号を追加するには、「モードの変更」ボタンを使用します。\n2. ステップの最短時間と最長時間の両方を入力します。 最短時間が経過すると、信号機が接近してくる車両を数えて比較します。\n3. 必要に応じて、ステップ切り替えタイプを選択します。 デフォルトでは、待っているよりもおおよそ少ない車両が運転している場合、ステップは変わります。\n4. 必要に応じて、感度を調整してください。 たとえば、スライダーを左に動かすと、待機中の車両に対するタイムシグナルの感度が低くなります。 +TMPE_TUTORIAL_HEAD_TimedTrafficLightsTool_Copy 時間設定付き信号をコピーする +TMPE_TUTORIAL_BODY_TimedTrafficLightsTool_Copy 別の交差点をクリックして時間設定付き信号を貼り付けます。\n\n操作をキャンセルするには、マウスの右ボタンで任意の場所をクリックします。 +TMPE_TUTORIAL_HEAD_TimedTrafficLightsTool_AddJunction 時間設定付き信号機に交差点を追加する +TMPE_TUTORIAL_BODY_TimedTrafficLightsTool_AddJunction 追加するには、他の交差点をクリックします。 両方の信号は、時間設定プログラムが両方の交差点を一度に制御するように結合されます。\n\n操作をキャンセルするには、マウスの右ボタンで任意の場所をクリックします。 +TMPE_TUTORIAL_HEAD_TimedTrafficLightsTool_RemoveJunction 時間設定付き信号機から交差点を削除する +TMPE_TUTORIAL_BODY_TimedTrafficLightsTool_RemoveJunction この時間設定プログラムによって制御されている交差点の1つをクリックします。 選択した信号機は削除され、時間設定プログラムによって管理されなくなります。\n\n操作をキャンセルするには、マウスの右ボタンで任意の場所をクリックします。 +Public_transport 公共交通機関 +Prevent_excessive_transfers_at_public_transport_stations 公共交通機関での不必要な輸送を防ぐ +Compact_main_menu コンパクトメインメニュー +Window_transparency ウィンドウの透明度 +Overlay_transparency オーバーレイの透明度 +Remove_this_citizen この市民を削除する +Remove_parked_vehicles 駐車中の車両を取り除く +Node_is_level_crossing この交差点は踏切です。\nここで信号機を無効にすることはできません。 +Experimental_features 実験的な機能 +Turn_on_red 赤信号で曲がる Vehicles_may_turn_on_red 車両が赤信号で曲がることがある -Also_apply_to_left/right_turns_between_one-way_streets Also apply to left & right turns between one-way streets \ No newline at end of file +Also_apply_to_left/right_turns_between_one-way_streets 一方通行路の左右の曲がり角にも適用 +Scan_for_known_incompatible_mods_on_startup Scan for known incompatible mods on startup +Ignore_disabled_mods Ignore disabled mods +Traffic_Manager_detected_incompatible_mods Traffic Manager detected incompatible mods +Notify_me_if_there_is_an_unexpected_mod_conflict modの非互換性が検出された場合にエラーメッセージを表示す \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_ko.txt b/TLM/TLM/Resources/lang_ko.txt index 8a8a002fe..1bc09409f 100644 --- a/TLM/TLM/Resources/lang_ko.txt +++ b/TLM/TLM/Resources/lang_ko.txt @@ -150,12 +150,12 @@ Reset_global_configuration 글로벌(global) 설정 초기화 General 기본 Gameplay 게임플레이 Overlays 화면표시 -Realistic_speeds 현실적인 속도 +Individual_driving_styles Individual driving styles Evacuation_busses_may_ignore_traffic_rules 대피 버스는 교통규칙을 무시합니다 Evacuation_busses_may_only_be_used_to_reach_a_shelter 대피 버스는 대피소 도착을 위한 용도로만 사용할 수 있습니다 Vehicle_behavior 차량 제한 Policies_&_Restrictions 정책 및 제한 -At_junctions 교차로 설정 +At_junctions 교차로 일괄 설정 In_case_of_emergency 긴급 상황 설정 Show_lane-wise_speed_limits 차선 속도제한 보기 Language 언어 @@ -179,7 +179,7 @@ Adaptive_step_switching 적응형 신호 변경 Dynamic_lane_section 유동적 차량 차선변경 빈도 Percentage_of_vehicles_performing_dynamic_lane_section 유동적 차량 차선변경 빈도 백분율 Vehicle_restrictions_aggression 진입불가 도로 회피 빈도 -Strict 엄격하게 제어함 +Strict 무제한 Show_path-find_stats 현재 경로를 찾는 차량수를 PFs 수치로 표기합니다 Remove_this_vehicle 해당 차량을 제거합니다 Vehicles_follow_priority_rules_at_junctions_with_timed_traffic_lights 차량이 신호등 시간표가 구성된 교차로에서 교통 표지판 규칙을 준수합니다 @@ -222,10 +222,13 @@ Compact_main_menu TMPE 메뉴 아이콘 크게/작게 설정 Window_transparency 패널 투명도(오른쪽으로 갈수록 투명함) Overlay_transparency 보조 아이콘 투명도(도로 위 표지판, 속도제한 아이콘 투명도 등) Remove_this_citizen 해당 시민 삭제 -Show_error_message_if_a_mod_incompatibility_is_detected 모드와 비 호환되는 모드 발견 시 에러 보여주기 Remove_parked_vehicles 주차된 차량 제거하기 Node_is_level_crossing 해당 교차로는 평면 교차로입니다.\n따라서 신호등을 설치할 수 없습니다 -Experimental_features Experimental features -Turn_on_red Turn on red -Vehicles_may_turn_on_red 빨간 신호등에서 차량이 돌아올 수 있습니다. -Also_apply_to_left/right_turns_between_one-way_streets Also apply to left & right turns between one-way streets \ No newline at end of file +Experimental_features 실험 기능 +Turn_on_red 빨간 신호등에서 우회전을 허용 규칙 +Vehicles_may_turn_on_red 빨간 신호등에서 차량이 진입 할 수 있습니다. +Also_apply_to_left/right_turns_between_one-way_streets 빨간 신호등에서 우회전을 허용 +Scan_for_known_incompatible_mods_on_startup 게임 실행시 비호환되는 모드 스캔 +Ignore_disabled_mods 비활성화된 모드 무시하기 +Traffic_Manager_detected_incompatible_mods Traffic Manager와 비호환되는 모드 감지 +Notify_me_if_there_is_an_unexpected_mod_conflict 모드와 비 호환되는 모드 발견 시 에러 보여주기 diff --git a/TLM/TLM/Resources/lang_nl.txt b/TLM/TLM/Resources/lang_nl.txt index bafa2f49a..5f748af47 100644 --- a/TLM/TLM/Resources/lang_nl.txt +++ b/TLM/TLM/Resources/lang_nl.txt @@ -151,7 +151,7 @@ Reset_global_configuration Reset algemene configuratie General Algemeen Gameplay Spelverloop Overlays Transparanten -Realistic_speeds Realistische snelheden +Individual_driving_styles Individual driving styles Evacuation_busses_may_ignore_traffic_rules Evacuatiebussen mogen verkeersregels overtreden Evacuation_busses_may_only_be_used_to_reach_a_shelter Evacuatiebussen mogen enkel gebruikt worden om schuilkelders te bereiken Vehicle_behavior Vortuiggedrag @@ -222,10 +222,13 @@ Compact_main_menu Compact main menu Window_transparency Window transparency Overlay_transparency Overlay transparency Remove_this_citizen Remove this citizen -Show_error_message_if_a_mod_incompatibility_is_detected Show error message if a mod incompatibility is detected Remove_parked_vehicles Remove parked vehicles Node_is_level_crossing This junction is a level crossing.\nYou cannot disable traffic lights here. Experimental_features Experimental features Turn_on_red Turn on red Vehicles_may_turn_on_red Voertuigen kunnen bij rode verkeerslichten draaien -Also_apply_to_left/right_turns_between_one-way_streets Also apply to left & right turns between one-way streets \ No newline at end of file +Also_apply_to_left/right_turns_between_one-way_streets Also apply to left & right turns between one-way streets +Scan_for_known_incompatible_mods_on_startup Scan for known incompatible mods on startup +Ignore_disabled_mods Ignore disabled mods +Traffic_Manager_detected_incompatible_mods Traffic Manager detected incompatible mods +Notify_me_if_there_is_an_unexpected_mod_conflict Notify me if there is an unexpected mod conflict \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_pl.txt b/TLM/TLM/Resources/lang_pl.txt index eddc52cac..9200d8b58 100644 --- a/TLM/TLM/Resources/lang_pl.txt +++ b/TLM/TLM/Resources/lang_pl.txt @@ -150,7 +150,7 @@ Reset_global_configuration Zresetuj ustawienia globalne General Ogólne Gameplay Rozgrywka Overlays Nakładki -Realistic_speeds Realistyczne prędkości +Individual_driving_styles Individual driving styles Evacuation_busses_may_ignore_traffic_rules Autobusy ewakuacyjne mogą ignorować przepisy Evacuation_busses_may_only_be_used_to_reach_a_shelter Autobusy ewakuacyjne mogą przewozić tylko do schroniena Vehicle_behavior Zachowanie pojazdu @@ -222,10 +222,13 @@ Compact_main_menu Kompaktowe menu główne Window_transparency Przezroczystość okna Overlay_transparency Przezroczystość nakł. Remove_this_citizen Usuń tego mieszkańca -Show_error_message_if_a_mod_incompatibility_is_detected Pokaż informację o błędzie jeśli wykryto niezgodność modów Remove_parked_vehicles Usuń zaparkowane pojazdy Node_is_level_crossing To jest przejazd kolejowy. \nNie możesz tutaj wyłączyć sygnalizacji! Experimental_features Funkcje eksperymentalne Turn_on_red Skręć w prawo na czerwonym Vehicles_may_turn_on_red Pojazdy mogą skręcić w prawo na czerwonym świetle -Also_apply_to_left/right_turns_between_one-way_streets Uwzględnia również skręt w lewo/prawo pomiędzy drogami jednokierunkowymi \ No newline at end of file +Also_apply_to_left/right_turns_between_one-way_streets Uwzględnia również skręt w lewo/prawo pomiędzy drogami jednokierunkowymi +Scan_for_known_incompatible_mods_on_startup Uruchamiaj sprawdzanie przy starcie gry +Ignore_disabled_mods Ignoruj wyłączone mody +Traffic_Manager_detected_incompatible_mods Traffic Manager wykrył niekompatybilne mody +Notify_me_if_there_is_an_unexpected_mod_conflict Powiadom mnie w razie nieoczekiwanej niezgodność modów \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_pt.txt b/TLM/TLM/Resources/lang_pt.txt index 2d581795d..1993850e4 100644 --- a/TLM/TLM/Resources/lang_pt.txt +++ b/TLM/TLM/Resources/lang_pt.txt @@ -150,7 +150,7 @@ Reset_global_configuration Resetar configuração global General Geral Gameplay Gameplay Overlays Sobreposições -Realistic_speeds Velocidades realistas +Individual_driving_styles Individual driving styles Evacuation_busses_may_ignore_traffic_rules Os ônibus de evacuação podem ignorar as regras de trânsito Evacuation_busses_may_only_be_used_to_reach_a_shelter Os ônibus de evacuação só podem ser usados para alcançar um abrigo Vehicle_behavior Comportamento do veículo @@ -222,10 +222,13 @@ Compact_main_menu Compact main menu Window_transparency Window transparency Overlay_transparency Overlay transparency Remove_this_citizen Remove this citizen -Show_error_message_if_a_mod_incompatibility_is_detected Show error message if a mod incompatibility is detected Remove_parked_vehicles Remove parked vehicles Node_is_level_crossing This junction is a level crossing.\nYou cannot disable traffic lights here. Experimental_features Experimental features Turn_on_red Virar nos semáforos vermelhos Vehicles_may_turn_on_red Veículos podem virar nos semáforos vermelhos -Also_apply_to_left/right_turns_between_one-way_streets Also apply to left & right turns between one-way streets \ No newline at end of file +Also_apply_to_left/right_turns_between_one-way_streets Also apply to left & right turns between one-way streets +Scan_for_known_incompatible_mods_on_startup Scan for known incompatible mods on startup +Ignore_disabled_mods Ignore disabled mods +Traffic_Manager_detected_incompatible_mods Traffic Manager detected incompatible mods +Notify_me_if_there_is_an_unexpected_mod_conflict Notify me if there is an unexpected mod conflict \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_ru.txt b/TLM/TLM/Resources/lang_ru.txt index f8c2ee112..4193e0a8c 100644 --- a/TLM/TLM/Resources/lang_ru.txt +++ b/TLM/TLM/Resources/lang_ru.txt @@ -1,4 +1,4 @@ -Switch_traffic_lights Установка светофора +Switch_traffic_lights Установка светофора Add_priority_signs Знаки приоритета Manual_traffic_lights Ручной светофор Timed_traffic_lights Настраиваемый светофор @@ -33,13 +33,13 @@ Low Замедленное Medium Среднее High Высокое Very_high Очень высоко -Extreme_long_green/red_phases Слишком долгие фазы зеленый/красный -Very_long_green/red_phases Очень долгие фазы зеленый/красный -Long_green/red_phases Долгие фазы зеленый/красный -Moderate_green/red_phases Умеренные фазы зеленый/красный -Short_green/red_phases Короткие фазы зеленый/красный -Very_short_green/red_phases Очень короткие фазы зеленый/красный -Extreme_short_green/red_phases Слишком короткие фазы зеленый/красный +Extreme_long_green/red_phases Слишком долгие фазы зелёный/красный +Very_long_green/red_phases Очень долгие фазы зелёный/красный +Long_green/red_phases Долгие фазы зелёный/красный +Moderate_green/red_phases Умеренные фазы зелёный/красный +Short_green/red_phases Короткие фазы зелёный/красный +Very_short_green/red_phases Очень короткие фазы зелёный/красный +Extreme_short_green/red_phases Слишком короткие фазы зелёный/красный Hide_counters Скрыть счётчики Show_counters Показать счётчики Start Начать @@ -83,7 +83,7 @@ Create_group Создать группу Delete_group Удалить группу Add_zoning Добавить зонирование Remove_zoning Удалить зонирование -Lane_Arrow_Changer_Disabled_Highway Изменение стрелки полосы для этого перекрестка отключено, по причине вашей активации системы правил шоссе. +Lane_Arrow_Changer_Disabled_Highway Изменение стрелки полосы для этого перекрёстка отключено, по причине вашей активации системы правил шоссе. Add_junction_to_timed_light Добавить перекрёсток в список Remove_junction_from_timed_light Убрать перекрёсток из списка Select_junction Добавление перекрёстка в список @@ -141,7 +141,7 @@ Switch_view Переключение обзора Outgoing_demand Исходящее требование Incoming_demand Входящее требование Advanced_Vehicle_AI Продвинутый AI транспорта -Heavy_trucks_prefer_outer_lanes_on_highways Большегрузные траки предпочитают крайние полосы на шоссе +Heavy_trucks_prefer_outer_lanes_on_highways Большегрузный транспорт предпочитает крайние полосы на шоссе Parking_AI AI парковки Enable_more_realistic_parking Включить более реалистичную парковку Reset_custom_speed_limits Сбросить свои ограничения скорости @@ -150,7 +150,7 @@ Reset_global_configuration Сбросить общую конфигурацию General Общее Gameplay Геймплей Overlays Оверлеи -Realistic_speeds Реалистичные скорости +Individual_driving_styles Individual driving styles Evacuation_busses_may_ignore_traffic_rules Автобусы эвакуации игнорируют правила движения Evacuation_busses_may_only_be_used_to_reach_a_shelter Эвакуационные автобусы, только чтобы добраться до аварийного убежища Vehicle_behavior Поведение транспорта @@ -182,7 +182,7 @@ Vehicle_restrictions_aggression Следование транспортным о Strict Строгое Show_path-find_stats Показать статистику поиска пути Remove_this_vehicle Удалить этот транспорт -Vehicles_follow_priority_rules_at_junctions_with_timed_traffic_lights Следование правилам приоритета на перекрёстках с настраиваемыми светофорами +Vehicles_follow_priority_rules_at_junctions_with_timed_traffic_lights Правила приоритета на перекрёстках с настраиваемыми светофорами Enable_tutorial_messages Включить обучающие сообщения TMPE_TUTORIAL_HEAD_MainMenu Traffic Manager: President Edition TMPE_TUTORIAL_BODY_MainMenu Welcome to TM:PE!\n\nUser manual: http://www.viathinksoft.de/tmpe @@ -222,10 +222,13 @@ Compact_main_menu Компактное Главное меню Window_transparency Прозрачность окна Overlay_transparency Прозрачность элементов(оверлеев) TM:PE Remove_this_citizen Удалить этого гражданина -Show_error_message_if_a_mod_incompatibility_is_detected Показывать сообщение об ошибке при несовместимости мода Remove_parked_vehicles Удалить припаркованный транспорт Node_is_level_crossing Это перекрёсток уровней.\nЗдесь нельзя отключить светофоры. -Experimental_features Experimental features -Turn_on_red Turn on red -Vehicles_may_turn_on_red Транспортные средства могут повернуть на красный светофор -Also_apply_to_left/right_turns_between_one-way_streets Also apply to left & right turns between one-way streets \ No newline at end of file +Experimental_features Экспериментальные функции +Turn_on_red Поворот направо на красный +Vehicles_may_turn_on_red Разрешить поворот направо на красный сигнал светофора +Also_apply_to_left/right_turns_between_one-way_streets Разрешить направо/налево между улицами с односторонним движением +Scan_for_known_incompatible_mods_on_startup Сканирование известных несовместимых модов при запуске +Ignore_disabled_mods Игнорировать отключённые моды +Traffic_Manager_detected_incompatible_mods Traffic Manager обнаружил несовместимые моды +Notify_me_if_there_is_an_unexpected_mod_conflict Показывать сообщение об ошибке при несовместимости модов \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_template.txt b/TLM/TLM/Resources/lang_template.txt index 73137c736..3e1e48396 100644 --- a/TLM/TLM/Resources/lang_template.txt +++ b/TLM/TLM/Resources/lang_template.txt @@ -150,7 +150,7 @@ Reset_global_configuration General Gameplay Overlays -Realistic_speeds +Individual_driving_styles Evacuation_busses_may_ignore_traffic_rules Evacuation_busses_may_only_be_used_to_reach_a_shelter Vehicle_behavior @@ -222,10 +222,13 @@ Compact_main_menu Window_transparency Overlay_transparency Remove_this_citizen -Show_error_message_if_a_mod_incompatibility_is_detected Remove_parked_vehicles Node_is_level_crossing Experimental_features Turn_on_red Vehicles_may_turn_on_red -Also_apply_to_left/right_turns_between_one-way_streets \ No newline at end of file +Also_apply_to_left/right_turns_between_one-way_streets +Scan_for_known_incompatible_mods_on_startup +Ignore_disabled_mods +Traffic_Manager_detected_incompatible_mods +Notify_me_if_there_is_an_unexpected_mod_conflict \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_zh-tw.txt b/TLM/TLM/Resources/lang_zh-tw.txt index c61090da7..ff86907fa 100644 --- a/TLM/TLM/Resources/lang_zh-tw.txt +++ b/TLM/TLM/Resources/lang_zh-tw.txt @@ -150,7 +150,7 @@ Reset_global_configuration 重置所有設定 General 普通 Gameplay 遊戲 Overlays 重疊 -Realistic_speeds 現實速度 +Individual_driving_styles Individual driving styles Evacuation_busses_may_ignore_traffic_rules 緊急疏散公車可忽略交通規則 Evacuation_busses_may_only_be_used_to_reach_a_shelter 緊急疏散公車僅可用於到達避難所 Vehicle_behavior 車輛行為 @@ -222,10 +222,13 @@ Compact_main_menu Compact main menu Window_transparency Window transparency Overlay_transparency Overlay transparency Remove_this_citizen Remove this citizen -Show_error_message_if_a_mod_incompatibility_is_detected Show error message if a mod incompatibility is detected Remove_parked_vehicles Remove parked vehicles Node_is_level_crossing This junction is a level crossing.\nYou cannot disable traffic lights here. Experimental_features Experimental features Turn_on_red Turn on red Vehicles_may_turn_on_red 車輛可能會在紅色交通燈處轉彎 -Also_apply_to_left/right_turns_between_one-way_streets Also apply to left & right turns between one-way streets \ No newline at end of file +Also_apply_to_left/right_turns_between_one-way_streets Also apply to left & right turns between one-way streets +Scan_for_known_incompatible_mods_on_startup Scan for known incompatible mods on startup +Ignore_disabled_mods Ignore disabled mods +Traffic_Manager_detected_incompatible_mods Traffic Manager detected incompatible mods +Notify_me_if_there_is_an_unexpected_mod_conflict Notify me if there is an unexpected mod conflict \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_zh.txt b/TLM/TLM/Resources/lang_zh.txt index aa49a787a..fc8cd7f9f 100644 --- a/TLM/TLM/Resources/lang_zh.txt +++ b/TLM/TLM/Resources/lang_zh.txt @@ -150,7 +150,7 @@ Reset_global_configuration 重置所有设定 General 常规 Gameplay 游戏 Overlays 覆盖 -Realistic_speeds 真实车速 +Individual_driving_styles Individual driving styles Evacuation_busses_may_ignore_traffic_rules 应急疏散巴士可忽略交通规则 Evacuation_busses_may_only_be_used_to_reach_a_shelter 应急疏散巴士仅可用于到达避难所 Vehicle_behavior 车辆行为 @@ -222,10 +222,13 @@ Compact_main_menu 紧凑主菜单 Window_transparency 窗口透明度 Overlay_transparency 覆盖透明度 Remove_this_citizen 移除此居民 -Show_error_message_if_a_mod_incompatibility_is_detected 检测到MOD不兼容时提示 Remove_parked_vehicles 移除停放的车辆 Node_is_level_crossing 此节点级别交汇,不可禁用红绿灯。 -Experimental_features Experimental features -Turn_on_red Turn on red -Vehicles_may_turn_on_red 车辆红灯可转弯 -Also_apply_to_left/right_turns_between_one-way_streets Also apply to left & right turns between one-way streets \ No newline at end of file +Experimental_features 实验特性 +Turn_on_red 红灯可转弯 +Vehicles_may_turn_on_red 车辆遇红灯可转弯 +Also_apply_to_left/right_turns_between_one-way_streets 单行道左右转也适用 +Scan_for_known_incompatible_mods_on_startup 启动时检测是否存在已知不兼容MOD +Ignore_disabled_mods 忽略未启用MOD +Traffic_Manager_detected_incompatible_mods 检测到的不兼容MOD +Notify_me_if_there_is_an_unexpected_mod_conflict 检测到不兼容MOD时提示 \ No newline at end of file diff --git a/TLM/TLM/State/ConfigData/DynamicLaneSelection.cs b/TLM/TLM/State/ConfigData/DynamicLaneSelection.cs index 5772ce9e0..8c19815d1 100644 --- a/TLM/TLM/State/ConfigData/DynamicLaneSelection.cs +++ b/TLM/TLM/State/ConfigData/DynamicLaneSelection.cs @@ -44,5 +44,113 @@ public class DynamicLaneSelection { /// Minimum relative speed (in %) where volume measurement starts /// public ushort VolumeMeasurementRelSpeedThreshold = 50; + + // --- + + /* + * max. reserved space: + * low = egoistic + * high = altruistic + */ + + /// + /// Minimum maximum allowed reserved space on previous vehicle lane (for regular drivers) + /// + public float MinMaxReservedSpace = 0f; + + /// + /// Maximum value for Maximum allowed reserved space on previous vehicle lane (for regular drivers) + /// + public float MaxMaxReservedSpace = 5f; + + /// + /// Minimum maximum allowed reserved space on previous vehicle lane (for reckless drivers) + /// + public float MinMaxRecklessReservedSpace = 10f; + + /// + /// Maximum maximum allowed reserved space on previous vehicle lane (for reckless drivers) + /// + public float MaxMaxRecklessReservedSpace = 50f; + + /* + * lane speed randomization interval: + * low = altruistic (driver sees the true lane speed) + * high = egoistic (driver imagines to be in the slowest queue, http://www.bbc.com/future/story/20130827-why-other-queues-move-faster) + */ + + /// + /// Minimum lane speed randomization interval + /// + public float MinLaneSpeedRandInterval = 0f; + + /// + /// Maximum lane speed randomization interval + /// + public float MaxLaneSpeedRandInterval = 25f; + + /* + * max. considered lane changes: + * low = altruistic + * high = egoistic + */ + + /// + /// Maximum number of considered lane changes + /// + public int MinMaxOptLaneChanges = 1; + + /// + /// Maximum number of considered lane changes + /// + public int MaxMaxOptLaneChanges = 3; + + /* + * max. allowed speed difference for unsafe lane changes + * low = altruistic + * high = egoistic + */ + + /// + /// Minimum maximum allowed speed difference for unsafe lane changes (in game units) + /// + public float MinMaxUnsafeSpeedDiff = 0.1f; + + /// + /// Maximum maximum allowed speed difference for unsafe lane changes (in game units) + /// + public float MaxMaxUnsafeSpeedDiff = 1f; + + /* + * min. required speed improvement for safe lane changes + * low = egoistic + * high = altruistic + */ + + /// + /// Minimum minimum required speed improvement for safe lane changes (in km/h) + /// + public float MinMinSafeSpeedImprovement = 5f; + + /// + /// Maximum minimum required speed improvement for safe lane changes (in km/h) + /// + public float MaxMinSafeSpeedImprovement = 30f; + + /* + * min. required traffic flow improvement for safe lane changes + * low = egoistic + * high = altruistic + */ + + /// + /// Minimum minimum required traffic flow improvement for safe lane changes (in %) + /// + public float MinMinSafeTrafficImprovement = 5f; + + /// + /// Maximum minimum required traffic flow improvement for safe lane changes (in %) + /// + public float MaxMinSafeTrafficImprovement = 30f; } } diff --git a/TLM/TLM/State/ConfigData/Gameplay.cs b/TLM/TLM/State/ConfigData/Gameplay.cs new file mode 100644 index 000000000..48e778e80 --- /dev/null +++ b/TLM/TLM/State/ConfigData/Gameplay.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace TrafficManager.State.ConfigData { + public class Gameplay { + /// + /// Modulo value for time-varying vehicle behavior randomization + /// + public uint VehicleTimedRandModulo = 10; + } +} diff --git a/TLM/TLM/State/ConfigData/Main.cs b/TLM/TLM/State/ConfigData/Main.cs index a30f40fa6..ca2ad9d3e 100644 --- a/TLM/TLM/State/ConfigData/Main.cs +++ b/TLM/TLM/State/ConfigData/Main.cs @@ -50,6 +50,16 @@ public class Main { /// public bool ShowCompatibilityCheckErrorMessage = false; + /// + /// Shows warning dialog if any incompatible mods detected + /// + public bool ScanForKnownIncompatibleModsAtStartup = true; + + /// + /// Skip disabled mods while running incompatible mod detector + /// + public bool IgnoreDisabledMods = true; + public void AddDisplayedTutorialMessage(string messageKey) { HashSet newMessages = DisplayedTutorialMessages != null ? new HashSet(DisplayedTutorialMessages) : new HashSet(); newMessages.Add(messageKey); diff --git a/TLM/TLM/State/GlobalConfig.cs b/TLM/TLM/State/GlobalConfig.cs index 4f4c84352..dca794adb 100644 --- a/TLM/TLM/State/GlobalConfig.cs +++ b/TLM/TLM/State/GlobalConfig.cs @@ -89,6 +89,8 @@ internal static void OnLevelUnloading() { public DynamicLaneSelection DynamicLaneSelection = new DynamicLaneSelection(); + public Gameplay Gameplay = new Gameplay(); + public Main Main = new Main(); public ParkingAI ParkingAI = new ParkingAI(); @@ -178,6 +180,10 @@ public static GlobalConfig Load(out DateTime modifiedTime) { conf.DynamicLaneSelection = new DynamicLaneSelection(); } + if (conf.Gameplay == null) { + conf.Gameplay = new Gameplay(); + } + if (conf.ParkingAI == null) { conf.ParkingAI = new ParkingAI(); } diff --git a/TLM/TLM/State/Options.cs b/TLM/TLM/State/Options.cs index 22e9505b9..c79cc80b1 100644 --- a/TLM/TLM/State/Options.cs +++ b/TLM/TLM/State/Options.cs @@ -29,7 +29,9 @@ public class Options : MonoBehaviour { private static UICheckBox tinyMenuToggle = null; private static UICheckBox enableTutorialToggle = null; private static UICheckBox showCompatibilityCheckErrorToggle = null; - private static UICheckBox realisticSpeedsToggle = null; + private static UICheckBox scanForKnownIncompatibleModsToggle = null; + private static UICheckBox ignoreDisabledModsToggle = null; + private static UICheckBox individualDrivingStyleToggle = null; private static UIDropDown recklessDriversDropdown = null; private static UICheckBox relaxedBussesToggle = null; private static UICheckBox allRelaxedToggle = null; @@ -93,7 +95,7 @@ public class Options : MonoBehaviour { public static bool instantEffects = true; public static int simAccuracy = 0; //public static int laneChangingRandomization = 2; - public static bool realisticSpeeds = true; + public static bool individualDrivingStyle = true; public static int recklessDrivers = 3; public static bool relaxedBusses = false; public static bool allRelaxed = false; @@ -155,6 +157,8 @@ public class Options : MonoBehaviour { public static bool junctionRestrictionsEnabled = true; public static bool turnOnRedEnabled = true; public static bool laneConnectorEnabled = true; + public static bool scanForKnownIncompatibleModsEnabled = true; + public static bool ignoreDisabledModsEnabled = false; public static VehicleRestrictionsAggression vehicleRestrictionsAggression = VehicleRestrictionsAggression.Medium; @@ -227,7 +231,10 @@ public static void makeSettings(UIHelperBase helper) { overlayTransparencySlider = generalGroup.AddSlider(Translation.GetString("Overlay_transparency") + ":", 0, 90, 5, GlobalConfig.Instance.Main.OverlayTransparency, onOverlayTransparencyChanged) as UISlider; overlayTransparencySlider.parent.Find("Label").width = 500; enableTutorialToggle = generalGroup.AddCheckbox(Translation.GetString("Enable_tutorial_messages"), GlobalConfig.Instance.Main.EnableTutorial, onEnableTutorialsChanged) as UICheckBox; - showCompatibilityCheckErrorToggle = generalGroup.AddCheckbox(Translation.GetString("Show_error_message_if_a_mod_incompatibility_is_detected"), GlobalConfig.Instance.Main.ShowCompatibilityCheckErrorMessage, onShowCompatibilityCheckErrorChanged) as UICheckBox; + showCompatibilityCheckErrorToggle = generalGroup.AddCheckbox(Translation.GetString("Notify_me_if_there_is_an_unexpected_mod_conflict"), GlobalConfig.Instance.Main.ShowCompatibilityCheckErrorMessage, onShowCompatibilityCheckErrorChanged) as UICheckBox; + scanForKnownIncompatibleModsToggle = generalGroup.AddCheckbox(Translation.GetString("Scan_for_known_incompatible_mods_on_startup"), GlobalConfig.Instance.Main.ScanForKnownIncompatibleModsAtStartup, onScanForKnownIncompatibleModsChanged) as UICheckBox; + ignoreDisabledModsToggle = generalGroup.AddCheckbox(Translation.GetString("Ignore_disabled_mods"), GlobalConfig.Instance.Main.IgnoreDisabledMods, onIgnoreDisabledModsChanged) as UICheckBox; + Indent(ignoreDisabledModsToggle); var simGroup = panelHelper.AddGroup(Translation.GetString("Simulation")); simAccuracyDropdown = simGroup.AddDropdown(Translation.GetString("Simulation_accuracy") + ":", new string[] { Translation.GetString("Very_high"), Translation.GetString("High"), Translation.GetString("Medium"), Translation.GetString("Low"), Translation.GetString("Very_Low") }, simAccuracy, onSimAccuracyChanged) as UIDropDown; @@ -252,7 +259,8 @@ public static void makeSettings(UIHelperBase helper) { recklessDriversDropdown = vehBehaviorGroup.AddDropdown(Translation.GetString("Reckless_driving") + ":", new string[] { Translation.GetString("Path_Of_Evil_(10_%)"), Translation.GetString("Rush_Hour_(5_%)"), Translation.GetString("Minor_Complaints_(2_%)"), Translation.GetString("Holy_City_(0_%)") }, recklessDrivers, onRecklessDriversChanged) as UIDropDown; recklessDriversDropdown.width = 300; - realisticSpeedsToggle = vehBehaviorGroup.AddCheckbox(Translation.GetString("Realistic_speeds"), realisticSpeeds, onRealisticSpeedsChanged) as UICheckBox; + individualDrivingStyleToggle = vehBehaviorGroup.AddCheckbox(Translation.GetString("Individual_driving_styles"), individualDrivingStyle, onIndividualDrivingStyleChanged) as UICheckBox; + if (SteamHelper.IsDLCOwned(SteamHelper.DLC.SnowFallDLC)) { strongerRoadConditionEffectsToggle = vehBehaviorGroup.AddCheckbox(Translation.GetString("Road_condition_has_a_bigger_impact_on_vehicle_speed"), strongerRoadConditionEffects, onStrongerRoadConditionEffectsChanged) as UICheckBox; } @@ -477,9 +485,14 @@ public static void makeSettings(UIHelperBase helper) { } private static void Indent(T component) where T : UIComponent { - UIPanel panel = component.parent as UIPanel; - panel.autoLayout = false; - component.relativePosition += new Vector3(30, 0); + UILabel label = component.Find("Label"); + if (label != null) { + label.padding = new RectOffset(22, 0, 0, 0); + } + UISprite check = component.Find("Unchecked"); + if (check != null) { + check.relativePosition += new Vector3(22.0f, 0); + } } private static UIButton AddOptionTab(UITabstrip tabStrip, string caption) { @@ -668,7 +681,24 @@ private static void onShowCompatibilityCheckErrorChanged(bool newValue) { GlobalConfig.WriteConfig(); } - private static void onInstantEffectsChanged(bool newValue) { + private static void onScanForKnownIncompatibleModsChanged(bool newValue) { + Log._Debug($"Show incompatible mod checker warnings changed to {newValue}"); + GlobalConfig.Instance.Main.ScanForKnownIncompatibleModsAtStartup = newValue; + if (newValue) { + GlobalConfig.WriteConfig(); + } else { + setIgnoreDisabledMods(false); + onIgnoreDisabledModsChanged(false); + } + } + + private static void onIgnoreDisabledModsChanged(bool newValue) { + Log._Debug($"Ignore disabled mods changed to {newValue}"); + GlobalConfig.Instance.Main.IgnoreDisabledMods = newValue; + GlobalConfig.WriteConfig(); + } + + private static void onInstantEffectsChanged(bool newValue) { if (!checkGameLoaded()) return; @@ -976,12 +1006,12 @@ private static void onRealisticPublicTransportChanged(bool newValue) { realisticPublicTransport = newValue; } - private static void onRealisticSpeedsChanged(bool value) { + private static void onIndividualDrivingStyleChanged(bool value) { if (!checkGameLoaded()) return; - Log._Debug($"realisticSpeeds changed to {value}"); - realisticSpeeds = value; + Log._Debug($"individualDrivingStyle changed to {value}"); + setIndividualDrivingStyle(value); } private static void onDisableDespawningChanged(bool value) { @@ -1248,10 +1278,12 @@ public static void setRealisticPublicTransport(bool newValue) { realisticPublicTransportToggle.isChecked = newValue; } - public static void setRealisticSpeeds(bool newValue) { - realisticSpeeds = newValue; - if (realisticSpeedsToggle != null) - realisticSpeedsToggle.isChecked = newValue; + public static void setIndividualDrivingStyle(bool newValue) { + individualDrivingStyle = newValue; + + if (individualDrivingStyleToggle != null) { + individualDrivingStyleToggle.isChecked = newValue; + } } public static void setDisableDespawning(bool value) { @@ -1459,8 +1491,24 @@ public static void setShowPathFindStats(bool value) { showPathFindStatsToggle.isChecked = value; } #endif - - /*internal static int getLaneChangingRandomizationTargetValue() { + + public static void setScanForKnownIncompatibleMods(bool value) { + scanForKnownIncompatibleModsEnabled = value; + if (scanForKnownIncompatibleModsToggle != null) { + scanForKnownIncompatibleModsToggle.isChecked = value; + } + if (!value) { + setIgnoreDisabledMods(false); + } + } + + public static void setIgnoreDisabledMods(bool value) { + ignoreDisabledModsEnabled = value; + if (ignoreDisabledModsToggle != null) { + ignoreDisabledModsToggle.isChecked = value; + } + } + /*internal static int getLaneChangingRandomizationTargetValue() { int ret = 100; switch (laneChangingRandomization) { case 0: @@ -1482,7 +1530,7 @@ public static void setShowPathFindStats(bool value) { return ret; }*/ - /*internal static float getLaneChangingProbability() { + /*internal static float getLaneChangingProbability() { switch (laneChangingRandomization) { case 0: return 0.5f; @@ -1498,7 +1546,7 @@ public static void setShowPathFindStats(bool value) { return 0.01f; }*/ - internal static int getRecklessDriverModulo() { + internal static int getRecklessDriverModulo() { switch (recklessDrivers) { case 0: return 10; @@ -1511,5 +1559,13 @@ internal static int getRecklessDriverModulo() { } return 10000; } + + /// + /// Determines whether Dynamic Lane Selection (DLS) is enabled. + /// + /// + public static bool IsDynamicLaneSelectionActive() { + return advancedAI && altLaneSelectionRatio > 0; + } } } diff --git a/TLM/TLM/TLM.csproj b/TLM/TLM/TLM.csproj index 7cb327aa8..cb126ecb2 100644 --- a/TLM/TLM/TLM.csproj +++ b/TLM/TLM/TLM.csproj @@ -103,6 +103,7 @@ + @@ -165,6 +166,7 @@ + @@ -259,6 +261,7 @@ + diff --git a/TLM/TLM/Traffic/Data/VehicleState.cs b/TLM/TLM/Traffic/Data/VehicleState.cs index 1db96ccbd..07a3a0ac8 100644 --- a/TLM/TLM/Traffic/Data/VehicleState.cs +++ b/TLM/TLM/Traffic/Data/VehicleState.cs @@ -13,12 +13,13 @@ using CSUtil.Commons; using TrafficManager.Manager.Impl; using ColossalFramework.Math; +using TrafficManager.State.ConfigData; +using TrafficManager.Util; namespace TrafficManager.Traffic.Data { public struct VehicleState { public const int STATE_UPDATE_SHIFT = 6; public const int JUNCTION_RECHECK_SHIFT = 4; - public const uint MAX_TIMED_RAND = 100; [Flags] public enum Flags { @@ -94,6 +95,15 @@ public float Velocity { public byte timedRand; private VehicleJunctionTransitState junctionTransitState; + // Dynamic Lane Selection + public bool dlsReady; + public float maxReservedSpace; + public float laneSpeedRandInterval; + public int maxOptLaneChanges; + public float maxUnsafeSpeedDiff; + public float minSafeSpeedImprovement; + public float minSafeTrafficImprovement; + public override string ToString() { return $"[VehicleState\n" + "\t" + $"vehicleId = {vehicleId}\n" + @@ -121,6 +131,13 @@ public override string ToString() { "\t" + $"lastAltLaneSelSegmentId = {lastAltLaneSelSegmentId}\n" + "\t" + $"junctionTransitState = {junctionTransitState}\n" + "\t" + $"timedRand = {timedRand}\n" + + "\t" + $"dlsReady = {dlsReady}\n" + + "\t" + $"maxReservedSpace = {maxReservedSpace}\n" + + "\t" + $"laneSpeedRandInterval = {laneSpeedRandInterval}\n" + + "\t" + $"maxOptLaneChanges = {maxOptLaneChanges}\n" + + "\t" + $"maxUnsafeSpeedDiff = {maxUnsafeSpeedDiff}\n" + + "\t" + $"minSafeSpeedImprovement = {minSafeSpeedImprovement}\n" + + "\t" + $"minSafeTrafficImprovement = {minSafeTrafficImprovement}\n" + "VehicleState]"; } @@ -149,6 +166,13 @@ internal VehicleState(ushort vehicleId) { lastAltLaneSelSegmentId = 0; junctionTransitState = VehicleJunctionTransitState.None; timedRand = 0; + dlsReady = false; + maxReservedSpace = 0; + laneSpeedRandInterval = 0; + maxOptLaneChanges = 0; + maxUnsafeSpeedDiff = 0; + minSafeSpeedImprovement = 0; + minSafeTrafficImprovement = 0; } /*private void Reset(bool unlink=true) { // TODO this is called in wrong places! @@ -273,6 +297,8 @@ internal ExtVehicleType OnStartPathFind(ref Vehicle vehicleData, ExtVehicleType? } recklessDriver = Constants.ManagerFactory.VehicleBehaviorManager.IsRecklessDriver(vehicleId, ref vehicleData); + StepRand(true); + UpdateDynamicLaneSelectionParameters(); #if DEBUG if (GlobalConfig.Instance.Debug.Switches[9]) @@ -303,7 +329,10 @@ internal void OnSpawn(ref Vehicle vehicleData) { lastPathId = 0; lastPathPositionIndex = 0; lastAltLaneSelSegmentId = 0; + recklessDriver = Constants.ManagerFactory.VehicleBehaviorManager.IsRecklessDriver(vehicleId, ref vehicleData); + StepRand(true); + UpdateDynamicLaneSelectionParameters(); try { totalLength = vehicleData.CalculateTotalLength(vehicleId); @@ -372,6 +401,10 @@ internal void UpdatePosition(ref Vehicle vehicleData, ref PathUnit.Position curP waitTime = 0; if (end != null) { + if (vehicleData.m_leadingVehicle == 0) { + StepRand(false); + } + #if DEBUGVSTATE if (GlobalConfig.Instance.Debug.Switches[9]) Log._Debug($"VehicleState.UpdatePosition({vehicleId}): Linking vehicle to segment end {end.SegmentId} @ {end.StartNode} ({end.NodeId}). Current position: Seg. {curPos.m_segment}, lane {curPos.m_lane}, offset {curPos.m_offset} / Next position: Seg. {nextPos.m_segment}, lane {nextPos.m_lane}, offset {nextPos.m_offset}"); @@ -460,6 +493,12 @@ internal void OnRelease(ref Vehicle vehicleData) { lastAltLaneSelSegmentId = 0; junctionTransitState = VehicleJunctionTransitState.None; recklessDriver = false; + maxReservedSpace = 0; + laneSpeedRandInterval = 0; + maxOptLaneChanges = 0; + maxUnsafeSpeedDiff = 0; + minSafeSpeedImprovement = 0; + minSafeTrafficImprovement = 0; #if DEBUG if (GlobalConfig.Instance.Debug.Switches[9]) @@ -476,11 +515,50 @@ internal bool IsJunctionTransitStateNew() { return (lastTransitStateUpdate >> STATE_UPDATE_SHIFT) >= (frame >> STATE_UPDATE_SHIFT); } - public void StepRand() { + public void StepRand(bool init) { Randomizer rand = Constants.ServiceFactory.SimulationService.Randomizer; - if (rand.UInt32(20) == 0) { - timedRand = (byte)(((uint)timedRand + rand.UInt32(25)) % MAX_TIMED_RAND); + if (init || (rand.UInt32(GlobalConfig.Instance.Gameplay.VehicleTimedRandModulo) == 0)) { + timedRand = Options.individualDrivingStyle ? (byte)rand.UInt32(100) : (byte)50; + } + } + + public void UpdateDynamicLaneSelectionParameters() { +#if DEBUG + if (GlobalConfig.Instance.Debug.Switches[9]) + Log._Debug($"VehicleState.UpdateDynamicLaneSelectionParameters({vehicleId}) called."); +#endif + + if (!Options.IsDynamicLaneSelectionActive()) { + dlsReady = false; + return; + } + + if (dlsReady) { + return; + } + + float egoism = (float)timedRand / 100f; + float altruism = 1f - egoism; + DynamicLaneSelection dls = GlobalConfig.Instance.DynamicLaneSelection; + + if (Options.individualDrivingStyle) { + maxReservedSpace = recklessDriver + ? Mathf.Lerp(dls.MinMaxRecklessReservedSpace, dls.MaxMaxRecklessReservedSpace, altruism) + : Mathf.Lerp(dls.MinMaxReservedSpace, dls.MaxMaxReservedSpace, altruism); + laneSpeedRandInterval = Mathf.Lerp(dls.MinLaneSpeedRandInterval, dls.MaxLaneSpeedRandInterval, egoism); + maxOptLaneChanges = (int)Math.Round(Mathf.Lerp(dls.MinMaxOptLaneChanges, dls.MaxMaxOptLaneChanges + 1, egoism)); + maxUnsafeSpeedDiff = Mathf.Lerp(dls.MinMaxUnsafeSpeedDiff, dls.MaxMaxOptLaneChanges, egoism); + minSafeSpeedImprovement = Mathf.Lerp(dls.MinMinSafeSpeedImprovement, dls.MaxMinSafeSpeedImprovement, altruism); + minSafeTrafficImprovement = Mathf.Lerp(dls.MinMinSafeTrafficImprovement, dls.MaxMinSafeTrafficImprovement, altruism); + } else { + maxReservedSpace = recklessDriver ? dls.MaxRecklessReservedSpace : dls.MaxReservedSpace; + laneSpeedRandInterval = dls.LaneSpeedRandInterval; + maxOptLaneChanges = dls.MaxOptLaneChanges; + maxUnsafeSpeedDiff = dls.MaxUnsafeSpeedDiff; + minSafeSpeedImprovement = dls.MinSafeSpeedImprovement; + minSafeTrafficImprovement = dls.MinSafeTrafficImprovement; } + dlsReady = true; } private static ushort GetTransitNodeId(ref PathUnit.Position curPos, ref PathUnit.Position nextPos) { diff --git a/TLM/TLM/TrafficManagerMod.cs b/TLM/TLM/TrafficManagerMod.cs index bcf6f2834..bac416def 100644 --- a/TLM/TLM/TrafficManagerMod.cs +++ b/TLM/TLM/TrafficManagerMod.cs @@ -11,13 +11,13 @@ namespace TrafficManager { public class TrafficManagerMod : IUserMod { - public static readonly string Version = "10.18"; + public static readonly string Version = "10.20"; - public static readonly uint GameVersion = 180609552u; + public static readonly uint GameVersion = 184673552u; public static readonly uint GameVersionA = 1u; - public static readonly uint GameVersionB = 11u; - public static readonly uint GameVersionC = 1u; - public static readonly uint GameVersionBuild = 2u; + public static readonly uint GameVersionB = 12u; + public static readonly uint GameVersionC = 0u; + public static readonly uint GameVersionBuild = 5u; public string Name => "TM:PE " + Version; @@ -42,8 +42,10 @@ public void OnSettingsUI(UIHelperBase helper) { } private static void OnGameIntroLoaded() { - ModsCompatibilityChecker mcc = new ModsCompatibilityChecker(); - mcc.PerformModCheck(); + if (GlobalConfig.Instance.Main.ScanForKnownIncompatibleModsAtStartup) { + ModsCompatibilityChecker mcc = new ModsCompatibilityChecker(); + mcc.PerformModCheck(); + } } } } diff --git a/TLM/TLM/UI/IncompatibleModsPanel.cs b/TLM/TLM/UI/IncompatibleModsPanel.cs index 56079f1f9..9b20fb9e5 100644 --- a/TLM/TLM/UI/IncompatibleModsPanel.cs +++ b/TLM/TLM/UI/IncompatibleModsPanel.cs @@ -14,6 +14,7 @@ public class IncompatibleModsPanel : UIPanel { private UIButton closeButton; private UISprite warningIcon; private UIPanel mainPanel; + private UICheckBox runModsCheckerOnStartup; private UIComponent blurEffect; private static IncompatibleModsPanel _instance; @@ -49,7 +50,7 @@ public void Initialize() { title.autoSize = true; title.padding = new RectOffset(10, 10, 15, 15); title.relativePosition = new Vector2(60, 12); - title.text = "Traffic Manager detected incompatible mods"; + title.text = Translation.GetString("Traffic_Manager_detected_incompatible_mods"); closeButton = mainPanel.AddUIComponent(); closeButton.eventClick += CloseButtonClick; @@ -62,6 +63,10 @@ public void Initialize() { panel.relativePosition = new Vector2(20, 70); panel.size = new Vector2(565, 320); + UIHelper helper = new UIHelper(mainPanel); + runModsCheckerOnStartup = helper.AddCheckbox(Translation.GetString("Scan_for_known_incompatible_mods_on_startup"), State.GlobalConfig.Instance.Main.ScanForKnownIncompatibleModsAtStartup, RunModsCheckerOnStartup_eventCheckChanged) as UICheckBox; + runModsCheckerOnStartup.relativePosition = new Vector3(20, height - 30f); + UIScrollablePanel scrollablePanel = panel.AddUIComponent(); scrollablePanel.backgroundSprite = ""; scrollablePanel.size = new Vector2(550, 340); @@ -120,6 +125,11 @@ public void Initialize() { BringToFront(); } + private void RunModsCheckerOnStartup_eventCheckChanged(bool value) { + Log._Debug("Incompatible mods checker run on game launch changed to " + value); + State.Options.setScanForKnownIncompatibleMods(value); + } + private void CloseButtonClick(UIComponent component, UIMouseEventParameter eventparam) { closeButton.eventClick -= CloseButtonClick; TryPopModal(); diff --git a/TLM/TLM/UI/SubTools/TimedTrafficLightsTool.cs b/TLM/TLM/UI/SubTools/TimedTrafficLightsTool.cs index d8c7ece97..5ad3f394e 100644 --- a/TLM/TLM/UI/SubTools/TimedTrafficLightsTool.cs +++ b/TLM/TLM/UI/SubTools/TimedTrafficLightsTool.cs @@ -20,7 +20,7 @@ namespace TrafficManager.UI.SubTools { public class TimedTrafficLightsTool : SubTool { private readonly GUIStyle _counterStyle = new GUIStyle(); private readonly int[] _hoveredButton = new int[2]; - private bool nodeSelectionLocked = false; + private bool nodeSelectionLocked = false; private List SelectedNodeIds = new List(); private bool _cursorInSecondaryPanel; private Rect _windowRect = TrafficManagerTool.MoveGUI(new Rect(0, 0, 480, 350)); @@ -42,7 +42,7 @@ public class TimedTrafficLightsTool : SubTool { private bool inTestMode = false; private ushort nodeIdToCopy = 0; private HashSet currentTimedNodeIds; - + private GUIStyle layout = new GUIStyle { normal = { textColor = new Color(1f, 1f, 1f) } }; private GUIStyle layoutRed = new GUIStyle { normal = { textColor = new Color(1f, 0f, 0f) } }; private GUIStyle layoutGreen = new GUIStyle { normal = { textColor = new Color(0f, 1f, 0f) } }; @@ -360,8 +360,8 @@ private void _guiTimedControlPanel(int num) { foreach (var nodeId in SelectedNodeIds) { tlsMan.TrafficLightSimulations[nodeId].TimedLight?.MoveStep(i, i - 1); } - _timedViewedStep = i - 1; - } + _timedViewedStep = i - 1; + } } else { GUILayout.Space(50); } @@ -371,49 +371,46 @@ private void _guiTimedControlPanel(int num) { foreach (var nodeId in SelectedNodeIds) { tlsMan.TrafficLightSimulations[nodeId].TimedLight?.MoveStep(i, i + 1); } - _timedViewedStep = i + 1; - } + _timedViewedStep = i + 1; + } } else { GUILayout.Space(50); } GUILayout.EndHorizontal(); - if (GUILayout.Button(Translation.GetString("View"), GUILayout.Width(70))) { - _timedPanelAdd = false; - _timedViewedStep = i; - - foreach (var nodeId in SelectedNodeIds) { - tlsMan.TrafficLightSimulations[nodeId].TimedLight?.GetStep(i).UpdateLiveLights(true); - } - } - - if (GUILayout.Button(Translation.GetString("Edit"), GUILayout.Width(65))) { - _timedPanelAdd = false; - _timedEditStep = i; - _timedViewedStep = -1; - _stepMinValue = timedNodeMain.GetStep(i).MinTime; - _stepMaxValue = timedNodeMain.GetStep(i).MaxTime; - _stepMetric = timedNodeMain.GetStep(i).ChangeMetric; - _waitFlowBalance = timedNodeMain.GetStep(i).WaitFlowBalance; - _stepMinValueStr = _stepMinValue.ToString(); - _stepMaxValueStr = _stepMaxValue.ToString(); - nodeSelectionLocked = true; - - foreach (var nodeId in SelectedNodeIds) { - tlsMan.TrafficLightSimulations[nodeId].TimedLight?.GetStep(i).UpdateLiveLights(true); - } - } - - if (GUILayout.Button(Translation.GetString("Delete"), GUILayout.Width(70))) { - _timedPanelAdd = false; - _timedViewedStep = -1; - - foreach (var nodeId in SelectedNodeIds) { - tlsMan.TrafficLightSimulations[nodeId].TimedLight?.RemoveStep(i); - } - } - } + GUI.color = Color.red; + if (GUILayout.Button(Translation.GetString("Delete"), GUILayout.Width(70))) { + RemoveStep(i); + } + GUI.color = Color.white; + + if (GUILayout.Button(Translation.GetString("Edit"), GUILayout.Width(65))) { + _timedPanelAdd = false; + _timedEditStep = i; + _timedViewedStep = -1; + _stepMinValue = timedNodeMain.GetStep(i).MinTime; + _stepMaxValue = timedNodeMain.GetStep(i).MaxTime; + _stepMetric = timedNodeMain.GetStep(i).ChangeMetric; + _waitFlowBalance = timedNodeMain.GetStep(i).WaitFlowBalance; + _stepMinValueStr = _stepMinValue.ToString(); + _stepMaxValueStr = _stepMaxValue.ToString(); + nodeSelectionLocked = true; + + foreach (var nodeId in SelectedNodeIds) { + tlsMan.TrafficLightSimulations[nodeId].TimedLight?.GetStep(i).UpdateLiveLights(true); + } + } + + if (GUILayout.Button(Translation.GetString("View"), GUILayout.Width(70))) { + _timedPanelAdd = false; + _timedViewedStep = i; + + foreach (var nodeId in SelectedNodeIds) { + tlsMan.TrafficLightSimulations[nodeId].TimedLight?.GetStep(i).UpdateLiveLights(true); + } + } + } } } else { nodeSelectionLocked = true; @@ -486,8 +483,12 @@ private void _guiTimedControlPanel(int num) { _stepMaxValueStr = GUILayout.TextField(_stepMaxValueStr, GUILayout.Height(20)); if (!Int32.TryParse(_stepMaxValueStr, out _stepMaxValue)) _stepMaxValue = oldStepMaxValue; + + if (GUILayout.Button("X", GUILayout.Width(22))) { + _timedPanelAdd = false; + } - if (GUILayout.Button(Translation.GetString("Add"), GUILayout.Width(70))) { + if (GUILayout.Button(Translation.GetString("Add"), GUILayout.Width(70))) { TrafficManagerTool.ShowAdvisor(this.GetType().Name + "_AddStep"); if (_stepMinValue < 0) _stepMinValue = 0; @@ -505,9 +506,6 @@ private void _guiTimedControlPanel(int num) { _timedPanelAdd = false; _timedViewedStep = timedNodeMain.NumSteps() - 1; } - if (GUILayout.Button("X", GUILayout.Width(22))) { - _timedPanelAdd = false; - } GUILayout.EndHorizontal(); @@ -523,8 +521,8 @@ private void _guiTimedControlPanel(int num) { nodeSelectionLocked = true; _timedViewedStep = -1; _timedEditStep = -1; - _stepMetric = StepChangeMetric.Default; - } + _stepMetric = StepChangeMetric.Default; + } } } } @@ -579,9 +577,9 @@ private void _guiTimedControlPanel(int num) { if (_timedEditStep < 0 && !_timedPanelAdd) { if (GUILayout.Button(Translation.GetString("Start"))) { _timedPanelAdd = false; - nodeSelectionLocked = false; + nodeSelectionLocked = false; - foreach (var nodeId in SelectedNodeIds) { + foreach (var nodeId in SelectedNodeIds) { tlsMan.TrafficLightSimulations[nodeId].TimedLight?.Start(); } } @@ -601,8 +599,8 @@ private void _guiTimedControlPanel(int num) { if (GUILayout.Button(Translation.GetString("Rotate_left"))) { timedNodeMain.RotateLeft(); - _timedViewedStep = 0; - } + _timedViewedStep = 0; + } if (GUILayout.Button(Translation.GetString("Copy"))) { TrafficManagerTool.ShowAdvisor(this.GetType().Name + "_Copy"); @@ -612,8 +610,8 @@ private void _guiTimedControlPanel(int num) { if (GUILayout.Button(Translation.GetString("Rotate_right"))) { timedNodeMain.RotateRight(); - _timedViewedStep = 0; - } + _timedViewedStep = 0; + } GUILayout.EndHorizontal(); } @@ -621,14 +619,14 @@ private void _guiTimedControlPanel(int num) { if (!timedLightActive) { GUILayout.Space(30); - if (GUILayout.Button(Translation.GetString("Add_junction_to_timed_light"))) { - TrafficManagerTool.ShowAdvisor(this.GetType().Name + "_AddJunction"); + if (GUILayout.Button(Translation.GetString("Add_junction_to_timed_light"))) { + TrafficManagerTool.ShowAdvisor(this.GetType().Name + "_AddJunction"); MainTool.SetToolMode(ToolMode.TimedLightsAddNode); } if (SelectedNodeIds.Count > 1) { - if (GUILayout.Button(Translation.GetString("Remove_junction_from_timed_light"))) { - TrafficManagerTool.ShowAdvisor(this.GetType().Name + "_RemoveJunction"); + if (GUILayout.Button(Translation.GetString("Remove_junction_from_timed_light"))) { + TrafficManagerTool.ShowAdvisor(this.GetType().Name + "_RemoveJunction"); MainTool.SetToolMode(ToolMode.TimedLightsRemoveNode); } } @@ -648,7 +646,17 @@ private void _guiTimedControlPanel(int num) { } } - public override void Cleanup() { + private void RemoveStep(int stepIndex) { + TrafficLightSimulationManager tlsMan = TrafficLightSimulationManager.Instance; + _timedPanelAdd = false; + _timedViewedStep = -1; + + foreach (var nodeId in SelectedNodeIds) { + tlsMan.TrafficLightSimulations[nodeId].TimedLight?.RemoveStep(stepIndex); + } + } + + public override void Cleanup() { SelectedNodeId = 0; ClearSelectedNodes(); @@ -794,8 +802,8 @@ private void _guiTimedTrafficLightsNode() { _windowRect2 = GUILayout.Window(252, _windowRect2, _guiTimedTrafficLightsNodeWindow, Translation.GetString("Select_nodes_windowTitle"), WindowStyle); - _cursorInSecondaryPanel = _windowRect2.Contains(Event.current.mousePosition); - } + _cursorInSecondaryPanel = _windowRect2.Contains(Event.current.mousePosition); + } private void _guiTimedTrafficLights() { TrafficLightSimulationManager tlsMan = TrafficLightSimulationManager.Instance; @@ -809,8 +817,8 @@ private void _guiTimedTrafficLights() { _cursorInSecondaryPanel = _windowRect.Contains(Event.current.mousePosition); GUI.matrix = Matrix4x4.TRS(new Vector3(0, 0, 0), Quaternion.identity, new Vector3(1, 1, 1)); // revert scaling - ShowGUI(); - } + ShowGUI(); + } private void _guiTimedTrafficLightsCopy() { _cursorInSecondaryPanel = false; diff --git a/TLM/TLM/Util/MathUtil.cs b/TLM/TLM/Util/MathUtil.cs new file mode 100644 index 000000000..c49bcc81f --- /dev/null +++ b/TLM/TLM/Util/MathUtil.cs @@ -0,0 +1,13 @@ +using ColossalFramework.Math; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace TrafficManager.Util { + public static class MathUtil { + public static float RandomizeFloat(Randomizer rng, float lower, float upper) { + return ((float)rng.UInt32(0, 10001) / 10000f) * (upper - lower) + lower; + } + } +} diff --git a/TLM/TLM/Util/ModsCompatibilityChecker.cs b/TLM/TLM/Util/ModsCompatibilityChecker.cs index 3135fff0e..df1b5e65a 100644 --- a/TLM/TLM/Util/ModsCompatibilityChecker.cs +++ b/TLM/TLM/Util/ModsCompatibilityChecker.cs @@ -4,7 +4,9 @@ using System.Linq; using System.Reflection; using System.Text; +using ColossalFramework; using ColossalFramework.PlatformServices; +using ColossalFramework.Plugins; using ColossalFramework.UI; using CSUtil.Commons; using TrafficManager.UI; @@ -36,11 +38,14 @@ public void PerformModCheck() { if (incompatibleMods.Count > 0) { Log.Warning("Incompatible mods detected! Count: " + incompatibleMods.Count); - IncompatibleModsPanel panel = UIView.GetAView().AddUIComponent(typeof(IncompatibleModsPanel)) as IncompatibleModsPanel; - panel.IncompatibleMods = incompatibleMods; - panel.Initialize(); - UIView.PushModal(panel); - UIView.SetFocus(panel); + + if (State.GlobalConfig.Instance.Main.ScanForKnownIncompatibleModsAtStartup) { + IncompatibleModsPanel panel = UIView.GetAView().AddUIComponent(typeof(IncompatibleModsPanel)) as IncompatibleModsPanel; + panel.IncompatibleMods = incompatibleMods; + panel.Initialize(); + UIView.PushModal(panel); + UIView.SetFocus(panel); + } } else { Log.Info("No incompatible mods detected"); } @@ -67,6 +72,9 @@ private Dictionary LoadIncompatibleModList() { } private ulong[] GetUserModsList() { + if (State.GlobalConfig.Instance.Main.IgnoreDisabledMods) { + return PluginManager.instance.GetPluginsInfo().Where(plugin => plugin.isEnabled).Select(info => info.publishedFileID.AsUInt64).ToArray(); + } PublishedFileId[] ids = ContentManagerPanel.subscribedItemsTable.ToArray(); return ids.Select(id => id.AsUInt64).ToArray(); }