From e27fc19a525282b988412e2a5c407ec5a91ff6da Mon Sep 17 00:00:00 2001 From: mashitaro <45356789+mashitaro@users.noreply.github.com> Date: Sat, 30 Mar 2019 17:57:46 +0900 Subject: [PATCH 01/54] Update lang_ja.txt --- TLM/TLM/Resources/lang_ja.txt | 228 +++++++++++++++++----------------- 1 file changed, 114 insertions(+), 114 deletions(-) diff --git a/TLM/TLM/Resources/lang_ja.txt b/TLM/TLM/Resources/lang_ja.txt index 86f171a40..646080256 100644 --- a/TLM/TLM/Resources/lang_ja.txt +++ b/TLM/TLM/Resources/lang_ja.txt @@ -113,119 +113,119 @@ 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 オーバーレイ +Realistic_speeds 現実的なスピード +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 この市民を削除する +Show_error_message_if_a_mod_incompatibility_is_detected modの非互換性が検出された場合にエラーメッセージを表示する +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 一方通行路の左右の曲がり角にも適用 From c173d4f1df94240a8879fee9ba7493b6122ee28c Mon Sep 17 00:00:00 2001 From: Victor-Philipp Negoescu Date: Tue, 2 Apr 2019 20:22:21 +0200 Subject: [PATCH 02/54] #263: DLS cost profile varies per vehicle --- .../Manager/Impl/VehicleBehaviorManager.cs | 15 ++-- .../State/ConfigData/DynamicLaneSelection.cs | 72 +++++++++++++++++++ TLM/TLM/TLM.csproj | 1 + TLM/TLM/Traffic/Data/VehicleState.cs | 45 ++++++++++++ TLM/TLM/Util/MathUtil.cs | 13 ++++ 5 files changed, 139 insertions(+), 7 deletions(-) create mode 100644 TLM/TLM/Util/MathUtil.cs diff --git a/TLM/TLM/Manager/Impl/VehicleBehaviorManager.cs b/TLM/TLM/Manager/Impl/VehicleBehaviorManager.cs index 693a2fc78..1707d25fb 100644 --- a/TLM/TLM/Manager/Impl/VehicleBehaviorManager.cs +++ b/TLM/TLM/Manager/Impl/VehicleBehaviorManager.cs @@ -763,6 +763,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 +1169,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 +1214,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; } @@ -1360,7 +1361,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 +1398,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 +1425,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/State/ConfigData/DynamicLaneSelection.cs b/TLM/TLM/State/ConfigData/DynamicLaneSelection.cs index 5772ce9e0..f0f454925 100644 --- a/TLM/TLM/State/ConfigData/DynamicLaneSelection.cs +++ b/TLM/TLM/State/ConfigData/DynamicLaneSelection.cs @@ -44,5 +44,77 @@ public class DynamicLaneSelection { /// Minimum relative speed (in %) where volume measurement starts /// public ushort VolumeMeasurementRelSpeedThreshold = 50; + + // --- + + /// + /// 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; + + /// + /// Minimum lane speed randomization interval + /// + public float MinLaneSpeedRandInterval = 0f; + + /// + /// Maximum lane speed randomization interval + /// + public float MaxLaneSpeedRandInterval = 25f; + + /// + /// Maximum number of considered lane changes + /// + public int MinMaxOptLaneChanges = 1; + + /// + /// Maximum number of considered lane changes + /// + public int MaxMaxOptLaneChanges = 3; + + /// + /// Minimum maximum allowed speed difference for safe lane changes (in game units) + /// + public float MinMaxUnsafeSpeedDiff = 0.1f; + + /// + /// Maximum maximum allowed speed difference for safe lane changes (in game units) + /// + public float MaxMaxUnsafeSpeedDiff = 1f; + + /// + /// 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; + + /// + /// 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/TLM.csproj b/TLM/TLM/TLM.csproj index 7cb327aa8..28dbeeffa 100644 --- a/TLM/TLM/TLM.csproj +++ b/TLM/TLM/TLM.csproj @@ -259,6 +259,7 @@ + diff --git a/TLM/TLM/Traffic/Data/VehicleState.cs b/TLM/TLM/Traffic/Data/VehicleState.cs index 1db96ccbd..002d6ee28 100644 --- a/TLM/TLM/Traffic/Data/VehicleState.cs +++ b/TLM/TLM/Traffic/Data/VehicleState.cs @@ -13,6 +13,8 @@ using CSUtil.Commons; using TrafficManager.Manager.Impl; using ColossalFramework.Math; +using TrafficManager.State.ConfigData; +using TrafficManager.Util; namespace TrafficManager.Traffic.Data { public struct VehicleState { @@ -94,6 +96,14 @@ public float Velocity { public byte timedRand; private VehicleJunctionTransitState junctionTransitState; + // Dynamic Lane Selection + 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,12 @@ public override string ToString() { "\t" + $"lastAltLaneSelSegmentId = {lastAltLaneSelSegmentId}\n" + "\t" + $"junctionTransitState = {junctionTransitState}\n" + "\t" + $"timedRand = {timedRand}\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 +165,12 @@ internal VehicleState(ushort vehicleId) { lastAltLaneSelSegmentId = 0; junctionTransitState = VehicleJunctionTransitState.None; timedRand = 0; + 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 +295,7 @@ internal ExtVehicleType OnStartPathFind(ref Vehicle vehicleData, ExtVehicleType? } recklessDriver = Constants.ManagerFactory.VehicleBehaviorManager.IsRecklessDriver(vehicleId, ref vehicleData); + UpdateTimedRandValues(); #if DEBUG if (GlobalConfig.Instance.Debug.Switches[9]) @@ -303,7 +326,9 @@ internal void OnSpawn(ref Vehicle vehicleData) { lastPathId = 0; lastPathPositionIndex = 0; lastAltLaneSelSegmentId = 0; + recklessDriver = Constants.ManagerFactory.VehicleBehaviorManager.IsRecklessDriver(vehicleId, ref vehicleData); + UpdateTimedRandValues(); try { totalLength = vehicleData.CalculateTotalLength(vehicleId); @@ -460,6 +485,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]) @@ -480,9 +511,23 @@ public void StepRand() { Randomizer rand = Constants.ServiceFactory.SimulationService.Randomizer; if (rand.UInt32(20) == 0) { timedRand = (byte)(((uint)timedRand + rand.UInt32(25)) % MAX_TIMED_RAND); + UpdateTimedRandValues(); } } + private void UpdateTimedRandValues() { + Randomizer rand = Constants.ServiceFactory.SimulationService.Randomizer; + DynamicLaneSelection dls = GlobalConfig.Instance.DynamicLaneSelection; + maxReservedSpace = recklessDriver + ? MathUtil.RandomizeFloat(rand, dls.MinMaxRecklessReservedSpace, dls.MaxMaxRecklessReservedSpace) + : MathUtil.RandomizeFloat(rand, dls.MinMaxReservedSpace, dls.MaxMaxReservedSpace); + laneSpeedRandInterval = MathUtil.RandomizeFloat(rand, dls.MinLaneSpeedRandInterval, dls.MaxLaneSpeedRandInterval); + maxOptLaneChanges = rand.Int32(dls.MinMaxOptLaneChanges, dls.MaxMaxOptLaneChanges + 1); + maxUnsafeSpeedDiff = MathUtil.RandomizeFloat(rand, dls.MinMaxUnsafeSpeedDiff, dls.MaxMaxOptLaneChanges); + minSafeSpeedImprovement = MathUtil.RandomizeFloat(rand, dls.MinMinSafeSpeedImprovement, dls.MaxMinSafeSpeedImprovement); + minSafeTrafficImprovement = MathUtil.RandomizeFloat(rand, dls.MinMinSafeTrafficImprovement, dls.MaxMinSafeTrafficImprovement); + } + private static ushort GetTransitNodeId(ref PathUnit.Position curPos, ref PathUnit.Position nextPos) { bool startNode = IsTransitNodeCurStartNode(ref curPos, ref nextPos); ushort transitNodeId1 = 0; 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; + } + } +} From ada94cb5b4c3add512c4ea0bdca67040807134be Mon Sep 17 00:00:00 2001 From: Victor-Philipp Negoescu Date: Tue, 2 Apr 2019 23:25:50 +0200 Subject: [PATCH 03/54] #263: Improved timed randomization --- TLM/TLM/Manager/Impl/VehicleBehaviorManager.cs | 6 +++--- TLM/TLM/Manager/Impl/VehicleStateManager.cs | 2 -- TLM/TLM/State/ConfigData/Gameplay.cs | 13 +++++++++++++ TLM/TLM/State/GlobalConfig.cs | 6 ++++++ TLM/TLM/Traffic/Data/VehicleState.cs | 6 +++++- 5 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 TLM/TLM/State/ConfigData/Gameplay.cs diff --git a/TLM/TLM/Manager/Impl/VehicleBehaviorManager.cs b/TLM/TLM/Manager/Impl/VehicleBehaviorManager.cs index 1707d25fb..a9063f6fd 100644 --- a/TLM/TLM/Manager/Impl/VehicleBehaviorManager.cs +++ b/TLM/TLM/Manager/Impl/VehicleBehaviorManager.cs @@ -1313,14 +1313,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 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/State/ConfigData/Gameplay.cs b/TLM/TLM/State/ConfigData/Gameplay.cs new file mode 100644 index 000000000..3e65fd57a --- /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 vehicle behavior randomization + /// + public uint VehicleStepRand = 20; + } +} 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/Traffic/Data/VehicleState.cs b/TLM/TLM/Traffic/Data/VehicleState.cs index 002d6ee28..6f516fed8 100644 --- a/TLM/TLM/Traffic/Data/VehicleState.cs +++ b/TLM/TLM/Traffic/Data/VehicleState.cs @@ -397,6 +397,10 @@ internal void UpdatePosition(ref Vehicle vehicleData, ref PathUnit.Position curP waitTime = 0; if (end != null) { + if (vehicleData.m_trailingVehicle == 0) { + StepRand(); + } + #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}"); @@ -509,7 +513,7 @@ internal bool IsJunctionTransitStateNew() { public void StepRand() { Randomizer rand = Constants.ServiceFactory.SimulationService.Randomizer; - if (rand.UInt32(20) == 0) { + if (rand.UInt32(GlobalConfig.Instance.Gameplay.VehicleStepRand) == 0) { timedRand = (byte)(((uint)timedRand + rand.UInt32(25)) % MAX_TIMED_RAND); UpdateTimedRandValues(); } From 2d09feebbce86b38e1218dca286b27f255f7e0fb Mon Sep 17 00:00:00 2001 From: Victor-Philipp Negoescu Date: Tue, 2 Apr 2019 23:29:06 +0200 Subject: [PATCH 04/54] #263: updated project files --- TLM/TLM/TLM.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/TLM/TLM/TLM.csproj b/TLM/TLM/TLM.csproj index 28dbeeffa..71210578c 100644 --- a/TLM/TLM/TLM.csproj +++ b/TLM/TLM/TLM.csproj @@ -165,6 +165,7 @@ + From a903a1daa2faf11df0ff8db65d1f6b5972af5c2f Mon Sep 17 00:00:00 2001 From: krzychu124 Date: Thu, 4 Apr 2019 22:27:11 +0200 Subject: [PATCH 05/54] Fixed options indentation --- TLM/TLM/State/Options.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/TLM/TLM/State/Options.cs b/TLM/TLM/State/Options.cs index 22e9505b9..249bec8bb 100644 --- a/TLM/TLM/State/Options.cs +++ b/TLM/TLM/State/Options.cs @@ -477,9 +477,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); + var label = component.Find("Label"); + if (label != null) { + label.padding = new RectOffset(25, 0, 0, 0); + } + var check = component.Find("Unchecked"); + if (check != null) { + check.relativePosition += new Vector3(25.0f, 0); + } } private static UIButton AddOptionTab(UITabstrip tabStrip, string caption) { From 8a31fe07e9ff03b3b32c789a26cbf6304e9e1438 Mon Sep 17 00:00:00 2001 From: krzychu124 Date: Fri, 5 Apr 2019 00:50:57 +0200 Subject: [PATCH 06/54] minor style changes --- TLM/TLM/State/Options.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/TLM/TLM/State/Options.cs b/TLM/TLM/State/Options.cs index 249bec8bb..792a33aee 100644 --- a/TLM/TLM/State/Options.cs +++ b/TLM/TLM/State/Options.cs @@ -477,13 +477,13 @@ public static void makeSettings(UIHelperBase helper) { } private static void Indent(T component) where T : UIComponent { - var label = component.Find("Label"); + UILabel label = component.Find("Label"); if (label != null) { - label.padding = new RectOffset(25, 0, 0, 0); + label.padding = new RectOffset(22, 0, 0, 0); } - var check = component.Find("Unchecked"); + UISprite check = component.Find("Unchecked"); if (check != null) { - check.relativePosition += new Vector3(25.0f, 0); + check.relativePosition += new Vector3(22.0f, 0); } } From ea06d6f082abbb75c471ee746a275fb4731d1818 Mon Sep 17 00:00:00 2001 From: FireController1847 Date: Fri, 5 Apr 2019 15:28:23 -0600 Subject: [PATCH 07/54] Add Issue Template --- .github/ISSUE_TEMPLATE/bug-report.md | 73 ++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug-report.md diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md new file mode 100644 index 000000000..8be43d7d1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -0,0 +1,73 @@ +--- +name: Bug Report +about: Help us understand what we need to fix. +title: '' +labels: '' +assignees: '' + +--- + +__Bug Description__ +_In one to two sentences, summarize what the issue is._ + + + +__Mod List__ +_Please list the mods that were enabled when you noticed the bug._ + + +__Output Log__ +_Please post your output log here_ + + + +__Savegame__ +_If this bug appeared in a specific save, please link to that here._ + + +__Screenshots__ +_If you have screenshots of the issue, upload them here._ + + + +__Additional Info__ +_Have any other comments? Leave them here._ + + + + From 50b45243a962d0f58bf15a6a8e17295a93e4ec15 Mon Sep 17 00:00:00 2001 From: FireController1847 Date: Sat, 6 Apr 2019 10:17:10 -0600 Subject: [PATCH 08/54] Find a Compromise * I think this is a good compromise between too much markdown and not enough instructions. --- .github/ISSUE_TEMPLATE/bug-report.md | 69 ++++++++++++---------------- 1 file changed, 30 insertions(+), 39 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index 8be43d7d1..5f004576c 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -4,70 +4,61 @@ about: Help us understand what we need to fix. title: '' labels: '' assignees: '' - --- -__Bug Description__ -_In one to two sentences, summarize what the issue is._ - + + +### Description + + + +### Mod List + -__Mod List__ -_Please list the mods that were enabled when you noticed the bug._ - +### Output Log + -__Output Log__ -_Please post your output log here_ - +### Savegame + -__Savegame__ -_If this bug appeared in a specific save, please link to that here._ - -__Screenshots__ -_If you have screenshots of the issue, upload them here._ - +### Screenshots + -__Additional Info__ -_Have any other comments? Leave them here._ - +### Additional Info + From 9499416a5e15cb90d5647a9314d0f45a2d104141 Mon Sep 17 00:00:00 2001 From: FireController1847 Date: Sat, 6 Apr 2019 10:32:47 -0600 Subject: [PATCH 09/54] Add Feature Request Template * Changed wording in bug report to make it better. * Added a Feature Request template. --- .github/ISSUE_TEMPLATE/bug-report.md | 4 +- .github/ISSUE_TEMPLATE/feature-request.md | 46 +++++++++++++++++++++++ 2 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/feature-request.md diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index 5f004576c..c3dae488f 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -6,10 +6,10 @@ labels: '' assignees: '' --- - + ### Description - + ### Mod List diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md new file mode 100644 index 000000000..3f4b28c37 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -0,0 +1,46 @@ +--- +name: Feature Request +about: Make suggestions on how TM:PE could improve. +title: '' +labels: '' +assignees: '' +--- + + + +### Description + + + +### Sources / Links + + + +### Screenshots + + + +### Additional Info + + + + \ No newline at end of file From 0a41a87f98b689262c2ebcd5743ef400ae5fab57 Mon Sep 17 00:00:00 2001 From: FireController1847 Date: Sat, 6 Apr 2019 10:54:13 -0600 Subject: [PATCH 10/54] Add Translations Template --- .github/ISSUE_TEMPLATE/feature-request.md | 2 +- .github/ISSUE_TEMPLATE/translations.md | 38 +++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 .github/ISSUE_TEMPLATE/translations.md diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md index 3f4b28c37..f31a5b60a 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -2,7 +2,7 @@ name: Feature Request about: Make suggestions on how TM:PE could improve. title: '' -labels: '' +labels: 'feature' assignees: '' --- diff --git a/.github/ISSUE_TEMPLATE/translations.md b/.github/ISSUE_TEMPLATE/translations.md new file mode 100644 index 000000000..63d4f06cf --- /dev/null +++ b/.github/ISSUE_TEMPLATE/translations.md @@ -0,0 +1,38 @@ +--- +name: Translations +about: Help us make TM:PE available for everyone, no matter what language. +title: '' +labels: 'localisation' +assignees: '' +--- + + + +### Language + + + +### Localization File + + + +### Additional Information + + + + \ No newline at end of file From 4201e0f080a92b4138b1782333595242a0b3dd84 Mon Sep 17 00:00:00 2001 From: FireController1847 Date: Sat, 6 Apr 2019 10:56:29 -0600 Subject: [PATCH 11/54] Update Localization Example --- .github/ISSUE_TEMPLATE/translations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/translations.md b/.github/ISSUE_TEMPLATE/translations.md index 63d4f06cf..8e068d3c9 100644 --- a/.github/ISSUE_TEMPLATE/translations.md +++ b/.github/ISSUE_TEMPLATE/translations.md @@ -29,7 +29,7 @@ English ### Localization File - ### Description diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md index f31a5b60a..41c400014 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -6,8 +6,6 @@ labels: 'feature' assignees: '' --- - - ### Description From 8ec62071b37b469fce07f04550d89c2b5e920241 Mon Sep 17 00:00:00 2001 From: FireController1847 Date: Sat, 6 Apr 2019 11:16:24 -0600 Subject: [PATCH 13/54] Remove Examples * Renamed Translations to Translation Update * Removed All Examples --- .github/ISSUE_TEMPLATE/bug-report.md | 34 ++---------------- .github/ISSUE_TEMPLATE/feature-request.md | 24 ++----------- .github/ISSUE_TEMPLATE/translation-update.md | 21 +++++++++++ .github/ISSUE_TEMPLATE/translations.md | 38 -------------------- 4 files changed, 25 insertions(+), 92 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/translation-update.md delete mode 100644 .github/ISSUE_TEMPLATE/translations.md diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index 427396fad..8494deef7 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -6,6 +6,8 @@ labels: '' assignees: '' --- + + ### Description @@ -28,35 +30,3 @@ assignees: '' ### Additional Info - - - diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md index 41c400014..827b95896 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -6,6 +6,8 @@ labels: 'feature' assignees: '' --- + + ### Description @@ -20,25 +22,3 @@ assignees: '' ### Additional Info - - - \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/translation-update.md b/.github/ISSUE_TEMPLATE/translation-update.md new file mode 100644 index 000000000..e7a9af8f2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/translation-update.md @@ -0,0 +1,21 @@ +--- +name: Translation Update +about: Help us make TM:PE available for everyone, no matter what language. +title: '' +labels: 'localisation' +assignees: '' +--- + + + + +### Language + + + +### Localization File + + + +### Additional Information + diff --git a/.github/ISSUE_TEMPLATE/translations.md b/.github/ISSUE_TEMPLATE/translations.md deleted file mode 100644 index 8e068d3c9..000000000 --- a/.github/ISSUE_TEMPLATE/translations.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: Translations -about: Help us make TM:PE available for everyone, no matter what language. -title: '' -labels: 'localisation' -assignees: '' ---- - - - -### Language - - - -### Localization File - - - -### Additional Information - - - - \ No newline at end of file From d04c4242f0669b700a86094cd976370107101ed6 Mon Sep 17 00:00:00 2001 From: FireController1847 Date: Sat, 6 Apr 2019 11:33:29 -0600 Subject: [PATCH 14/54] Overhaul Bug Report Template --- .github/ISSUE_TEMPLATE/bug-report.md | 30 ++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index 8494deef7..c9323a097 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -1,32 +1,42 @@ --- name: Bug Report about: Help us understand what we need to fix. -title: '' -labels: '' -assignees: '' +labels: 'bug triage' --- - + ### Description - +Replace me with a short description of the bug. + + +### Reproduction Steps +Please describe how to make this bug issue appear in our own savegames. If you don't know how, delete 2 and 3 and just put "I Don't Know." +1. Replace me with your first step. +2. Then replacement me with your second step. +3. You can add more steps by adding more numbers. Also replace or delete me :) ### Mod List - +List the mods (and their versions) that were enabled when you noticed the bug. +- Replace Me Mod 10.18 +- Replace Me Mod 1.3.7 +- You Can Add More Mods by Adding More Dashes: Replace/Delete Me Mod 4.3 ### Output Log - +We need your output log so we can check for any errors that may have happened when the bug appeared. + ### Savegame - +Optional: If this bug appeared in a specific savegame, please share that below. + ### Screenshots - +Optional: If this bug can be described using screenshots, please share them below. + ### Additional Info - From b8a2c9e66bcedd4cbc9304d06630ffe406c64cfb Mon Sep 17 00:00:00 2001 From: FireController1847 Date: Sat, 6 Apr 2019 11:41:24 -0600 Subject: [PATCH 15/54] Overhaul Feature Request Template --- .github/ISSUE_TEMPLATE/feature-request.md | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md index 827b95896..91ad7fd1c 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -1,24 +1,21 @@ --- name: Feature Request about: Make suggestions on how TM:PE could improve. -title: '' -labels: 'feature' -assignees: '' +labels: 'feature triage' --- - + ### Description - - +Replace me with a short description of the feature. ### Sources / Links - +Optional: Post any links below that describe how your issue works. For example, with turn on red it'd be the link to a "turn on red rule" in a driver's handbook; things like that. ### Screenshots - +Optional: A picture tells a thousand words. If you want to help us understand, please share a concept screenshot of this feature below. + ### Additional Info - From 7f94e79353f28064a8c00cf80891a504855612d4 Mon Sep 17 00:00:00 2001 From: FireController1847 Date: Sat, 6 Apr 2019 11:44:40 -0600 Subject: [PATCH 16/54] Overhaul Translation Update Template --- .github/ISSUE_TEMPLATE/translation-update.md | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/translation-update.md b/.github/ISSUE_TEMPLATE/translation-update.md index e7a9af8f2..db3a3f784 100644 --- a/.github/ISSUE_TEMPLATE/translation-update.md +++ b/.github/ISSUE_TEMPLATE/translation-update.md @@ -1,21 +1,18 @@ --- name: Translation Update about: Help us make TM:PE available for everyone, no matter what language. -title: '' -labels: 'localisation' -assignees: '' +labels: 'localisation triage' --- - - + -### Language - +### 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 Information - +### Additional Info From eb419ddd6c7693c52043be911ac2d6939588b02e Mon Sep 17 00:00:00 2001 From: FireController1847 Date: Sat, 6 Apr 2019 11:47:27 -0600 Subject: [PATCH 17/54] Fix the Labels --- .github/ISSUE_TEMPLATE/bug-report.md | 2 +- .github/ISSUE_TEMPLATE/feature-request.md | 2 +- .github/ISSUE_TEMPLATE/translation-update.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index c9323a097..0f9e81699 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -1,7 +1,7 @@ --- name: Bug Report about: Help us understand what we need to fix. -labels: 'bug triage' +labels: bug triage --- diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md index 91ad7fd1c..af0f51bae 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -1,7 +1,7 @@ --- name: Feature Request about: Make suggestions on how TM:PE could improve. -labels: 'feature triage' +labels: feature triage --- diff --git a/.github/ISSUE_TEMPLATE/translation-update.md b/.github/ISSUE_TEMPLATE/translation-update.md index db3a3f784..0204eaeda 100644 --- a/.github/ISSUE_TEMPLATE/translation-update.md +++ b/.github/ISSUE_TEMPLATE/translation-update.md @@ -1,7 +1,7 @@ --- name: Translation Update about: Help us make TM:PE available for everyone, no matter what language. -labels: 'localisation triage' +labels: localisation triage --- From 726e30fa8a79470ab1224ce6be132d6d81562a3d Mon Sep 17 00:00:00 2001 From: FireController1847 Date: Sat, 6 Apr 2019 11:49:51 -0600 Subject: [PATCH 18/54] *sigh*, why are languages so picky (fix labels again) --- .github/ISSUE_TEMPLATE/bug-report.md | 2 +- .github/ISSUE_TEMPLATE/feature-request.md | 2 +- .github/ISSUE_TEMPLATE/translation-update.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index 0f9e81699..cd485718f 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -1,7 +1,7 @@ --- name: Bug Report about: Help us understand what we need to fix. -labels: bug triage +labels: bug, triage --- diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md index af0f51bae..50713c5fd 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -1,7 +1,7 @@ --- name: Feature Request about: Make suggestions on how TM:PE could improve. -labels: feature triage +labels: feature, triage --- diff --git a/.github/ISSUE_TEMPLATE/translation-update.md b/.github/ISSUE_TEMPLATE/translation-update.md index 0204eaeda..44e982895 100644 --- a/.github/ISSUE_TEMPLATE/translation-update.md +++ b/.github/ISSUE_TEMPLATE/translation-update.md @@ -1,7 +1,7 @@ --- name: Translation Update about: Help us make TM:PE available for everyone, no matter what language. -labels: localisation triage +labels: localisation, triage --- From 7954b387f0051839c834bae82c970dfebdda29e3 Mon Sep 17 00:00:00 2001 From: FireController1847 Date: Sat, 6 Apr 2019 18:44:43 -0600 Subject: [PATCH 19/54] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 75abcb214..bedd725ca 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# 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/subscriptions-text)](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. From 6c07c010ba4158120a84099edcf71a44152cf25d Mon Sep 17 00:00:00 2001 From: FireController1847 Date: Sat, 6 Apr 2019 18:45:57 -0600 Subject: [PATCH 20/54] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bedd725ca..399b241db 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Traffic Manager: *President Edition* [![Steam](https://img.shields.io/endpoint.svg?url=https://shieldsio-steam-workshop.jross.me/583429740/subscriptions-text)](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) +# 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. From 64ff507b5f8b5287d44d25d8ceceb3baabe28d3b Mon Sep 17 00:00:00 2001 From: FireController1847 Date: Sat, 6 Apr 2019 18:47:45 -0600 Subject: [PATCH 21/54] Add quick link to Discord guild 'cause why not --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 399b241db..b2bbb2487 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ 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=1637663252) • [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 From a86a3784f6a2d7056a1940698e9c8920709d5aac Mon Sep 17 00:00:00 2001 From: FireController1847 Date: Sat, 6 Apr 2019 21:00:54 -0600 Subject: [PATCH 22/54] Change around the "Steam Workshop" links * Stable should take presence over labs in most situations because it's the "main mod" per say. * Provides a link to the labs version under contact, because it's a valid source of contact. * If the user wants to subscribe to labs, they can get to it from the stable page in the big bold letters. -- And it's not bad practice, as it's less than the "3 clicks to get to a page" rule for websites. --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b2bbb2487..a8f23f125 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ 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) • [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) +[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 @@ -37,7 +37,8 @@ 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 From 2fafb09583d08831a09cf40cbafda8a7355d33ac Mon Sep 17 00:00:00 2001 From: FireController1847 Date: Mon, 15 Apr 2019 18:20:39 -0600 Subject: [PATCH 23/54] Add more info for Mod List * Recommend testing with ONLY TM:PE before making list all mods. --- .github/ISSUE_TEMPLATE/bug-report.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index cd485718f..5b639f1cc 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -18,7 +18,7 @@ Please describe how to make this bug issue appear in our own savegames. If you d ### Mod List -List the mods (and their versions) that were enabled when you noticed the bug. +Preferrably, if you notice a bug, please see if the bug is still apparent if ONLY TM:PE is enabled. If it is, all you have to put is TM:PE. In either case, please list the mods (and their versions) that were enabled when you noticed the bug. - Replace Me Mod 10.18 - Replace Me Mod 1.3.7 - You Can Add More Mods by Adding More Dashes: Replace/Delete Me Mod 4.3 From 9b5ea98d4ba40b7570720381e41ca0f3a28e7d0e Mon Sep 17 00:00:00 2001 From: krzychu124 Date: Tue, 16 Apr 2019 21:36:56 +0200 Subject: [PATCH 24/54] created confirm action with tooltip on remove step, hold ctrl to skip --- TLM/TLM/Resources/lang.txt | 4 +- TLM/TLM/Resources/lang_de.txt | 4 +- TLM/TLM/Resources/lang_es.txt | 4 +- TLM/TLM/Resources/lang_fr.txt | 4 +- TLM/TLM/Resources/lang_it.txt | 4 +- TLM/TLM/Resources/lang_ja.txt | 4 +- TLM/TLM/Resources/lang_ko.txt | 4 +- TLM/TLM/Resources/lang_nl.txt | 4 +- TLM/TLM/Resources/lang_pl.txt | 4 +- TLM/TLM/Resources/lang_pt.txt | 4 +- TLM/TLM/Resources/lang_ru.txt | 4 +- TLM/TLM/Resources/lang_zh-tw.txt | 4 +- TLM/TLM/Resources/lang_zh.txt | 4 +- TLM/TLM/UI/SubTools/TimedTrafficLightsTool.cs | 114 ++++++++++++------ 14 files changed, 117 insertions(+), 49 deletions(-) diff --git a/TLM/TLM/Resources/lang.txt b/TLM/TLM/Resources/lang.txt index 1d56d62d1..a969b6795 100644 --- a/TLM/TLM/Resources/lang.txt +++ b/TLM/TLM/Resources/lang.txt @@ -228,4 +228,6 @@ Node_is_level_crossing This junction is a level crossing.\nYou cannot disable tr 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 +Timed_traffic_lights_manager_confirm Confirm! +Timed_traffic_lights_manager_right_click_to_cancel Right click to cancel \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_de.txt b/TLM/TLM/Resources/lang_de.txt index f8d3f2962..ec7c7e6f2 100644 --- a/TLM/TLM/Resources/lang_de.txt +++ b/TLM/TLM/Resources/lang_de.txt @@ -228,4 +228,6 @@ Node_is_level_crossing Diese Kreuzung ist ein Bahnübergang.\nDu kannst die Ampe 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 +Timed_traffic_lights_manager_confirm Confirm! +Timed_traffic_lights_manager_right_click_to_cancel Right click to cancel \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_es.txt b/TLM/TLM/Resources/lang_es.txt index cfeb903c2..8da9d0d5e 100644 --- a/TLM/TLM/Resources/lang_es.txt +++ b/TLM/TLM/Resources/lang_es.txt @@ -228,4 +228,6 @@ Node_is_level_crossing This junction is a level crossing.\nYou cannot disable tr 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 +Timed_traffic_lights_manager_confirm Confirm! +Timed_traffic_lights_manager_right_click_to_cancel Right click to cancel \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_fr.txt b/TLM/TLM/Resources/lang_fr.txt index a91c80690..84c785faa 100644 --- a/TLM/TLM/Resources/lang_fr.txt +++ b/TLM/TLM/Resources/lang_fr.txt @@ -228,4 +228,6 @@ Node_is_level_crossing Cette intersection est un passage à niveau.\nous ne pouv Experimental_features Experimental features 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 Also apply to left & right turns between one-way streets +Timed_traffic_lights_manager_confirm Confirm! +Timed_traffic_lights_manager_right_click_to_cancel Right click to cancel \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_it.txt b/TLM/TLM/Resources/lang_it.txt index 7c3307c27..5768e6e5c 100644 --- a/TLM/TLM/Resources/lang_it.txt +++ b/TLM/TLM/Resources/lang_it.txt @@ -228,4 +228,6 @@ Node_is_level_crossing This junction is a level crossing.\nYou cannot disable tr 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 +Timed_traffic_lights_manager_confirm Confirm! +Timed_traffic_lights_manager_right_click_to_cancel Right click to cancel \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_ja.txt b/TLM/TLM/Resources/lang_ja.txt index 86f171a40..de537ae50 100644 --- a/TLM/TLM/Resources/lang_ja.txt +++ b/TLM/TLM/Resources/lang_ja.txt @@ -228,4 +228,6 @@ Node_is_level_crossing This junction is a level crossing.\nYou cannot disable tr 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 +Timed_traffic_lights_manager_confirm Confirm! +Timed_traffic_lights_manager_right_click_to_cancel Right click to cancel \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_ko.txt b/TLM/TLM/Resources/lang_ko.txt index 8a8a002fe..d73c84daf 100644 --- a/TLM/TLM/Resources/lang_ko.txt +++ b/TLM/TLM/Resources/lang_ko.txt @@ -228,4 +228,6 @@ 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 +Also_apply_to_left/right_turns_between_one-way_streets Also apply to left & right turns between one-way streets +Timed_traffic_lights_manager_confirm Confirm! +Timed_traffic_lights_manager_right_click_to_cancel Right click to cancel \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_nl.txt b/TLM/TLM/Resources/lang_nl.txt index bafa2f49a..ce0fc15eb 100644 --- a/TLM/TLM/Resources/lang_nl.txt +++ b/TLM/TLM/Resources/lang_nl.txt @@ -228,4 +228,6 @@ Node_is_level_crossing This junction is a level crossing.\nYou cannot disable tr 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 +Timed_traffic_lights_manager_confirm Confirm! +Timed_traffic_lights_manager_right_click_to_cancel Right click to cancel \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_pl.txt b/TLM/TLM/Resources/lang_pl.txt index eddc52cac..d67a4664e 100644 --- a/TLM/TLM/Resources/lang_pl.txt +++ b/TLM/TLM/Resources/lang_pl.txt @@ -228,4 +228,6 @@ Node_is_level_crossing To jest przejazd kolejowy. \nNie możesz tutaj wyłączy 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 +Timed_traffic_lights_manager_confirm Potwierdź! +Timed_traffic_lights_manager_right_click_to_cancel Kliknij prawym by anulować \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_pt.txt b/TLM/TLM/Resources/lang_pt.txt index 2d581795d..008972bef 100644 --- a/TLM/TLM/Resources/lang_pt.txt +++ b/TLM/TLM/Resources/lang_pt.txt @@ -228,4 +228,6 @@ Node_is_level_crossing This junction is a level crossing.\nYou cannot disable tr 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 +Timed_traffic_lights_manager_confirm Confirm! +Timed_traffic_lights_manager_right_click_to_cancel Right click to cancel \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_ru.txt b/TLM/TLM/Resources/lang_ru.txt index f8c2ee112..2698216be 100644 --- a/TLM/TLM/Resources/lang_ru.txt +++ b/TLM/TLM/Resources/lang_ru.txt @@ -228,4 +228,6 @@ 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 +Also_apply_to_left/right_turns_between_one-way_streets Also apply to left & right turns between one-way streets +Timed_traffic_lights_manager_confirm Confirm! +Timed_traffic_lights_manager_right_click_to_cancel Right click to cancel \ 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..24c48b0d4 100644 --- a/TLM/TLM/Resources/lang_zh-tw.txt +++ b/TLM/TLM/Resources/lang_zh-tw.txt @@ -228,4 +228,6 @@ Node_is_level_crossing This junction is a level crossing.\nYou cannot disable tr 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 +Timed_traffic_lights_manager_confirm Confirm! +Timed_traffic_lights_manager_right_click_to_cancel Right click to cancel \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_zh.txt b/TLM/TLM/Resources/lang_zh.txt index aa49a787a..ed92583f5 100644 --- a/TLM/TLM/Resources/lang_zh.txt +++ b/TLM/TLM/Resources/lang_zh.txt @@ -228,4 +228,6 @@ 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 +Also_apply_to_left/right_turns_between_one-way_streets Also apply to left & right turns between one-way streets +Timed_traffic_lights_manager_confirm Confirm! +Timed_traffic_lights_manager_right_click_to_cancel Right click to cancel \ No newline at end of file diff --git a/TLM/TLM/UI/SubTools/TimedTrafficLightsTool.cs b/TLM/TLM/UI/SubTools/TimedTrafficLightsTool.cs index d8c7ece97..4b023efab 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,12 +42,14 @@ 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) } }; private GUIStyle layoutYellow = new GUIStyle { normal = { textColor = new Color(1f, 1f, 0f) } }; + private int confirmStepRemovalId = -1; // idx of step which removal confirm is shown + public TimedTrafficLightsTool(TrafficManagerTool mainTool) : base(mainTool) { currentTimedNodeIds = new HashSet(); } @@ -360,8 +362,9 @@ private void _guiTimedControlPanel(int num) { foreach (var nodeId in SelectedNodeIds) { tlsMan.TrafficLightSimulations[nodeId].TimedLight?.MoveStep(i, i - 1); } - _timedViewedStep = i - 1; - } + _timedViewedStep = i - 1; + confirmStepRemovalId = -1; + } } else { GUILayout.Space(50); } @@ -371,8 +374,9 @@ private void _guiTimedControlPanel(int num) { foreach (var nodeId in SelectedNodeIds) { tlsMan.TrafficLightSimulations[nodeId].TimedLight?.MoveStep(i, i + 1); } - _timedViewedStep = i + 1; - } + _timedViewedStep = i + 1; + confirmStepRemovalId = -1; + } } else { GUILayout.Space(50); } @@ -386,7 +390,8 @@ private void _guiTimedControlPanel(int num) { foreach (var nodeId in SelectedNodeIds) { tlsMan.TrafficLightSimulations[nodeId].TimedLight?.GetStep(i).UpdateLiveLights(true); } - } + confirmStepRemovalId = -1; + } if (GUILayout.Button(Translation.GetString("Edit"), GUILayout.Width(65))) { _timedPanelAdd = false; @@ -398,22 +403,42 @@ private void _guiTimedControlPanel(int num) { _waitFlowBalance = timedNodeMain.GetStep(i).WaitFlowBalance; _stepMinValueStr = _stepMinValue.ToString(); _stepMaxValueStr = _stepMaxValue.ToString(); - nodeSelectionLocked = true; + nodeSelectionLocked = true; + confirmStepRemovalId = -1; - foreach (var nodeId in SelectedNodeIds) { + 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 (confirmStepRemovalId == i) { + GUI.color = Color.yellow; + if (GUILayout.Button(new GUIContent(Translation.GetString("Timed_traffic_lights_manager_confirm"), Translation.GetString("Timed_traffic_lights_manager_right_click_to_cancel")), GUILayout.Width(70))) { + if (Event.current.button == 0) { + RemoveStep(i); + } + confirmStepRemovalId = -1; + } + if (GUI.tooltip != string.Empty) { + var lastButtonPositionRect = GUILayoutUtility.GetLastRect(); + lastButtonPositionRect.position.Set(lastButtonPositionRect.position.x, lastButtonPositionRect.position.y); // move area to next button for mouse detection over + + GUIStyle tooltipStyle = new GUIStyle(); + tooltipStyle.normal.textColor = Color.yellow; + tooltipStyle.normal.background = WindowTexture; + //TODO calculate with to disable text clip + GUI.Label(new Rect(lastButtonPositionRect.x - 90, lastButtonPositionRect.y - 22, 310, 18), GUI.tooltip, tooltipStyle); + } + } else if (GUILayout.Button(Translation.GetString("Delete"), GUILayout.Width(70))) { + //skip confirmation if ctrl key hold while clicking + if (Event.current.control && Event.current.button == 0) { + RemoveStep(i); + } else { + confirmStepRemovalId = i; + } + } + GUI.color = Color.white; + } } } else { nodeSelectionLocked = true; @@ -523,8 +548,9 @@ private void _guiTimedControlPanel(int num) { nodeSelectionLocked = true; _timedViewedStep = -1; _timedEditStep = -1; - _stepMetric = StepChangeMetric.Default; - } + _stepMetric = StepChangeMetric.Default; + confirmStepRemovalId = -1; + } } } } @@ -579,9 +605,10 @@ private void _guiTimedControlPanel(int num) { if (_timedEditStep < 0 && !_timedPanelAdd) { if (GUILayout.Button(Translation.GetString("Start"))) { _timedPanelAdd = false; - nodeSelectionLocked = false; + nodeSelectionLocked = false; + confirmStepRemovalId = -1; - foreach (var nodeId in SelectedNodeIds) { + foreach (var nodeId in SelectedNodeIds) { tlsMan.TrafficLightSimulations[nodeId].TimedLight?.Start(); } } @@ -601,8 +628,9 @@ private void _guiTimedControlPanel(int num) { if (GUILayout.Button(Translation.GetString("Rotate_left"))) { timedNodeMain.RotateLeft(); - _timedViewedStep = 0; - } + _timedViewedStep = 0; + confirmStepRemovalId = -1; + } if (GUILayout.Button(Translation.GetString("Copy"))) { TrafficManagerTool.ShowAdvisor(this.GetType().Name + "_Copy"); @@ -612,8 +640,9 @@ private void _guiTimedControlPanel(int num) { if (GUILayout.Button(Translation.GetString("Rotate_right"))) { timedNodeMain.RotateRight(); - _timedViewedStep = 0; - } + _timedViewedStep = 0; + confirmStepRemovalId = -1; + } GUILayout.EndHorizontal(); } @@ -621,14 +650,16 @@ 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"))) { + confirmStepRemovalId = -1; + 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"))) { + confirmStepRemovalId = -1; + TrafficManagerTool.ShowAdvisor(this.GetType().Name + "_RemoveJunction"); MainTool.SetToolMode(ToolMode.TimedLightsRemoveNode); } } @@ -648,7 +679,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(); @@ -660,6 +701,7 @@ public override void Cleanup() { _timedViewedStep = -1; timedLightActive = false; nodeIdToCopy = 0; + confirmStepRemovalId = -1; } public override void Initialize() { @@ -794,8 +836,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 +851,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; From fd9af5542219da139bd6a04cd05bf6f2d3aa1a84 Mon Sep 17 00:00:00 2001 From: krzychu124 Date: Wed, 17 Apr 2019 16:37:09 +0200 Subject: [PATCH 25/54] added checkbox to turn off incompatible checker --- TLM/TLM/Resources/lang.txt | 4 +++- TLM/TLM/Resources/lang_de.txt | 4 +++- TLM/TLM/Resources/lang_es.txt | 4 +++- TLM/TLM/Resources/lang_fr.txt | 4 +++- TLM/TLM/Resources/lang_it.txt | 4 +++- TLM/TLM/Resources/lang_ja.txt | 2 ++ TLM/TLM/Resources/lang_ko.txt | 4 +++- TLM/TLM/Resources/lang_nl.txt | 4 +++- TLM/TLM/Resources/lang_pl.txt | 4 +++- TLM/TLM/Resources/lang_pt.txt | 4 +++- TLM/TLM/Resources/lang_ru.txt | 4 +++- TLM/TLM/Resources/lang_zh-tw.txt | 4 +++- TLM/TLM/Resources/lang_zh.txt | 4 +++- TLM/TLM/State/ConfigData/Main.cs | 5 +++++ TLM/TLM/State/Options.cs | 10 +++++++++- TLM/TLM/TrafficManagerMod.cs | 6 ++++-- TLM/TLM/UI/IncompatibleModsPanel.cs | 12 ++++++++++++ TLM/TLM/Util/ModsCompatibilityChecker.cs | 15 ++++++++++----- 18 files changed, 78 insertions(+), 20 deletions(-) diff --git a/TLM/TLM/Resources/lang.txt b/TLM/TLM/Resources/lang.txt index 1d56d62d1..1ed8ae62a 100644 --- a/TLM/TLM/Resources/lang.txt +++ b/TLM/TLM/Resources/lang.txt @@ -228,4 +228,6 @@ Node_is_level_crossing This junction is a level crossing.\nYou cannot disable tr 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 +Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected +Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_de.txt b/TLM/TLM/Resources/lang_de.txt index f8d3f2962..ca2cf48de 100644 --- a/TLM/TLM/Resources/lang_de.txt +++ b/TLM/TLM/Resources/lang_de.txt @@ -228,4 +228,6 @@ Node_is_level_crossing Diese Kreuzung ist ein Bahnübergang.\nDu kannst die Ampe 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 +Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected +Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_es.txt b/TLM/TLM/Resources/lang_es.txt index cfeb903c2..6dd5537f9 100644 --- a/TLM/TLM/Resources/lang_es.txt +++ b/TLM/TLM/Resources/lang_es.txt @@ -228,4 +228,6 @@ Node_is_level_crossing This junction is a level crossing.\nYou cannot disable tr 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 +Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected +Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_fr.txt b/TLM/TLM/Resources/lang_fr.txt index a91c80690..d3cbb91e9 100644 --- a/TLM/TLM/Resources/lang_fr.txt +++ b/TLM/TLM/Resources/lang_fr.txt @@ -228,4 +228,6 @@ Node_is_level_crossing Cette intersection est un passage à niveau.\nous ne pouv Experimental_features Experimental features 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 Also apply to left & right turns between one-way streets +Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected +Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_it.txt b/TLM/TLM/Resources/lang_it.txt index 7c3307c27..e91500f52 100644 --- a/TLM/TLM/Resources/lang_it.txt +++ b/TLM/TLM/Resources/lang_it.txt @@ -228,4 +228,6 @@ Node_is_level_crossing This junction is a level crossing.\nYou cannot disable tr 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 +Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected +Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_ja.txt b/TLM/TLM/Resources/lang_ja.txt index 646080256..adaec8e2e 100644 --- a/TLM/TLM/Resources/lang_ja.txt +++ b/TLM/TLM/Resources/lang_ja.txt @@ -229,3 +229,5 @@ Experimental_features 実験的な機能 Turn_on_red 赤信号で曲がる Vehicles_may_turn_on_red 車両が赤信号で曲がることがある Also_apply_to_left/right_turns_between_one-way_streets 一方通行路の左右の曲がり角にも適用 +Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected +Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch diff --git a/TLM/TLM/Resources/lang_ko.txt b/TLM/TLM/Resources/lang_ko.txt index 8a8a002fe..cffd4d11b 100644 --- a/TLM/TLM/Resources/lang_ko.txt +++ b/TLM/TLM/Resources/lang_ko.txt @@ -228,4 +228,6 @@ 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 +Also_apply_to_left/right_turns_between_one-way_streets Also apply to left & right turns between one-way streets +Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected +Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_nl.txt b/TLM/TLM/Resources/lang_nl.txt index bafa2f49a..3140ff984 100644 --- a/TLM/TLM/Resources/lang_nl.txt +++ b/TLM/TLM/Resources/lang_nl.txt @@ -228,4 +228,6 @@ Node_is_level_crossing This junction is a level crossing.\nYou cannot disable tr 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 +Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected +Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_pl.txt b/TLM/TLM/Resources/lang_pl.txt index eddc52cac..0c42d0999 100644 --- a/TLM/TLM/Resources/lang_pl.txt +++ b/TLM/TLM/Resources/lang_pl.txt @@ -228,4 +228,6 @@ Node_is_level_crossing To jest przejazd kolejowy. \nNie możesz tutaj wyłączy 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 +Show_warning_popup_if_an_incompatible_was_detected Pokaż ostrzeżenie jeśli znaleziono niekompatybilne mody +Incompatible_mods_checker_autorun_on_game_launch Uruchamiaj sprawdzanie przy starcie gry \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_pt.txt b/TLM/TLM/Resources/lang_pt.txt index 2d581795d..b40f1c4da 100644 --- a/TLM/TLM/Resources/lang_pt.txt +++ b/TLM/TLM/Resources/lang_pt.txt @@ -228,4 +228,6 @@ Node_is_level_crossing This junction is a level crossing.\nYou cannot disable tr 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 +Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected +Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_ru.txt b/TLM/TLM/Resources/lang_ru.txt index f8c2ee112..2aa1982fa 100644 --- a/TLM/TLM/Resources/lang_ru.txt +++ b/TLM/TLM/Resources/lang_ru.txt @@ -228,4 +228,6 @@ 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 +Also_apply_to_left/right_turns_between_one-way_streets Also apply to left & right turns between one-way streets +Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected +Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch \ 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..8aba45ddf 100644 --- a/TLM/TLM/Resources/lang_zh-tw.txt +++ b/TLM/TLM/Resources/lang_zh-tw.txt @@ -228,4 +228,6 @@ Node_is_level_crossing This junction is a level crossing.\nYou cannot disable tr 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 +Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected +Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_zh.txt b/TLM/TLM/Resources/lang_zh.txt index aa49a787a..d9326d43f 100644 --- a/TLM/TLM/Resources/lang_zh.txt +++ b/TLM/TLM/Resources/lang_zh.txt @@ -228,4 +228,6 @@ 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 +Also_apply_to_left/right_turns_between_one-way_streets Also apply to left & right turns between one-way streets +Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected +Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch \ No newline at end of file diff --git a/TLM/TLM/State/ConfigData/Main.cs b/TLM/TLM/State/ConfigData/Main.cs index a30f40fa6..8b8404507 100644 --- a/TLM/TLM/State/ConfigData/Main.cs +++ b/TLM/TLM/State/ConfigData/Main.cs @@ -50,6 +50,11 @@ public class Main { /// public bool ShowCompatibilityCheckErrorMessage = false; + /// + /// Shows warning dialog if any incompatible mods detected + /// + public bool ShowIncompatibleModCheckerWarning = true; + public void AddDisplayedTutorialMessage(string messageKey) { HashSet newMessages = DisplayedTutorialMessages != null ? new HashSet(DisplayedTutorialMessages) : new HashSet(); newMessages.Add(messageKey); diff --git a/TLM/TLM/State/Options.cs b/TLM/TLM/State/Options.cs index 792a33aee..918e18ef9 100644 --- a/TLM/TLM/State/Options.cs +++ b/TLM/TLM/State/Options.cs @@ -29,6 +29,7 @@ public class Options : MonoBehaviour { private static UICheckBox tinyMenuToggle = null; private static UICheckBox enableTutorialToggle = null; private static UICheckBox showCompatibilityCheckErrorToggle = null; + private static UICheckBox showIncompatibleModCheckerWarningToggle = null; private static UICheckBox realisticSpeedsToggle = null; private static UIDropDown recklessDriversDropdown = null; private static UICheckBox relaxedBussesToggle = null; @@ -228,6 +229,7 @@ public static void makeSettings(UIHelperBase helper) { 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; + showIncompatibleModCheckerWarningToggle = generalGroup.AddCheckbox(Translation.GetString("Show_warning_popup_if_an_incompatible_was_detected"), GlobalConfig.Instance.Main.ShowIncompatibleModCheckerWarning, onShowIncompatibleModCheckerWarningChanged) as UICheckBox; 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; @@ -673,7 +675,13 @@ private static void onShowCompatibilityCheckErrorChanged(bool newValue) { GlobalConfig.WriteConfig(); } - private static void onInstantEffectsChanged(bool newValue) { + private static void onShowIncompatibleModCheckerWarningChanged(bool newValue) { + Log._Debug($"Show incompatible mod checker warnings changed to {newValue}"); + GlobalConfig.Instance.Main.ShowIncompatibleModCheckerWarning = newValue; + GlobalConfig.WriteConfig(); + } + + private static void onInstantEffectsChanged(bool newValue) { if (!checkGameLoaded()) return; diff --git a/TLM/TLM/TrafficManagerMod.cs b/TLM/TLM/TrafficManagerMod.cs index bcf6f2834..dc93cec8f 100644 --- a/TLM/TLM/TrafficManagerMod.cs +++ b/TLM/TLM/TrafficManagerMod.cs @@ -42,8 +42,10 @@ public void OnSettingsUI(UIHelperBase helper) { } private static void OnGameIntroLoaded() { - ModsCompatibilityChecker mcc = new ModsCompatibilityChecker(); - mcc.PerformModCheck(); + if (GlobalConfig.Instance.Main.ShowIncompatibleModCheckerWarning) { + ModsCompatibilityChecker mcc = new ModsCompatibilityChecker(); + mcc.PerformModCheck(); + } } } } diff --git a/TLM/TLM/UI/IncompatibleModsPanel.cs b/TLM/TLM/UI/IncompatibleModsPanel.cs index 56079f1f9..24f0c4fe6 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; @@ -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("Incompatible_mods_checker_autorun_on_game_launch"), State.GlobalConfig.Instance.Main.ShowIncompatibleModCheckerWarning, 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,13 @@ public void Initialize() { BringToFront(); } + private void RunModsCheckerOnStartup_eventCheckChanged(bool value) { + Log._Debug("Incompatible mods checker run on game launch changed to " + value); + State.GlobalConfig.Instance.Main.ShowIncompatibleModCheckerWarning = value; + State.GlobalConfig.WriteConfig(); + State.GlobalConfig.Reload(true); + } + private void CloseButtonClick(UIComponent component, UIMouseEventParameter eventparam) { closeButton.eventClick -= CloseButtonClick; TryPopModal(); diff --git a/TLM/TLM/Util/ModsCompatibilityChecker.cs b/TLM/TLM/Util/ModsCompatibilityChecker.cs index 3135fff0e..691e6954d 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.ShowIncompatibleModCheckerWarning) { + 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"); } From 7262bba20f603943bd3e290e2bc636ffe2d1cd37 Mon Sep 17 00:00:00 2001 From: krzychu124 Date: Wed, 17 Apr 2019 21:24:02 +0200 Subject: [PATCH 26/54] implemented option to check only enabled mod for incompatibles, fixed issue with desync --- TLM/TLM/Resources/lang.txt | 4 ++- TLM/TLM/Resources/lang_de.txt | 4 ++- TLM/TLM/Resources/lang_es.txt | 4 ++- TLM/TLM/Resources/lang_fr.txt | 4 ++- TLM/TLM/Resources/lang_it.txt | 4 ++- TLM/TLM/Resources/lang_ja.txt | 2 ++ TLM/TLM/Resources/lang_ko.txt | 4 ++- TLM/TLM/Resources/lang_nl.txt | 4 ++- TLM/TLM/Resources/lang_pl.txt | 4 ++- TLM/TLM/Resources/lang_pt.txt | 4 ++- TLM/TLM/Resources/lang_ru.txt | 4 ++- TLM/TLM/Resources/lang_zh-tw.txt | 4 ++- TLM/TLM/Resources/lang_zh.txt | 4 ++- TLM/TLM/State/ConfigData/Main.cs | 5 ++++ TLM/TLM/State/Options.cs | 38 ++++++++++++++++++++++-- TLM/TLM/UI/IncompatibleModsPanel.cs | 6 ++-- TLM/TLM/Util/ModsCompatibilityChecker.cs | 3 ++ 17 files changed, 83 insertions(+), 19 deletions(-) diff --git a/TLM/TLM/Resources/lang.txt b/TLM/TLM/Resources/lang.txt index 1ed8ae62a..3fbb8273c 100644 --- a/TLM/TLM/Resources/lang.txt +++ b/TLM/TLM/Resources/lang.txt @@ -230,4 +230,6 @@ 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 Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected -Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch \ No newline at end of file +Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch +Check_only_enabled_mods Check only enabled mods +Traffic_Manager_detected_incompatible_mods Traffic Manager detected incompatible mods \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_de.txt b/TLM/TLM/Resources/lang_de.txt index ca2cf48de..1378435a2 100644 --- a/TLM/TLM/Resources/lang_de.txt +++ b/TLM/TLM/Resources/lang_de.txt @@ -230,4 +230,6 @@ 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 Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected -Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch \ No newline at end of file +Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch +Check_only_enabled_mods Check only enabled mods +Traffic_Manager_detected_incompatible_mods Traffic Manager detected incompatible mods \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_es.txt b/TLM/TLM/Resources/lang_es.txt index 6dd5537f9..1edc7a81a 100644 --- a/TLM/TLM/Resources/lang_es.txt +++ b/TLM/TLM/Resources/lang_es.txt @@ -230,4 +230,6 @@ 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 Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected -Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch \ No newline at end of file +Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch +Check_only_enabled_mods Check only enabled mods +Traffic_Manager_detected_incompatible_mods Traffic Manager detected incompatible mods \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_fr.txt b/TLM/TLM/Resources/lang_fr.txt index d3cbb91e9..1fe58a3c8 100644 --- a/TLM/TLM/Resources/lang_fr.txt +++ b/TLM/TLM/Resources/lang_fr.txt @@ -230,4 +230,6 @@ 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 Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected -Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch \ No newline at end of file +Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch +Check_only_enabled_mods Check only enabled mods +Traffic_Manager_detected_incompatible_mods Traffic Manager detected incompatible mods \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_it.txt b/TLM/TLM/Resources/lang_it.txt index e91500f52..b55128311 100644 --- a/TLM/TLM/Resources/lang_it.txt +++ b/TLM/TLM/Resources/lang_it.txt @@ -230,4 +230,6 @@ 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 Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected -Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch \ No newline at end of file +Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch +Check_only_enabled_mods Check only enabled mods +Traffic_Manager_detected_incompatible_mods Traffic Manager detected incompatible mods \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_ja.txt b/TLM/TLM/Resources/lang_ja.txt index adaec8e2e..4360af8c1 100644 --- a/TLM/TLM/Resources/lang_ja.txt +++ b/TLM/TLM/Resources/lang_ja.txt @@ -231,3 +231,5 @@ Vehicles_may_turn_on_red 車両が赤信号で曲がることがある Also_apply_to_left/right_turns_between_one-way_streets 一方通行路の左右の曲がり角にも適用 Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch +Check_only_enabled_mods Check only enabled mods +Traffic_Manager_detected_incompatible_mods Traffic Manager detected incompatible mods diff --git a/TLM/TLM/Resources/lang_ko.txt b/TLM/TLM/Resources/lang_ko.txt index cffd4d11b..079aec228 100644 --- a/TLM/TLM/Resources/lang_ko.txt +++ b/TLM/TLM/Resources/lang_ko.txt @@ -230,4 +230,6 @@ 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 Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected -Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch \ No newline at end of file +Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch +Check_only_enabled_mods Check only enabled mods +Traffic_Manager_detected_incompatible_mods Traffic Manager detected incompatible mods \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_nl.txt b/TLM/TLM/Resources/lang_nl.txt index 3140ff984..dd1baf8a3 100644 --- a/TLM/TLM/Resources/lang_nl.txt +++ b/TLM/TLM/Resources/lang_nl.txt @@ -230,4 +230,6 @@ 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 Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected -Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch \ No newline at end of file +Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch +Check_only_enabled_mods Check only enabled mods +Traffic_Manager_detected_incompatible_mods Traffic Manager detected incompatible mods \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_pl.txt b/TLM/TLM/Resources/lang_pl.txt index 0c42d0999..c6d90b8ac 100644 --- a/TLM/TLM/Resources/lang_pl.txt +++ b/TLM/TLM/Resources/lang_pl.txt @@ -230,4 +230,6 @@ 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 Show_warning_popup_if_an_incompatible_was_detected Pokaż ostrzeżenie jeśli znaleziono niekompatybilne mody -Incompatible_mods_checker_autorun_on_game_launch Uruchamiaj sprawdzanie przy starcie gry \ No newline at end of file +Incompatible_mods_checker_autorun_on_game_launch Uruchamiaj sprawdzanie przy starcie gry +Check_only_enabled_mods Sprawdzaj tylko włączone mody +Traffic_Manager_detected_incompatible_mods Traffic Manager wykrył niezgodne mody \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_pt.txt b/TLM/TLM/Resources/lang_pt.txt index b40f1c4da..f87c4147a 100644 --- a/TLM/TLM/Resources/lang_pt.txt +++ b/TLM/TLM/Resources/lang_pt.txt @@ -230,4 +230,6 @@ 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 Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected -Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch \ No newline at end of file +Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch +Check_only_enabled_mods Check only enabled mods +Traffic_Manager_detected_incompatible_mods Traffic Manager detected incompatible mods \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_ru.txt b/TLM/TLM/Resources/lang_ru.txt index 2aa1982fa..68ff6cf0c 100644 --- a/TLM/TLM/Resources/lang_ru.txt +++ b/TLM/TLM/Resources/lang_ru.txt @@ -230,4 +230,6 @@ 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 Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected -Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch \ No newline at end of file +Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch +Check_only_enabled_mods Check only enabled mods +Traffic_Manager_detected_incompatible_mods Traffic Manager detected incompatible mods \ 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 8aba45ddf..6cc4a0128 100644 --- a/TLM/TLM/Resources/lang_zh-tw.txt +++ b/TLM/TLM/Resources/lang_zh-tw.txt @@ -230,4 +230,6 @@ 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 Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected -Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch \ No newline at end of file +Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch +Check_only_enabled_mods Check only enabled mods +Traffic_Manager_detected_incompatible_mods Traffic Manager detected incompatible mods \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_zh.txt b/TLM/TLM/Resources/lang_zh.txt index d9326d43f..ef5c77c09 100644 --- a/TLM/TLM/Resources/lang_zh.txt +++ b/TLM/TLM/Resources/lang_zh.txt @@ -230,4 +230,6 @@ 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 Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected -Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch \ No newline at end of file +Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch +Check_only_enabled_mods Check only enabled mods +Traffic_Manager_detected_incompatible_mods Traffic Manager detected incompatible mods \ No newline at end of file diff --git a/TLM/TLM/State/ConfigData/Main.cs b/TLM/TLM/State/ConfigData/Main.cs index 8b8404507..8dda37bea 100644 --- a/TLM/TLM/State/ConfigData/Main.cs +++ b/TLM/TLM/State/ConfigData/Main.cs @@ -55,6 +55,11 @@ public class Main { /// public bool ShowIncompatibleModCheckerWarning = true; + /// + /// Skip disabled mods while running incompatible mod detector + /// + public bool CheckOnlyEnabledMods = false; + public void AddDisplayedTutorialMessage(string messageKey) { HashSet newMessages = DisplayedTutorialMessages != null ? new HashSet(DisplayedTutorialMessages) : new HashSet(); newMessages.Add(messageKey); diff --git a/TLM/TLM/State/Options.cs b/TLM/TLM/State/Options.cs index 918e18ef9..d4675c787 100644 --- a/TLM/TLM/State/Options.cs +++ b/TLM/TLM/State/Options.cs @@ -30,6 +30,7 @@ public class Options : MonoBehaviour { private static UICheckBox enableTutorialToggle = null; private static UICheckBox showCompatibilityCheckErrorToggle = null; private static UICheckBox showIncompatibleModCheckerWarningToggle = null; + private static UICheckBox checkOnlyEnabledModsToggle = null; private static UICheckBox realisticSpeedsToggle = null; private static UIDropDown recklessDriversDropdown = null; private static UICheckBox relaxedBussesToggle = null; @@ -156,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 showIncompatibleModCheckerWarningEnabled = true; + public static bool checkOnlyEnabledMods = false; public static VehicleRestrictionsAggression vehicleRestrictionsAggression = VehicleRestrictionsAggression.Medium; @@ -230,6 +233,8 @@ public static void makeSettings(UIHelperBase helper) { 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; showIncompatibleModCheckerWarningToggle = generalGroup.AddCheckbox(Translation.GetString("Show_warning_popup_if_an_incompatible_was_detected"), GlobalConfig.Instance.Main.ShowIncompatibleModCheckerWarning, onShowIncompatibleModCheckerWarningChanged) as UICheckBox; + checkOnlyEnabledModsToggle = generalGroup.AddCheckbox(Translation.GetString("Check_only_enabled_mods"), GlobalConfig.Instance.Main.CheckOnlyEnabledMods, onCheckOnlyEnabledModsChanged) as UICheckBox; + Indent(checkOnlyEnabledModsToggle); 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; @@ -678,6 +683,17 @@ private static void onShowCompatibilityCheckErrorChanged(bool newValue) { private static void onShowIncompatibleModCheckerWarningChanged(bool newValue) { Log._Debug($"Show incompatible mod checker warnings changed to {newValue}"); GlobalConfig.Instance.Main.ShowIncompatibleModCheckerWarning = newValue; + if (newValue) { + GlobalConfig.WriteConfig(); + } else { + setCheckOnlyEnabledMods(false); + onCheckOnlyEnabledModsChanged(false); + } + } + + private static void onCheckOnlyEnabledModsChanged(bool newValue) { + Log._Debug($"Check only enabled mods changed to {newValue}"); + GlobalConfig.Instance.Main.CheckOnlyEnabledMods = newValue; GlobalConfig.WriteConfig(); } @@ -1472,8 +1488,24 @@ public static void setShowPathFindStats(bool value) { showPathFindStatsToggle.isChecked = value; } #endif + + public static void setShowIncompatibleModCheckerWarning(bool value) { + showIncompatibleModCheckerWarningEnabled = value; + if (showIncompatibleModCheckerWarningToggle != null) { + showIncompatibleModCheckerWarningToggle.isChecked = value; + } + if (!value) { + setCheckOnlyEnabledMods(false); + } + } - /*internal static int getLaneChangingRandomizationTargetValue() { + public static void setCheckOnlyEnabledMods(bool value) { + checkOnlyEnabledMods = value; + if (checkOnlyEnabledModsToggle != null) { + checkOnlyEnabledModsToggle.isChecked = value; + } + } + /*internal static int getLaneChangingRandomizationTargetValue() { int ret = 100; switch (laneChangingRandomization) { case 0: @@ -1495,7 +1527,7 @@ public static void setShowPathFindStats(bool value) { return ret; }*/ - /*internal static float getLaneChangingProbability() { + /*internal static float getLaneChangingProbability() { switch (laneChangingRandomization) { case 0: return 0.5f; @@ -1511,7 +1543,7 @@ public static void setShowPathFindStats(bool value) { return 0.01f; }*/ - internal static int getRecklessDriverModulo() { + internal static int getRecklessDriverModulo() { switch (recklessDrivers) { case 0: return 10; diff --git a/TLM/TLM/UI/IncompatibleModsPanel.cs b/TLM/TLM/UI/IncompatibleModsPanel.cs index 24f0c4fe6..351490cc3 100644 --- a/TLM/TLM/UI/IncompatibleModsPanel.cs +++ b/TLM/TLM/UI/IncompatibleModsPanel.cs @@ -50,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; @@ -127,9 +127,7 @@ public void Initialize() { private void RunModsCheckerOnStartup_eventCheckChanged(bool value) { Log._Debug("Incompatible mods checker run on game launch changed to " + value); - State.GlobalConfig.Instance.Main.ShowIncompatibleModCheckerWarning = value; - State.GlobalConfig.WriteConfig(); - State.GlobalConfig.Reload(true); + State.Options.setShowIncompatibleModCheckerWarning(value); } private void CloseButtonClick(UIComponent component, UIMouseEventParameter eventparam) { diff --git a/TLM/TLM/Util/ModsCompatibilityChecker.cs b/TLM/TLM/Util/ModsCompatibilityChecker.cs index 691e6954d..3564b131a 100644 --- a/TLM/TLM/Util/ModsCompatibilityChecker.cs +++ b/TLM/TLM/Util/ModsCompatibilityChecker.cs @@ -72,6 +72,9 @@ private Dictionary LoadIncompatibleModList() { } private ulong[] GetUserModsList() { + if (State.GlobalConfig.Instance.Main.CheckOnlyEnabledMods) { + 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(); } From bd9b5dc5f0f3bc92be543d29ed880a2a068030eb Mon Sep 17 00:00:00 2001 From: krzychu124 Date: Thu, 18 Apr 2019 18:25:13 +0200 Subject: [PATCH 27/54] updated translations --- TLM/TLM/Resources/lang.txt | 9 ++--- TLM/TLM/Resources/lang_de.txt | 9 ++--- TLM/TLM/Resources/lang_es.txt | 9 ++--- TLM/TLM/Resources/lang_fr.txt | 9 ++--- TLM/TLM/Resources/lang_it.txt | 9 ++--- TLM/TLM/Resources/lang_ja.txt | 7 ++-- TLM/TLM/Resources/lang_ko.txt | 9 ++--- TLM/TLM/Resources/lang_nl.txt | 9 ++--- TLM/TLM/Resources/lang_pl.txt | 9 ++--- TLM/TLM/Resources/lang_pt.txt | 9 ++--- TLM/TLM/Resources/lang_ru.txt | 9 ++--- TLM/TLM/Resources/lang_template.txt | 7 +++- TLM/TLM/Resources/lang_zh-tw.txt | 9 ++--- TLM/TLM/Resources/lang_zh.txt | 9 ++--- TLM/TLM/State/ConfigData/Main.cs | 4 +- TLM/TLM/State/Options.cs | 48 ++++++++++++------------ TLM/TLM/TrafficManagerMod.cs | 2 +- TLM/TLM/UI/IncompatibleModsPanel.cs | 4 +- TLM/TLM/Util/ModsCompatibilityChecker.cs | 4 +- 19 files changed, 87 insertions(+), 97 deletions(-) diff --git a/TLM/TLM/Resources/lang.txt b/TLM/TLM/Resources/lang.txt index 3fbb8273c..3cec98f37 100644 --- a/TLM/TLM/Resources/lang.txt +++ b/TLM/TLM/Resources/lang.txt @@ -222,14 +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 -Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected -Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch -Check_only_enabled_mods Check only enabled mods -Traffic_Manager_detected_incompatible_mods Traffic Manager detected incompatible mods \ No newline at end of file +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 1378435a2..da6304904 100644 --- a/TLM/TLM/Resources/lang_de.txt +++ b/TLM/TLM/Resources/lang_de.txt @@ -222,14 +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 -Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected -Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch -Check_only_enabled_mods Check only enabled mods -Traffic_Manager_detected_incompatible_mods Traffic Manager detected incompatible mods \ No newline at end of file +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 1edc7a81a..20e12f61e 100644 --- a/TLM/TLM/Resources/lang_es.txt +++ b/TLM/TLM/Resources/lang_es.txt @@ -222,14 +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 -Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected -Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch -Check_only_enabled_mods Check only enabled mods -Traffic_Manager_detected_incompatible_mods Traffic Manager detected incompatible mods \ No newline at end of file +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 1fe58a3c8..bfa70dd27 100644 --- a/TLM/TLM/Resources/lang_fr.txt +++ b/TLM/TLM/Resources/lang_fr.txt @@ -222,14 +222,13 @@ Compact_main_menu Menu principal compact Window_transparency Fenêtre transparente Overlay_transparency Superposition de transparence 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 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 -Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected -Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch -Check_only_enabled_mods Check only enabled mods -Traffic_Manager_detected_incompatible_mods Traffic Manager detected incompatible mods \ No newline at end of file +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 Afficher le message d'erreur si une incompatibilité d'un mod est détectée \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_it.txt b/TLM/TLM/Resources/lang_it.txt index b55128311..4de9a9c57 100644 --- a/TLM/TLM/Resources/lang_it.txt +++ b/TLM/TLM/Resources/lang_it.txt @@ -222,14 +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 -Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected -Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch -Check_only_enabled_mods Check only enabled mods -Traffic_Manager_detected_incompatible_mods Traffic Manager detected incompatible mods \ No newline at end of file +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 4360af8c1..8326ecc28 100644 --- a/TLM/TLM/Resources/lang_ja.txt +++ b/TLM/TLM/Resources/lang_ja.txt @@ -222,14 +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 この交差点は踏切です。\nここで信号機を無効にすることはできません。 Experimental_features 実験的な機能 Turn_on_red 赤信号で曲がる Vehicles_may_turn_on_red 車両が赤信号で曲がることがある Also_apply_to_left/right_turns_between_one-way_streets 一方通行路の左右の曲がり角にも適用 -Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected -Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch -Check_only_enabled_mods Check only enabled mods +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 079aec228..20ad53368 100644 --- a/TLM/TLM/Resources/lang_ko.txt +++ b/TLM/TLM/Resources/lang_ko.txt @@ -222,14 +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 -Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected -Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch -Check_only_enabled_mods Check only enabled mods -Traffic_Manager_detected_incompatible_mods Traffic Manager detected incompatible mods \ No newline at end of file +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 모드와 비 호환되는 모드 발견 시 에러 보여주기 \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_nl.txt b/TLM/TLM/Resources/lang_nl.txt index dd1baf8a3..25d39bc05 100644 --- a/TLM/TLM/Resources/lang_nl.txt +++ b/TLM/TLM/Resources/lang_nl.txt @@ -222,14 +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 -Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected -Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch -Check_only_enabled_mods Check only enabled mods -Traffic_Manager_detected_incompatible_mods Traffic Manager detected incompatible mods \ No newline at end of file +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 c6d90b8ac..d2d2379a0 100644 --- a/TLM/TLM/Resources/lang_pl.txt +++ b/TLM/TLM/Resources/lang_pl.txt @@ -222,14 +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 -Show_warning_popup_if_an_incompatible_was_detected Pokaż ostrzeżenie jeśli znaleziono niekompatybilne mody -Incompatible_mods_checker_autorun_on_game_launch Uruchamiaj sprawdzanie przy starcie gry -Check_only_enabled_mods Sprawdzaj tylko włączone mody -Traffic_Manager_detected_incompatible_mods Traffic Manager wykrył niezgodne mody \ No newline at end of file +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 f87c4147a..c981124b5 100644 --- a/TLM/TLM/Resources/lang_pt.txt +++ b/TLM/TLM/Resources/lang_pt.txt @@ -222,14 +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 -Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected -Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch -Check_only_enabled_mods Check only enabled mods -Traffic_Manager_detected_incompatible_mods Traffic Manager detected incompatible mods \ No newline at end of file +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 68ff6cf0c..77a5e3017 100644 --- a/TLM/TLM/Resources/lang_ru.txt +++ b/TLM/TLM/Resources/lang_ru.txt @@ -222,14 +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 -Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected -Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch -Check_only_enabled_mods Check only enabled mods -Traffic_Manager_detected_incompatible_mods Traffic Manager detected incompatible mods \ No newline at end of file +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 Показывать сообщение об ошибке при несовместимости мода \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_template.txt b/TLM/TLM/Resources/lang_template.txt index 73137c736..4fe07cba1 100644 --- a/TLM/TLM/Resources/lang_template.txt +++ b/TLM/TLM/Resources/lang_template.txt @@ -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 6cc4a0128..00a2eccfe 100644 --- a/TLM/TLM/Resources/lang_zh-tw.txt +++ b/TLM/TLM/Resources/lang_zh-tw.txt @@ -222,14 +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 -Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected -Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch -Check_only_enabled_mods Check only enabled mods -Traffic_Manager_detected_incompatible_mods Traffic Manager detected incompatible mods \ No newline at end of file +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 ef5c77c09..4a884050f 100644 --- a/TLM/TLM/Resources/lang_zh.txt +++ b/TLM/TLM/Resources/lang_zh.txt @@ -222,14 +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 -Show_warning_popup_if_an_incompatible_was_detected Show warning popup if an incompatible mod was detected -Incompatible_mods_checker_autorun_on_game_launch Autorun on game launch -Check_only_enabled_mods Check only enabled mods -Traffic_Manager_detected_incompatible_mods Traffic Manager detected incompatible mods \ No newline at end of file +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/State/ConfigData/Main.cs b/TLM/TLM/State/ConfigData/Main.cs index 8dda37bea..f6f61940b 100644 --- a/TLM/TLM/State/ConfigData/Main.cs +++ b/TLM/TLM/State/ConfigData/Main.cs @@ -53,12 +53,12 @@ public class Main { /// /// Shows warning dialog if any incompatible mods detected /// - public bool ShowIncompatibleModCheckerWarning = true; + public bool ScanForKnownIncompatibleModsAtStartup = true; /// /// Skip disabled mods while running incompatible mod detector /// - public bool CheckOnlyEnabledMods = false; + public bool IgnoreDisabledMods = false; public void AddDisplayedTutorialMessage(string messageKey) { HashSet newMessages = DisplayedTutorialMessages != null ? new HashSet(DisplayedTutorialMessages) : new HashSet(); diff --git a/TLM/TLM/State/Options.cs b/TLM/TLM/State/Options.cs index d4675c787..42986aeeb 100644 --- a/TLM/TLM/State/Options.cs +++ b/TLM/TLM/State/Options.cs @@ -29,8 +29,8 @@ public class Options : MonoBehaviour { private static UICheckBox tinyMenuToggle = null; private static UICheckBox enableTutorialToggle = null; private static UICheckBox showCompatibilityCheckErrorToggle = null; - private static UICheckBox showIncompatibleModCheckerWarningToggle = null; - private static UICheckBox checkOnlyEnabledModsToggle = null; + private static UICheckBox scanForKnownIncompatibleModsToggle = null; + private static UICheckBox ignoreDisabledModsToggle = null; private static UICheckBox realisticSpeedsToggle = null; private static UIDropDown recklessDriversDropdown = null; private static UICheckBox relaxedBussesToggle = null; @@ -157,8 +157,8 @@ public class Options : MonoBehaviour { public static bool junctionRestrictionsEnabled = true; public static bool turnOnRedEnabled = true; public static bool laneConnectorEnabled = true; - public static bool showIncompatibleModCheckerWarningEnabled = true; - public static bool checkOnlyEnabledMods = false; + public static bool scanForKnownIncompatibleModsEnabled = true; + public static bool ignoreDisabledModsEnabled = false; public static VehicleRestrictionsAggression vehicleRestrictionsAggression = VehicleRestrictionsAggression.Medium; @@ -231,10 +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; - showIncompatibleModCheckerWarningToggle = generalGroup.AddCheckbox(Translation.GetString("Show_warning_popup_if_an_incompatible_was_detected"), GlobalConfig.Instance.Main.ShowIncompatibleModCheckerWarning, onShowIncompatibleModCheckerWarningChanged) as UICheckBox; - checkOnlyEnabledModsToggle = generalGroup.AddCheckbox(Translation.GetString("Check_only_enabled_mods"), GlobalConfig.Instance.Main.CheckOnlyEnabledMods, onCheckOnlyEnabledModsChanged) as UICheckBox; - Indent(checkOnlyEnabledModsToggle); + 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; @@ -680,20 +680,20 @@ private static void onShowCompatibilityCheckErrorChanged(bool newValue) { GlobalConfig.WriteConfig(); } - private static void onShowIncompatibleModCheckerWarningChanged(bool newValue) { + private static void onScanForKnownIncompatibleModsChanged(bool newValue) { Log._Debug($"Show incompatible mod checker warnings changed to {newValue}"); - GlobalConfig.Instance.Main.ShowIncompatibleModCheckerWarning = newValue; + GlobalConfig.Instance.Main.ScanForKnownIncompatibleModsAtStartup = newValue; if (newValue) { GlobalConfig.WriteConfig(); } else { - setCheckOnlyEnabledMods(false); - onCheckOnlyEnabledModsChanged(false); + setIgnoreDisabledMods(false); + onIgnoreDisabledModsChanged(false); } } - private static void onCheckOnlyEnabledModsChanged(bool newValue) { - Log._Debug($"Check only enabled mods changed to {newValue}"); - GlobalConfig.Instance.Main.CheckOnlyEnabledMods = newValue; + private static void onIgnoreDisabledModsChanged(bool newValue) { + Log._Debug($"Ignore disabled mods changed to {newValue}"); + GlobalConfig.Instance.Main.IgnoreDisabledMods = newValue; GlobalConfig.WriteConfig(); } @@ -1489,20 +1489,20 @@ public static void setShowPathFindStats(bool value) { } #endif - public static void setShowIncompatibleModCheckerWarning(bool value) { - showIncompatibleModCheckerWarningEnabled = value; - if (showIncompatibleModCheckerWarningToggle != null) { - showIncompatibleModCheckerWarningToggle.isChecked = value; + public static void setScanForKnownIncompatibleMods(bool value) { + scanForKnownIncompatibleModsEnabled = value; + if (scanForKnownIncompatibleModsToggle != null) { + scanForKnownIncompatibleModsToggle.isChecked = value; } if (!value) { - setCheckOnlyEnabledMods(false); + setIgnoreDisabledMods(false); } } - public static void setCheckOnlyEnabledMods(bool value) { - checkOnlyEnabledMods = value; - if (checkOnlyEnabledModsToggle != null) { - checkOnlyEnabledModsToggle.isChecked = value; + public static void setIgnoreDisabledMods(bool value) { + ignoreDisabledModsEnabled = value; + if (ignoreDisabledModsToggle != null) { + ignoreDisabledModsToggle.isChecked = value; } } /*internal static int getLaneChangingRandomizationTargetValue() { diff --git a/TLM/TLM/TrafficManagerMod.cs b/TLM/TLM/TrafficManagerMod.cs index dc93cec8f..ceaceee06 100644 --- a/TLM/TLM/TrafficManagerMod.cs +++ b/TLM/TLM/TrafficManagerMod.cs @@ -42,7 +42,7 @@ public void OnSettingsUI(UIHelperBase helper) { } private static void OnGameIntroLoaded() { - if (GlobalConfig.Instance.Main.ShowIncompatibleModCheckerWarning) { + 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 351490cc3..9b20fb9e5 100644 --- a/TLM/TLM/UI/IncompatibleModsPanel.cs +++ b/TLM/TLM/UI/IncompatibleModsPanel.cs @@ -64,7 +64,7 @@ public void Initialize() { panel.size = new Vector2(565, 320); UIHelper helper = new UIHelper(mainPanel); - runModsCheckerOnStartup = helper.AddCheckbox(Translation.GetString("Incompatible_mods_checker_autorun_on_game_launch"), State.GlobalConfig.Instance.Main.ShowIncompatibleModCheckerWarning, RunModsCheckerOnStartup_eventCheckChanged) as UICheckBox; + 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(); @@ -127,7 +127,7 @@ public void Initialize() { private void RunModsCheckerOnStartup_eventCheckChanged(bool value) { Log._Debug("Incompatible mods checker run on game launch changed to " + value); - State.Options.setShowIncompatibleModCheckerWarning(value); + State.Options.setScanForKnownIncompatibleMods(value); } private void CloseButtonClick(UIComponent component, UIMouseEventParameter eventparam) { diff --git a/TLM/TLM/Util/ModsCompatibilityChecker.cs b/TLM/TLM/Util/ModsCompatibilityChecker.cs index 3564b131a..df1b5e65a 100644 --- a/TLM/TLM/Util/ModsCompatibilityChecker.cs +++ b/TLM/TLM/Util/ModsCompatibilityChecker.cs @@ -39,7 +39,7 @@ public void PerformModCheck() { if (incompatibleMods.Count > 0) { Log.Warning("Incompatible mods detected! Count: " + incompatibleMods.Count); - if (State.GlobalConfig.Instance.Main.ShowIncompatibleModCheckerWarning) { + if (State.GlobalConfig.Instance.Main.ScanForKnownIncompatibleModsAtStartup) { IncompatibleModsPanel panel = UIView.GetAView().AddUIComponent(typeof(IncompatibleModsPanel)) as IncompatibleModsPanel; panel.IncompatibleMods = incompatibleMods; panel.Initialize(); @@ -72,7 +72,7 @@ private Dictionary LoadIncompatibleModList() { } private ulong[] GetUserModsList() { - if (State.GlobalConfig.Instance.Main.CheckOnlyEnabledMods) { + 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(); From 0a136912ec958657faeffb9981a8115faf8768b8 Mon Sep 17 00:00:00 2001 From: krzychu124 Date: Thu, 18 Apr 2019 20:13:02 +0200 Subject: [PATCH 28/54] changed order of buttons --- TLM/TLM/UI/SubTools/TimedTrafficLightsTool.cs | 64 ++++++++++--------- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/TLM/TLM/UI/SubTools/TimedTrafficLightsTool.cs b/TLM/TLM/UI/SubTools/TimedTrafficLightsTool.cs index 4b023efab..16e43b97e 100644 --- a/TLM/TLM/UI/SubTools/TimedTrafficLightsTool.cs +++ b/TLM/TLM/UI/SubTools/TimedTrafficLightsTool.cs @@ -383,33 +383,6 @@ private void _guiTimedControlPanel(int num) { 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); - } - confirmStepRemovalId = -1; - } - - 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; - confirmStepRemovalId = -1; - - foreach (var nodeId in SelectedNodeIds) { - tlsMan.TrafficLightSimulations[nodeId].TimedLight?.GetStep(i).UpdateLiveLights(true); - } - } GUI.color = Color.red; if (confirmStepRemovalId == i) { GUI.color = Color.yellow; @@ -438,6 +411,34 @@ private void _guiTimedControlPanel(int num) { } } 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; + confirmStepRemovalId = -1; + + 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); + } + confirmStepRemovalId = -1; + } } } } else { @@ -511,8 +512,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; @@ -530,9 +535,6 @@ private void _guiTimedControlPanel(int num) { _timedPanelAdd = false; _timedViewedStep = timedNodeMain.NumSteps() - 1; } - if (GUILayout.Button("X", GUILayout.Width(22))) { - _timedPanelAdd = false; - } GUILayout.EndHorizontal(); From 9a35e1d4625bc9cd2b985db45b301f6e51f924fa Mon Sep 17 00:00:00 2001 From: krzychu124 Date: Sat, 20 Apr 2019 16:13:58 +0200 Subject: [PATCH 29/54] updated translation in lang_zh.txt --- TLM/TLM/Resources/lang_zh.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/TLM/TLM/Resources/lang_zh.txt b/TLM/TLM/Resources/lang_zh.txt index 4a884050f..b70262511 100644 --- a/TLM/TLM/Resources/lang_zh.txt +++ b/TLM/TLM/Resources/lang_zh.txt @@ -224,11 +224,11 @@ Overlay_transparency 覆盖透明度 Remove_this_citizen 移除此居民 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 -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 +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 From 075b88d1febd507e05ddb491b97b289434109fe6 Mon Sep 17 00:00:00 2001 From: Guy Fraser Date: Sat, 20 Apr 2019 15:17:09 +0100 Subject: [PATCH 30/54] Update incompatible_mods.txt Fixes #271 Vanilla Trees Remover added to incompatible mods list. It causes issues with mod options for TM:PE and other mods. Symptoms are either: Completely blank mods screen, or options from a different mod are shown. TPB is aware of the issue. --- TLM/TLM/Resources/incompatible_mods.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TLM/TLM/Resources/incompatible_mods.txt b/TLM/TLM/Resources/incompatible_mods.txt index 3a70377d8..714cb2e45 100644 --- a/TLM/TLM/Resources/incompatible_mods.txt +++ b/TLM/TLM/Resources/incompatible_mods.txt @@ -43,4 +43,5 @@ 813833476;Skylines Overwatch [1.6] 408209297;Extended Road Upgrade 417926819;Road Assistant -631930385;Realistic Vehicle Speeds \ No newline at end of file +631930385;Realistic Vehicle Speeds +877950833;Vanilla Trees Remover \ No newline at end of file From beb10fffbef49c4d9ea59f76a20dd42d5ab0cb53 Mon Sep 17 00:00:00 2001 From: krzychu124 Date: Sat, 20 Apr 2019 16:30:27 +0200 Subject: [PATCH 31/54] removed delete confirm button, removed unnecessary translation keys --- TLM/TLM/Resources/lang.txt | 4 +- TLM/TLM/Resources/lang_de.txt | 4 +- TLM/TLM/Resources/lang_es.txt | 4 +- TLM/TLM/Resources/lang_fr.txt | 4 +- TLM/TLM/Resources/lang_it.txt | 4 +- TLM/TLM/Resources/lang_ja.txt | 4 +- TLM/TLM/Resources/lang_ko.txt | 4 +- TLM/TLM/Resources/lang_nl.txt | 4 +- TLM/TLM/Resources/lang_pl.txt | 4 +- TLM/TLM/Resources/lang_pt.txt | 4 +- TLM/TLM/Resources/lang_ru.txt | 4 +- TLM/TLM/Resources/lang_zh-tw.txt | 4 +- TLM/TLM/Resources/lang_zh.txt | 4 +- TLM/TLM/UI/SubTools/TimedTrafficLightsTool.cs | 42 +------------------ 14 files changed, 15 insertions(+), 79 deletions(-) diff --git a/TLM/TLM/Resources/lang.txt b/TLM/TLM/Resources/lang.txt index a969b6795..1d56d62d1 100644 --- a/TLM/TLM/Resources/lang.txt +++ b/TLM/TLM/Resources/lang.txt @@ -228,6 +228,4 @@ Node_is_level_crossing This junction is a level crossing.\nYou cannot disable tr 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 -Timed_traffic_lights_manager_confirm Confirm! -Timed_traffic_lights_manager_right_click_to_cancel Right click to cancel \ 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 \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_de.txt b/TLM/TLM/Resources/lang_de.txt index ec7c7e6f2..f8d3f2962 100644 --- a/TLM/TLM/Resources/lang_de.txt +++ b/TLM/TLM/Resources/lang_de.txt @@ -228,6 +228,4 @@ Node_is_level_crossing Diese Kreuzung ist ein Bahnübergang.\nDu kannst die Ampe 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 -Timed_traffic_lights_manager_confirm Confirm! -Timed_traffic_lights_manager_right_click_to_cancel Right click to cancel \ 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 \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_es.txt b/TLM/TLM/Resources/lang_es.txt index 8da9d0d5e..cfeb903c2 100644 --- a/TLM/TLM/Resources/lang_es.txt +++ b/TLM/TLM/Resources/lang_es.txt @@ -228,6 +228,4 @@ Node_is_level_crossing This junction is a level crossing.\nYou cannot disable tr 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 -Timed_traffic_lights_manager_confirm Confirm! -Timed_traffic_lights_manager_right_click_to_cancel Right click to cancel \ 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 \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_fr.txt b/TLM/TLM/Resources/lang_fr.txt index 84c785faa..a91c80690 100644 --- a/TLM/TLM/Resources/lang_fr.txt +++ b/TLM/TLM/Resources/lang_fr.txt @@ -228,6 +228,4 @@ Node_is_level_crossing Cette intersection est un passage à niveau.\nous ne pouv Experimental_features Experimental features 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 -Timed_traffic_lights_manager_confirm Confirm! -Timed_traffic_lights_manager_right_click_to_cancel Right click to cancel \ 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 \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_it.txt b/TLM/TLM/Resources/lang_it.txt index 5768e6e5c..7c3307c27 100644 --- a/TLM/TLM/Resources/lang_it.txt +++ b/TLM/TLM/Resources/lang_it.txt @@ -228,6 +228,4 @@ Node_is_level_crossing This junction is a level crossing.\nYou cannot disable tr 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 -Timed_traffic_lights_manager_confirm Confirm! -Timed_traffic_lights_manager_right_click_to_cancel Right click to cancel \ 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 \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_ja.txt b/TLM/TLM/Resources/lang_ja.txt index 7eed71d07..1f67efabf 100644 --- a/TLM/TLM/Resources/lang_ja.txt +++ b/TLM/TLM/Resources/lang_ja.txt @@ -228,6 +228,4 @@ 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 一方通行路の左右の曲がり角にも適用 -Timed_traffic_lights_manager_confirm Confirm! -Timed_traffic_lights_manager_right_click_to_cancel Right click to cancel \ No newline at end of file +Also_apply_to_left/right_turns_between_one-way_streets 一方通行路の左右の曲がり角にも適用 \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_ko.txt b/TLM/TLM/Resources/lang_ko.txt index d73c84daf..8a8a002fe 100644 --- a/TLM/TLM/Resources/lang_ko.txt +++ b/TLM/TLM/Resources/lang_ko.txt @@ -228,6 +228,4 @@ 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 -Timed_traffic_lights_manager_confirm Confirm! -Timed_traffic_lights_manager_right_click_to_cancel Right click to cancel \ 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 \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_nl.txt b/TLM/TLM/Resources/lang_nl.txt index ce0fc15eb..bafa2f49a 100644 --- a/TLM/TLM/Resources/lang_nl.txt +++ b/TLM/TLM/Resources/lang_nl.txt @@ -228,6 +228,4 @@ Node_is_level_crossing This junction is a level crossing.\nYou cannot disable tr 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 -Timed_traffic_lights_manager_confirm Confirm! -Timed_traffic_lights_manager_right_click_to_cancel Right click to cancel \ 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 \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_pl.txt b/TLM/TLM/Resources/lang_pl.txt index d67a4664e..eddc52cac 100644 --- a/TLM/TLM/Resources/lang_pl.txt +++ b/TLM/TLM/Resources/lang_pl.txt @@ -228,6 +228,4 @@ Node_is_level_crossing To jest przejazd kolejowy. \nNie możesz tutaj wyłączy 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 -Timed_traffic_lights_manager_confirm Potwierdź! -Timed_traffic_lights_manager_right_click_to_cancel Kliknij prawym by anulować \ 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 \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_pt.txt b/TLM/TLM/Resources/lang_pt.txt index 008972bef..2d581795d 100644 --- a/TLM/TLM/Resources/lang_pt.txt +++ b/TLM/TLM/Resources/lang_pt.txt @@ -228,6 +228,4 @@ Node_is_level_crossing This junction is a level crossing.\nYou cannot disable tr 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 -Timed_traffic_lights_manager_confirm Confirm! -Timed_traffic_lights_manager_right_click_to_cancel Right click to cancel \ 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 \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_ru.txt b/TLM/TLM/Resources/lang_ru.txt index 2698216be..f8c2ee112 100644 --- a/TLM/TLM/Resources/lang_ru.txt +++ b/TLM/TLM/Resources/lang_ru.txt @@ -228,6 +228,4 @@ 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 -Timed_traffic_lights_manager_confirm Confirm! -Timed_traffic_lights_manager_right_click_to_cancel Right click to cancel \ 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 \ 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 24c48b0d4..c61090da7 100644 --- a/TLM/TLM/Resources/lang_zh-tw.txt +++ b/TLM/TLM/Resources/lang_zh-tw.txt @@ -228,6 +228,4 @@ Node_is_level_crossing This junction is a level crossing.\nYou cannot disable tr 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 -Timed_traffic_lights_manager_confirm Confirm! -Timed_traffic_lights_manager_right_click_to_cancel Right click to cancel \ 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 \ No newline at end of file diff --git a/TLM/TLM/Resources/lang_zh.txt b/TLM/TLM/Resources/lang_zh.txt index ed92583f5..aa49a787a 100644 --- a/TLM/TLM/Resources/lang_zh.txt +++ b/TLM/TLM/Resources/lang_zh.txt @@ -228,6 +228,4 @@ 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 -Timed_traffic_lights_manager_confirm Confirm! -Timed_traffic_lights_manager_right_click_to_cancel Right click to cancel \ 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 \ No newline at end of file diff --git a/TLM/TLM/UI/SubTools/TimedTrafficLightsTool.cs b/TLM/TLM/UI/SubTools/TimedTrafficLightsTool.cs index 16e43b97e..543dc900a 100644 --- a/TLM/TLM/UI/SubTools/TimedTrafficLightsTool.cs +++ b/TLM/TLM/UI/SubTools/TimedTrafficLightsTool.cs @@ -48,8 +48,6 @@ public class TimedTrafficLightsTool : SubTool { private GUIStyle layoutGreen = new GUIStyle { normal = { textColor = new Color(0f, 1f, 0f) } }; private GUIStyle layoutYellow = new GUIStyle { normal = { textColor = new Color(1f, 1f, 0f) } }; - private int confirmStepRemovalId = -1; // idx of step which removal confirm is shown - public TimedTrafficLightsTool(TrafficManagerTool mainTool) : base(mainTool) { currentTimedNodeIds = new HashSet(); } @@ -363,7 +361,6 @@ private void _guiTimedControlPanel(int num) { tlsMan.TrafficLightSimulations[nodeId].TimedLight?.MoveStep(i, i - 1); } _timedViewedStep = i - 1; - confirmStepRemovalId = -1; } } else { GUILayout.Space(50); @@ -375,42 +372,16 @@ private void _guiTimedControlPanel(int num) { tlsMan.TrafficLightSimulations[nodeId].TimedLight?.MoveStep(i, i + 1); } _timedViewedStep = i + 1; - confirmStepRemovalId = -1; } } else { GUILayout.Space(50); } GUILayout.EndHorizontal(); - - GUI.color = Color.red; - if (confirmStepRemovalId == i) { - GUI.color = Color.yellow; - if (GUILayout.Button(new GUIContent(Translation.GetString("Timed_traffic_lights_manager_confirm"), Translation.GetString("Timed_traffic_lights_manager_right_click_to_cancel")), GUILayout.Width(70))) { - if (Event.current.button == 0) { - RemoveStep(i); - } - confirmStepRemovalId = -1; - } - if (GUI.tooltip != string.Empty) { - var lastButtonPositionRect = GUILayoutUtility.GetLastRect(); - lastButtonPositionRect.position.Set(lastButtonPositionRect.position.x, lastButtonPositionRect.position.y); // move area to next button for mouse detection over - - GUIStyle tooltipStyle = new GUIStyle(); - tooltipStyle.normal.textColor = Color.yellow; - tooltipStyle.normal.background = WindowTexture; - //TODO calculate with to disable text clip - GUI.Label(new Rect(lastButtonPositionRect.x - 90, lastButtonPositionRect.y - 22, 310, 18), GUI.tooltip, tooltipStyle); - } - } else if (GUILayout.Button(Translation.GetString("Delete"), GUILayout.Width(70))) { - //skip confirmation if ctrl key hold while clicking - if (Event.current.control && Event.current.button == 0) { + + if (GUILayout.Button(Translation.GetString("Delete"), GUILayout.Width(70))) { RemoveStep(i); - } else { - confirmStepRemovalId = i; - } } - GUI.color = Color.white; if (GUILayout.Button(Translation.GetString("Edit"), GUILayout.Width(65))) { _timedPanelAdd = false; @@ -423,7 +394,6 @@ private void _guiTimedControlPanel(int num) { _stepMinValueStr = _stepMinValue.ToString(); _stepMaxValueStr = _stepMaxValue.ToString(); nodeSelectionLocked = true; - confirmStepRemovalId = -1; foreach (var nodeId in SelectedNodeIds) { tlsMan.TrafficLightSimulations[nodeId].TimedLight?.GetStep(i).UpdateLiveLights(true); @@ -437,7 +407,6 @@ private void _guiTimedControlPanel(int num) { foreach (var nodeId in SelectedNodeIds) { tlsMan.TrafficLightSimulations[nodeId].TimedLight?.GetStep(i).UpdateLiveLights(true); } - confirmStepRemovalId = -1; } } } @@ -551,7 +520,6 @@ private void _guiTimedControlPanel(int num) { _timedViewedStep = -1; _timedEditStep = -1; _stepMetric = StepChangeMetric.Default; - confirmStepRemovalId = -1; } } } @@ -608,7 +576,6 @@ private void _guiTimedControlPanel(int num) { if (GUILayout.Button(Translation.GetString("Start"))) { _timedPanelAdd = false; nodeSelectionLocked = false; - confirmStepRemovalId = -1; foreach (var nodeId in SelectedNodeIds) { tlsMan.TrafficLightSimulations[nodeId].TimedLight?.Start(); @@ -631,7 +598,6 @@ private void _guiTimedControlPanel(int num) { if (GUILayout.Button(Translation.GetString("Rotate_left"))) { timedNodeMain.RotateLeft(); _timedViewedStep = 0; - confirmStepRemovalId = -1; } if (GUILayout.Button(Translation.GetString("Copy"))) { @@ -643,7 +609,6 @@ private void _guiTimedControlPanel(int num) { if (GUILayout.Button(Translation.GetString("Rotate_right"))) { timedNodeMain.RotateRight(); _timedViewedStep = 0; - confirmStepRemovalId = -1; } GUILayout.EndHorizontal(); @@ -653,14 +618,12 @@ private void _guiTimedControlPanel(int num) { GUILayout.Space(30); if (GUILayout.Button(Translation.GetString("Add_junction_to_timed_light"))) { - confirmStepRemovalId = -1; TrafficManagerTool.ShowAdvisor(this.GetType().Name + "_AddJunction"); MainTool.SetToolMode(ToolMode.TimedLightsAddNode); } if (SelectedNodeIds.Count > 1) { if (GUILayout.Button(Translation.GetString("Remove_junction_from_timed_light"))) { - confirmStepRemovalId = -1; TrafficManagerTool.ShowAdvisor(this.GetType().Name + "_RemoveJunction"); MainTool.SetToolMode(ToolMode.TimedLightsRemoveNode); } @@ -703,7 +666,6 @@ public override void Cleanup() { _timedViewedStep = -1; timedLightActive = false; nodeIdToCopy = 0; - confirmStepRemovalId = -1; } public override void Initialize() { From e2fa1d8d1c77d7d7e04290261641d5e494c1afbc Mon Sep 17 00:00:00 2001 From: krzychu124 Date: Sat, 20 Apr 2019 17:04:46 +0200 Subject: [PATCH 32/54] should fix missing red color on delete button --- TLM/TLM/UI/SubTools/TimedTrafficLightsTool.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/TLM/TLM/UI/SubTools/TimedTrafficLightsTool.cs b/TLM/TLM/UI/SubTools/TimedTrafficLightsTool.cs index 543dc900a..5ad3f394e 100644 --- a/TLM/TLM/UI/SubTools/TimedTrafficLightsTool.cs +++ b/TLM/TLM/UI/SubTools/TimedTrafficLightsTool.cs @@ -378,10 +378,12 @@ private void _guiTimedControlPanel(int num) { } GUILayout.EndHorizontal(); - + + 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; From bc99aff84d593bd5d26b40c2368d60e3e2c92229 Mon Sep 17 00:00:00 2001 From: Guy Fraser Date: Sat, 20 Apr 2019 16:30:22 +0100 Subject: [PATCH 33/54] Updated changelogs for 10.19 release --- CHANGELOG.md | 8 ++++++++ README.md | 13 ++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 737a17665..e4f08f7c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ # Cities: Skylines - Traffic Manager: *President Edition* [![Discord](https://img.shields.io/discord/545065285862948894.svg)](https://discord.gg/faKUnST) # Changelog +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 a8f23f125..b9f63ee45 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# 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) +# 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. @@ -22,10 +22,13 @@ 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.19](https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/compare/10.18...10.18), 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). See [Full Changelog](https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/blob/master/CHANGELOG.md) for details of earlier releases. From 63df018cf53b22656d232cc754c111c08834a505 Mon Sep 17 00:00:00 2001 From: krzychu124 Date: Sat, 20 Apr 2019 20:23:51 +0200 Subject: [PATCH 34/54] ignore disabled mods turned on by default --- TLM/TLM/State/ConfigData/Main.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TLM/TLM/State/ConfigData/Main.cs b/TLM/TLM/State/ConfigData/Main.cs index f6f61940b..ca2ad9d3e 100644 --- a/TLM/TLM/State/ConfigData/Main.cs +++ b/TLM/TLM/State/ConfigData/Main.cs @@ -58,7 +58,7 @@ public class Main { /// /// Skip disabled mods while running incompatible mod detector /// - public bool IgnoreDisabledMods = false; + public bool IgnoreDisabledMods = true; public void AddDisplayedTutorialMessage(string messageKey) { HashSet newMessages = DisplayedTutorialMessages != null ? new HashSet(DisplayedTutorialMessages) : new HashSet(); From 920afd043d35fcf4c4f5121a1891042097f23d0b Mon Sep 17 00:00:00 2001 From: Krzysztof Date: Sat, 20 Apr 2019 21:17:22 +0200 Subject: [PATCH 35/54] Updated version number Updated version number --- TLM/TLM/TrafficManagerMod.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TLM/TLM/TrafficManagerMod.cs b/TLM/TLM/TrafficManagerMod.cs index ceaceee06..077d719c3 100644 --- a/TLM/TLM/TrafficManagerMod.cs +++ b/TLM/TLM/TrafficManagerMod.cs @@ -11,7 +11,7 @@ namespace TrafficManager { public class TrafficManagerMod : IUserMod { - public static readonly string Version = "10.18"; + public static readonly string Version = "10.19"; public static readonly uint GameVersion = 180609552u; public static readonly uint GameVersionA = 1u; From 8135a0996bf500e1639e713feb1078702a6ce7e1 Mon Sep 17 00:00:00 2001 From: Krzysztof Date: Sat, 20 Apr 2019 21:35:19 +0200 Subject: [PATCH 36/54] Update README.md fixed compare versions link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b9f63ee45..a140804a8 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ A mod for **Cities: Skylines** that gives you more control over road and rail tr * Clear traffic, stuck cims, etc. # Changelog -### [10.19](https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/compare/10.18...10.18), 20/04/2019 +### [10.19](https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/compare/10.18...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). From 1a1757ec34713175bfbeb9f15f186aada7e72840 Mon Sep 17 00:00:00 2001 From: "Twotoolus FLY LSh.st" Date: Sun, 21 Apr 2019 17:16:22 +0900 Subject: [PATCH 37/54] Update lang_ko.txt --- TLM/TLM/Resources/lang_ko.txt | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/TLM/TLM/Resources/lang_ko.txt b/TLM/TLM/Resources/lang_ko.txt index 20ad53368..d9681d7af 100644 --- a/TLM/TLM/Resources/lang_ko.txt +++ b/TLM/TLM/Resources/lang_ko.txt @@ -155,7 +155,7 @@ 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 차량이 신호등 시간표가 구성된 교차로에서 교통 표지판 규칙을 준수합니다 @@ -224,11 +224,11 @@ Overlay_transparency 보조 아이콘 투명도(도로 위 표지판, 속도제 Remove_this_citizen 해당 시민 삭제 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 -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 모드와 비 호환되는 모드 발견 시 에러 보여주기 \ 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 모드와 비 호환되는 모드 발견 시 에러 보여주기 From 9598395210c63564ae8de90d9020a1601e6cf0bd Mon Sep 17 00:00:00 2001 From: FireController1847 Date: Sun, 5 May 2019 14:06:12 -0600 Subject: [PATCH 38/54] Update README.md --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index a140804a8..e2159368b 100644 --- a/README.md +++ b/README.md @@ -46,3 +46,16 @@ Contact us: # 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 purchaed 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. From 381372d02d88c92c351129749550e0d5d2d07451 Mon Sep 17 00:00:00 2001 From: PierreTSE <34136165+PierreTSE@users.noreply.github.com> Date: Sat, 11 May 2019 22:30:45 +0200 Subject: [PATCH 39/54] Update lang_fr.txt - Translate undone lines - Correct typos - Reword some translations to make all the file consistent --- TLM/TLM/Resources/lang_fr.txt | 128 +++++++++++++++++----------------- 1 file changed, 64 insertions(+), 64 deletions(-) diff --git a/TLM/TLM/Resources/lang_fr.txt b/TLM/TLM/Resources/lang_fr.txt index bfa70dd27..d72a85d0e 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 @@ -86,7 +86,7 @@ Remove_zoning Retirer le zonage Lane_Arrow_Changer_Disabled_Highway Le modificateur de directions pour cette voie est désactivé car vous avez activé le système de règles pour autoroutes. Add_junction_to_timed_light Ajouter une intersection à ce feu tricolore Remove_junction_from_timed_light Retirer une intersection de ce feu tricolore -Select_junction Sélectionnez une intersection +Select_junction Sélectionner une intersection Cancel Annuler Speed_limits Limitations de vitesse Persistently_visible_overlays Annonces en superposition visibles de façon permanente @@ -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 @@ -151,13 +151,13 @@ 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 +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,60 +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 Directions des voies de circulation 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 -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 -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 Afficher le message d'erreur si une incompatibilité d'un mod est détectée \ 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é From 0806ff2e25811904059502546bfa55ab45e6e947 Mon Sep 17 00:00:00 2001 From: FireController1847 Date: Wed, 15 May 2019 21:11:58 -0600 Subject: [PATCH 40/54] Capitalize LABS and STABLE --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e2159368b..7daf860ba 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ Contact us: # 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 the latest version of the STABLE and/or LABS mod. - You are using a properly purchaed version of Cities: Skylines. We will not provide support if: From 03e3ff9897c6b621b1677ed7f26cb2ab859b5e6c Mon Sep 17 00:00:00 2001 From: FireController1847 Date: Wed, 15 May 2019 21:36:29 -0600 Subject: [PATCH 41/54] Purchaed -> Purchased --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7daf860ba..8dd25eb87 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ Contact us: 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 purchaed version of Cities: Skylines. +- 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. From bc307fbbb9e14849bddfac473f8268a7703c74df Mon Sep 17 00:00:00 2001 From: Victor-Philipp Negoescu Date: Sun, 19 May 2019 15:59:28 +0200 Subject: [PATCH 42/54] Increased mod/game version for Campus DLC --- TLM/TLM/TrafficManagerMod.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/TLM/TLM/TrafficManagerMod.cs b/TLM/TLM/TrafficManagerMod.cs index 077d719c3..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.19"; + 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; From b18b9e17bf504677a1bed04260852d50532306b0 Mon Sep 17 00:00:00 2001 From: Victor-Philipp Negoescu Date: Sun, 19 May 2019 16:04:13 +0200 Subject: [PATCH 43/54] Updated changelog and readme --- CHANGELOG.md | 4 ++++ README.md | 10 +++------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4f08f7c8..bdf65ff3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # 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 (#294) + 10.19, 20/04/2019 - Bugfix: Mod options overlapping issue (#250, #266). - Added: Japanese language (thanks mashitaro) (#258). diff --git a/README.md b/README.md index 8dd25eb87..e621bbcbb 100644 --- a/README.md +++ b/README.md @@ -22,13 +22,9 @@ A mod for **Cities: Skylines** that gives you more control over road and rail tr * Clear traffic, stuck cims, etc. # Changelog -### [10.19](https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/compare/10.18...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.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 (#294) See [Full Changelog](https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/blob/master/CHANGELOG.md) for details of earlier releases. From fa55388cab0550f4764712e21c001b39b2d43781 Mon Sep 17 00:00:00 2001 From: PierreTSE <34136165+PierreTSE@users.noreply.github.com> Date: Sun, 19 May 2019 19:44:39 +0200 Subject: [PATCH 44/54] Update lang_fr.txt Minor changes after reviewing. --- TLM/TLM/Resources/lang_fr.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TLM/TLM/Resources/lang_fr.txt b/TLM/TLM/Resources/lang_fr.txt index d72a85d0e..54587ee59 100644 --- a/TLM/TLM/Resources/lang_fr.txt +++ b/TLM/TLM/Resources/lang_fr.txt @@ -86,7 +86,7 @@ Remove_zoning Retirer le zonage Lane_Arrow_Changer_Disabled_Highway Le modificateur de directions pour cette voie est désactivé car vous avez activé le système de règles pour autoroutes. Add_junction_to_timed_light Ajouter une intersection à ce feu tricolore Remove_junction_from_timed_light Retirer une intersection de ce feu tricolore -Select_junction Sélectionner une intersection +Select_junction Sélectionnez une intersection Cancel Annuler Speed_limits Limitations de vitesse Persistently_visible_overlays Annonces en superposition visibles de façon permanente @@ -188,7 +188,7 @@ 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. 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 Directions des voies de circulation +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 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 From 5e0f038e754ea007fcb81b1824f42a2c94b0335d Mon Sep 17 00:00:00 2001 From: Aubergine Date: Sun, 19 May 2019 19:34:46 +0100 Subject: [PATCH 45/54] Added French translation to release notes See PR #311 --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e621bbcbb..383cb7f27 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ A mod for **Cities: Skylines** that gives you more control over road and rail tr ### [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 (#294) +- Updated French translation (#311) See [Full Changelog](https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/blob/master/CHANGELOG.md) for details of earlier releases. From 8562c34c410933339e30c7b5cf4b1dfd5fd40cb4 Mon Sep 17 00:00:00 2001 From: Guy Fraser Date: Sun, 19 May 2019 19:37:26 +0100 Subject: [PATCH 46/54] Update CHANGELOG.md Added note on French translation (#311) --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bdf65ff3c..a55be6861 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ 10.20, 21/05/2019 - Updated for game version 1.12.0-f5 - Updated Korean translation (#294) +- Updated French translation (#311) 10.19, 20/04/2019 - Bugfix: Mod options overlapping issue (#250, #266). From 4302d4e31717b0be581443d7cb9931e70240f716 Mon Sep 17 00:00:00 2001 From: Guy Fraser Date: Sun, 19 May 2019 19:43:35 +0100 Subject: [PATCH 47/54] Contributor credits for lang-ko and lang-fr updates --- CHANGELOG.md | 4 ++-- README.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a55be6861..5bdb514a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,8 +3,8 @@ # Changelog 10.20, 21/05/2019 - Updated for game version 1.12.0-f5 -- Updated Korean translation (#294) -- Updated French translation (#311) +- 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). diff --git a/README.md b/README.md index 383cb7f27..491d07f82 100644 --- a/README.md +++ b/README.md @@ -24,8 +24,8 @@ A mod for **Cities: Skylines** that gives you more control over road and rail tr # Changelog ### [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 (#294) -- Updated French translation (#311) +- 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. From 9a1cb0012fe544e70243a9e82e1500f2ebdf0949 Mon Sep 17 00:00:00 2001 From: Guy Fraser Date: Wed, 22 May 2019 14:32:08 +0100 Subject: [PATCH 48/54] Updated lang_ru - Fixes #327 Localisation update by Steam user vitalii201 --- TLM/TLM/Resources/lang_ru.txt | 38 +++++++++++++++++------------------ 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/TLM/TLM/Resources/lang_ru.txt b/TLM/TLM/Resources/lang_ru.txt index 77a5e3017..c99fbcd0f 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 Сбросить свои ограничения скорости @@ -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 @@ -224,11 +224,11 @@ Overlay_transparency Прозрачность элементов(оверлее Remove_this_citizen Удалить этого гражданина 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 -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 Показывать сообщение об ошибке при несовместимости мода \ 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 From f7e56cf8e4596defc3e13cc4802406ebd21e2b82 Mon Sep 17 00:00:00 2001 From: Guy Fraser Date: Fri, 24 May 2019 00:47:14 +0100 Subject: [PATCH 49/54] Update incompatible_mods.txt Vanilla Trees Remover mod no longer breaks mod options screen --- TLM/TLM/Resources/incompatible_mods.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/TLM/TLM/Resources/incompatible_mods.txt b/TLM/TLM/Resources/incompatible_mods.txt index 714cb2e45..3a70377d8 100644 --- a/TLM/TLM/Resources/incompatible_mods.txt +++ b/TLM/TLM/Resources/incompatible_mods.txt @@ -43,5 +43,4 @@ 813833476;Skylines Overwatch [1.6] 408209297;Extended Road Upgrade 417926819;Road Assistant -631930385;Realistic Vehicle Speeds -877950833;Vanilla Trees Remover \ No newline at end of file +631930385;Realistic Vehicle Speeds \ No newline at end of file From d6d098c30cab8508aadcfa78a788dd948dd34521 Mon Sep 17 00:00:00 2001 From: Victor-Philipp Negoescu Date: Sat, 25 May 2019 22:01:38 +0200 Subject: [PATCH 50/54] #263: debug log --- TLM/TLM/Traffic/Data/VehicleState.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/TLM/TLM/Traffic/Data/VehicleState.cs b/TLM/TLM/Traffic/Data/VehicleState.cs index 6f516fed8..04a8cb86b 100644 --- a/TLM/TLM/Traffic/Data/VehicleState.cs +++ b/TLM/TLM/Traffic/Data/VehicleState.cs @@ -520,6 +520,11 @@ public void StepRand() { } private void UpdateTimedRandValues() { +#if DEBUG + if (GlobalConfig.Instance.Debug.Switches[9]) + Log._Debug($"VehicleState.UpdateTimedRandValues({vehicleId}) called."); +#endif + Randomizer rand = Constants.ServiceFactory.SimulationService.Randomizer; DynamicLaneSelection dls = GlobalConfig.Instance.DynamicLaneSelection; maxReservedSpace = recklessDriver From 9b24fb406c45e1cfd0d955c6ad758768ab23849c Mon Sep 17 00:00:00 2001 From: Victor-Philipp Negoescu Date: Mon, 27 May 2019 12:34:41 +0200 Subject: [PATCH 51/54] #263: Removed time-varying driving DLS --- TLM/TLM/Manager/Impl/OptionsManager.cs | 8 ++- .../Manager/Impl/VehicleBehaviorManager.cs | 14 ++-- TLM/TLM/Resources/lang.txt | 2 +- TLM/TLM/Resources/lang_de.txt | 2 +- TLM/TLM/Resources/lang_es.txt | 2 +- TLM/TLM/Resources/lang_fr.txt | 2 +- TLM/TLM/Resources/lang_it.txt | 2 +- TLM/TLM/Resources/lang_ja.txt | 2 +- TLM/TLM/Resources/lang_ko.txt | 2 +- TLM/TLM/Resources/lang_nl.txt | 2 +- TLM/TLM/Resources/lang_pl.txt | 2 +- TLM/TLM/Resources/lang_pt.txt | 2 +- TLM/TLM/Resources/lang_ru.txt | 2 +- TLM/TLM/Resources/lang_template.txt | 2 +- TLM/TLM/Resources/lang_zh-tw.txt | 2 +- TLM/TLM/Resources/lang_zh.txt | 2 +- .../State/ConfigData/DynamicLaneSelection.cs | 40 +++++++++++- TLM/TLM/State/ConfigData/Gameplay.cs | 4 +- TLM/TLM/State/Options.cs | 31 ++++++--- TLM/TLM/Traffic/Data/VehicleState.cs | 64 +++++++++++++------ 20 files changed, 130 insertions(+), 59 deletions(-) diff --git a/TLM/TLM/Manager/Impl/OptionsManager.cs b/TLM/TLM/Manager/Impl/OptionsManager.cs index 93afe71d7..7f600d0ba 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) { @@ -189,6 +189,10 @@ public bool LoadData(byte[] data) { Options.setAllowFarTurnOnRed(data[40] == (byte)1); } + if (data.Length >= 42) { + Options.setAllowFarTurnOnRed(data[41] == (byte)1); + } + return true; } @@ -221,7 +225,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 a9063f6fd..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 diff --git a/TLM/TLM/Resources/lang.txt b/TLM/TLM/Resources/lang.txt index 3cec98f37..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 diff --git a/TLM/TLM/Resources/lang_de.txt b/TLM/TLM/Resources/lang_de.txt index da6304904..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 diff --git a/TLM/TLM/Resources/lang_es.txt b/TLM/TLM/Resources/lang_es.txt index 20e12f61e..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 diff --git a/TLM/TLM/Resources/lang_fr.txt b/TLM/TLM/Resources/lang_fr.txt index 54587ee59..b40634d4b 100644 --- a/TLM/TLM/Resources/lang_fr.txt +++ b/TLM/TLM/Resources/lang_fr.txt @@ -150,7 +150,7 @@ Reset_global_configuration Réinitialiser la config. globale General Général Gameplay Gameplay Overlays Interface -Realistic_speeds Vitesses réalistes +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 diff --git a/TLM/TLM/Resources/lang_it.txt b/TLM/TLM/Resources/lang_it.txt index 4de9a9c57..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 diff --git a/TLM/TLM/Resources/lang_ja.txt b/TLM/TLM/Resources/lang_ja.txt index d5cd3835e..fdbd694c5 100644 --- a/TLM/TLM/Resources/lang_ja.txt +++ b/TLM/TLM/Resources/lang_ja.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 車両の挙動 diff --git a/TLM/TLM/Resources/lang_ko.txt b/TLM/TLM/Resources/lang_ko.txt index d9681d7af..1bc09409f 100644 --- a/TLM/TLM/Resources/lang_ko.txt +++ b/TLM/TLM/Resources/lang_ko.txt @@ -150,7 +150,7 @@ 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 차량 제한 diff --git a/TLM/TLM/Resources/lang_nl.txt b/TLM/TLM/Resources/lang_nl.txt index 25d39bc05..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 diff --git a/TLM/TLM/Resources/lang_pl.txt b/TLM/TLM/Resources/lang_pl.txt index d2d2379a0..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 diff --git a/TLM/TLM/Resources/lang_pt.txt b/TLM/TLM/Resources/lang_pt.txt index c981124b5..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 diff --git a/TLM/TLM/Resources/lang_ru.txt b/TLM/TLM/Resources/lang_ru.txt index c99fbcd0f..4193e0a8c 100644 --- a/TLM/TLM/Resources/lang_ru.txt +++ b/TLM/TLM/Resources/lang_ru.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 Поведение транспорта diff --git a/TLM/TLM/Resources/lang_template.txt b/TLM/TLM/Resources/lang_template.txt index 4fe07cba1..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 diff --git a/TLM/TLM/Resources/lang_zh-tw.txt b/TLM/TLM/Resources/lang_zh-tw.txt index 00a2eccfe..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 車輛行為 diff --git a/TLM/TLM/Resources/lang_zh.txt b/TLM/TLM/Resources/lang_zh.txt index b70262511..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 车辆行为 diff --git a/TLM/TLM/State/ConfigData/DynamicLaneSelection.cs b/TLM/TLM/State/ConfigData/DynamicLaneSelection.cs index f0f454925..8c19815d1 100644 --- a/TLM/TLM/State/ConfigData/DynamicLaneSelection.cs +++ b/TLM/TLM/State/ConfigData/DynamicLaneSelection.cs @@ -47,6 +47,12 @@ public class DynamicLaneSelection { // --- + /* + * max. reserved space: + * low = egoistic + * high = altruistic + */ + /// /// Minimum maximum allowed reserved space on previous vehicle lane (for regular drivers) /// @@ -67,6 +73,12 @@ public class DynamicLaneSelection { /// 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 /// @@ -77,6 +89,12 @@ public class DynamicLaneSelection { /// public float MaxLaneSpeedRandInterval = 25f; + /* + * max. considered lane changes: + * low = altruistic + * high = egoistic + */ + /// /// Maximum number of considered lane changes /// @@ -87,16 +105,28 @@ public class DynamicLaneSelection { /// public int MaxMaxOptLaneChanges = 3; + /* + * max. allowed speed difference for unsafe lane changes + * low = altruistic + * high = egoistic + */ + /// - /// Minimum maximum allowed speed difference for safe lane changes (in game units) + /// Minimum maximum allowed speed difference for unsafe lane changes (in game units) /// public float MinMaxUnsafeSpeedDiff = 0.1f; /// - /// Maximum maximum allowed speed difference for safe lane changes (in game units) + /// 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) /// @@ -107,6 +137,12 @@ public class DynamicLaneSelection { /// 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 %) /// diff --git a/TLM/TLM/State/ConfigData/Gameplay.cs b/TLM/TLM/State/ConfigData/Gameplay.cs index 3e65fd57a..48e778e80 100644 --- a/TLM/TLM/State/ConfigData/Gameplay.cs +++ b/TLM/TLM/State/ConfigData/Gameplay.cs @@ -6,8 +6,8 @@ namespace TrafficManager.State.ConfigData { public class Gameplay { /// - /// Modulo value for vehicle behavior randomization + /// Modulo value for time-varying vehicle behavior randomization /// - public uint VehicleStepRand = 20; + public uint VehicleTimedRandModulo = 10; } } diff --git a/TLM/TLM/State/Options.cs b/TLM/TLM/State/Options.cs index 42986aeeb..c79cc80b1 100644 --- a/TLM/TLM/State/Options.cs +++ b/TLM/TLM/State/Options.cs @@ -31,7 +31,7 @@ public class Options : MonoBehaviour { private static UICheckBox showCompatibilityCheckErrorToggle = null; private static UICheckBox scanForKnownIncompatibleModsToggle = null; private static UICheckBox ignoreDisabledModsToggle = null; - private static UICheckBox realisticSpeedsToggle = null; + private static UICheckBox individualDrivingStyleToggle = null; private static UIDropDown recklessDriversDropdown = null; private static UICheckBox relaxedBussesToggle = null; private static UICheckBox allRelaxedToggle = null; @@ -95,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; @@ -259,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; } @@ -1005,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) { @@ -1277,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) { @@ -1556,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/Traffic/Data/VehicleState.cs b/TLM/TLM/Traffic/Data/VehicleState.cs index 04a8cb86b..07a3a0ac8 100644 --- a/TLM/TLM/Traffic/Data/VehicleState.cs +++ b/TLM/TLM/Traffic/Data/VehicleState.cs @@ -20,7 +20,6 @@ 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 { @@ -97,6 +96,7 @@ public float Velocity { private VehicleJunctionTransitState junctionTransitState; // Dynamic Lane Selection + public bool dlsReady; public float maxReservedSpace; public float laneSpeedRandInterval; public int maxOptLaneChanges; @@ -131,6 +131,7 @@ 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" + @@ -165,6 +166,7 @@ internal VehicleState(ushort vehicleId) { lastAltLaneSelSegmentId = 0; junctionTransitState = VehicleJunctionTransitState.None; timedRand = 0; + dlsReady = false; maxReservedSpace = 0; laneSpeedRandInterval = 0; maxOptLaneChanges = 0; @@ -295,7 +297,8 @@ internal ExtVehicleType OnStartPathFind(ref Vehicle vehicleData, ExtVehicleType? } recklessDriver = Constants.ManagerFactory.VehicleBehaviorManager.IsRecklessDriver(vehicleId, ref vehicleData); - UpdateTimedRandValues(); + StepRand(true); + UpdateDynamicLaneSelectionParameters(); #if DEBUG if (GlobalConfig.Instance.Debug.Switches[9]) @@ -328,7 +331,8 @@ internal void OnSpawn(ref Vehicle vehicleData) { lastAltLaneSelSegmentId = 0; recklessDriver = Constants.ManagerFactory.VehicleBehaviorManager.IsRecklessDriver(vehicleId, ref vehicleData); - UpdateTimedRandValues(); + StepRand(true); + UpdateDynamicLaneSelectionParameters(); try { totalLength = vehicleData.CalculateTotalLength(vehicleId); @@ -397,8 +401,8 @@ internal void UpdatePosition(ref Vehicle vehicleData, ref PathUnit.Position curP waitTime = 0; if (end != null) { - if (vehicleData.m_trailingVehicle == 0) { - StepRand(); + if (vehicleData.m_leadingVehicle == 0) { + StepRand(false); } #if DEBUGVSTATE @@ -511,30 +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(GlobalConfig.Instance.Gameplay.VehicleStepRand) == 0) { - timedRand = (byte)(((uint)timedRand + rand.UInt32(25)) % MAX_TIMED_RAND); - UpdateTimedRandValues(); + if (init || (rand.UInt32(GlobalConfig.Instance.Gameplay.VehicleTimedRandModulo) == 0)) { + timedRand = Options.individualDrivingStyle ? (byte)rand.UInt32(100) : (byte)50; } } - private void UpdateTimedRandValues() { + public void UpdateDynamicLaneSelectionParameters() { #if DEBUG if (GlobalConfig.Instance.Debug.Switches[9]) - Log._Debug($"VehicleState.UpdateTimedRandValues({vehicleId}) called."); + Log._Debug($"VehicleState.UpdateDynamicLaneSelectionParameters({vehicleId}) called."); #endif - Randomizer rand = Constants.ServiceFactory.SimulationService.Randomizer; + if (!Options.IsDynamicLaneSelectionActive()) { + dlsReady = false; + return; + } + + if (dlsReady) { + return; + } + + float egoism = (float)timedRand / 100f; + float altruism = 1f - egoism; DynamicLaneSelection dls = GlobalConfig.Instance.DynamicLaneSelection; - maxReservedSpace = recklessDriver - ? MathUtil.RandomizeFloat(rand, dls.MinMaxRecklessReservedSpace, dls.MaxMaxRecklessReservedSpace) - : MathUtil.RandomizeFloat(rand, dls.MinMaxReservedSpace, dls.MaxMaxReservedSpace); - laneSpeedRandInterval = MathUtil.RandomizeFloat(rand, dls.MinLaneSpeedRandInterval, dls.MaxLaneSpeedRandInterval); - maxOptLaneChanges = rand.Int32(dls.MinMaxOptLaneChanges, dls.MaxMaxOptLaneChanges + 1); - maxUnsafeSpeedDiff = MathUtil.RandomizeFloat(rand, dls.MinMaxUnsafeSpeedDiff, dls.MaxMaxOptLaneChanges); - minSafeSpeedImprovement = MathUtil.RandomizeFloat(rand, dls.MinMinSafeSpeedImprovement, dls.MaxMinSafeSpeedImprovement); - minSafeTrafficImprovement = MathUtil.RandomizeFloat(rand, dls.MinMinSafeTrafficImprovement, dls.MaxMinSafeTrafficImprovement); + + 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) { From 832aae9f27158be7849faa3b14283d6abadbe42a Mon Sep 17 00:00:00 2001 From: Victor-Philipp Negoescu Date: Mon, 27 May 2019 12:45:41 +0200 Subject: [PATCH 52/54] #263: Removed silly code --- TLM/TLM/Manager/Impl/OptionsManager.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/TLM/TLM/Manager/Impl/OptionsManager.cs b/TLM/TLM/Manager/Impl/OptionsManager.cs index 7f600d0ba..8d88a21af 100644 --- a/TLM/TLM/Manager/Impl/OptionsManager.cs +++ b/TLM/TLM/Manager/Impl/OptionsManager.cs @@ -189,10 +189,6 @@ public bool LoadData(byte[] data) { Options.setAllowFarTurnOnRed(data[40] == (byte)1); } - if (data.Length >= 42) { - Options.setAllowFarTurnOnRed(data[41] == (byte)1); - } - return true; } From 9514306a4662f29c73cd3b348d039ecafb64cb0d Mon Sep 17 00:00:00 2001 From: Victor-Philipp Negoescu Date: Mon, 27 May 2019 17:27:07 +0200 Subject: [PATCH 53/54] Fixed #307: Mail trucks ignore lane arrows --- TLM/TLM/Custom/AI/CustomPostVanAI.cs | 115 ++++++++++++++++++ TLM/TLM/Custom/PathFinding/CustomPathFind2.cs | 7 +- TLM/TLM/LoadingExtension.cs | 22 ++++ TLM/TLM/TLM.csproj | 1 + 4 files changed, 144 insertions(+), 1 deletion(-) create mode 100644 TLM/TLM/Custom/AI/CustomPostVanAI.cs 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/TLM.csproj b/TLM/TLM/TLM.csproj index 7cb327aa8..c154daa11 100644 --- a/TLM/TLM/TLM.csproj +++ b/TLM/TLM/TLM.csproj @@ -103,6 +103,7 @@ + From b004f36977234b7ddb4aadffd9ed1ae07f9a3f4e Mon Sep 17 00:00:00 2001 From: FireController#1847 Date: Mon, 27 May 2019 20:30:48 -0600 Subject: [PATCH 54/54] Simplify Extremist --- .github/ISSUE_TEMPLATE/bug-report.md | 26 +++++++++-------------- .github/ISSUE_TEMPLATE/feature-request.md | 9 ++++---- 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index 5b639f1cc..e788ff605 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -7,35 +7,29 @@ labels: bug, triage ### Description -Replace me with a short description of the bug. ### Reproduction Steps -Please describe how to make this bug issue appear in our own savegames. If you don't know how, delete 2 and 3 and just put "I Don't Know." -1. Replace me with your first step. -2. Then replacement me with your second step. -3. You can add more steps by adding more numbers. Also replace or delete me :) - +Add more steps as nessecary. +1. +2. +3. ### Mod List -Preferrably, if you notice a bug, please see if the bug is still apparent if ONLY TM:PE is enabled. If it is, all you have to put is TM:PE. In either case, please list the mods (and their versions) that were enabled when you noticed the bug. -- Replace Me Mod 10.18 -- Replace Me Mod 1.3.7 -- You Can Add More Mods by Adding More Dashes: Replace/Delete Me Mod 4.3 - +Please list the mods enabled when you noticed the bug. +- TM:PE xx.xx +- +- ### Output Log -We need your output log so we can check for any errors that may have happened when the bug appeared. -### Savegame -Optional: If this bug appeared in a specific savegame, please share that below. +### Savegame (Optional) -### Screenshots -Optional: If this bug can be described using screenshots, please share them below. +### Screenshots (Optional) diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md index 50713c5fd..3ae6d87ed 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -7,14 +7,13 @@ labels: feature, triage ### Description -Replace me with a short description of the feature. -### Sources / Links -Optional: Post any links below that describe how your issue works. For example, with turn on red it'd be the link to a "turn on red rule" in a driver's handbook; things like that. +### Sources / Links (Optional) + -### Screenshots -Optional: A picture tells a thousand words. If you want to help us understand, please share a concept screenshot of this feature below. + +### Screenshots (Optional)