Skip to content

Commit

Permalink
Version 1.8.1:
Browse files Browse the repository at this point in the history
- Updated translations: Polish, Chinese (simplified)
- Bugfix: Mod crashed when loading a second savegame
  • Loading branch information
VictorPhilipp committed Dec 1, 2016
1 parent 7741fd4 commit a0814d5
Show file tree
Hide file tree
Showing 8 changed files with 90 additions and 77 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ A work-in-progress modification for **Cities: Skylines** to add additional traff
User manual: http://www.viathinksoft.de/tmpe

# Changelog
1.8.1, 12/1/2016
- Updated translations: Polish, Chinese (simplified)
- Bugfix: Mod crashed when loading a second savegame

1.8.0, 11/29/2016
- Updated to game version 1.6.0-f4
- New feature: Default speed limits
Expand Down
10 changes: 6 additions & 4 deletions TLM/TLM/LoadingExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1836,16 +1836,18 @@ public override void OnLevelUnloading() {
}

public override void OnLevelLoaded(LoadMode mode) {
Log.Info("OnLevelLoaded");
SimulationManager.UpdateMode updateMode = SimulationManager.instance.m_metaData.m_updateMode;
Log.Info($"OnLevelLoaded({mode}) called. updateMode={updateMode}");
base.OnLevelLoaded(mode);

Log._Debug("OnLevelLoaded Returned from base, calling custom code.");
Instance = this;

gameLoaded = false;
switch (mode) {
case LoadMode.NewGame:
case LoadMode.LoadGame:
switch (updateMode) {
case SimulationManager.UpdateMode.NewGameFromMap:
case SimulationManager.UpdateMode.NewGameFromScenario:
case SimulationManager.UpdateMode.LoadGame:
if (BuildConfig.applicationVersion != BuildConfig.VersionToString(TrafficManagerMod.GameVersion, false)) {
string[] majorVersionElms = BuildConfig.applicationVersion.Split('-');
string[] versionElms = majorVersionElms[0].Split('.');
Expand Down
66 changes: 33 additions & 33 deletions TLM/TLM/Resources/lang_pl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,36 +124,36 @@ Unit_system System jednostek
Metric Metryczne
Imperial Imperialne
Use_more_CPU_cores_for_route_calculation_if_available Użyj więcej rdzeni procesora do obliczania tras (jeśli dostępne)
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
Activated_features Aktywowane funkcje
Junction_restrictions Ograniczenia na skrzyżowaniach
Prohibit_spawning_of_pocket_cars Zabroń używania "kieszonkowych samochodów"
Reset_stuck_cims_and_vehicles Zresetuj zablokowane samochody i ludzi
Default_speed_limits Standardowe limity prędkości
Looking_for_a_parking_spot Poszukuje miejsca parkingowego
Driving_to_a_parking_spot Jedzie do miejsca parkingowego
Driving_to_another_parking_spot Jedzie do innego miejsca parkingowego
Entering_vehicle Wsiada do samochodu
Walking_to_car Idzie do samochodu
Using_public_transport Używa transportu publicznego
Walking Idzie
Thinking_of_a_good_parking_spot Myśli o odpowiednim miejscem parkingowym
Switch_view Zmień widok
Outgoing_demand Zapotrzebowanie - wychodzące
Incoming_demand Zapotrzebowanie - przychodzące
Advanced_Vehicle_AI Zaawansowana SI pojazdów
Heavy_trucks_prefer_outer_lanes_on_highways Samochody ciężarowe preferują zewnętrzne pasy na autostradach
Parking_AI SI parkowania
Enable_more_realistic_parking Aktywuj bardziej realistyczny system parkowania samochodów
Reset_custom_speed_limits Zresetuj limity prędkości użytkownika
Reload_global_configuration Przeładuj ustawienia globalne
Reset_global_configuration Zresetuj ustawienia globalne
General Ogólne
Gameplay Rozgrywka
Overlays Nakładki
Realistic_speeds Realistyczne prędkości
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
Policies_&_Restrictions Zasady i Ograniczenia
At_junctions Na strzyżowaniach
In_case_of_emergency W sytuacjach nadzwyczajnych
60 changes: 30 additions & 30 deletions TLM/TLM/Resources/lang_zh-cn.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,33 +127,33 @@ Use_more_CPU_cores_for_route_calculation_if_available 计算路线将使用更
Activated_features 激活功能
Junction_restrictions 路口管制
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
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 在紧急情况下
9 changes: 4 additions & 5 deletions TLM/TLM/State/GlobalConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ public class GlobalConfig {

public static GlobalConfig Instance { get; private set; } = null;

static GlobalConfig() {
Reload();
}

internal static void OnLevelUnloading() {
Instance = null;
#if RUSHHOUR
rushHourConfigModifiedTime = null;
lastRushHourConfigCheck = 0;
Expand All @@ -53,10 +56,6 @@ internal static void OnLevelUnloading() {

private static DateTime ModifiedTime = DateTime.MinValue;

static GlobalConfig() {
Reload();
}

/// <summary>
/// Configuration version
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion TLM/TLM/TrafficManagerMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace TrafficManager {
public class TrafficManagerMod : IUserMod {

public static readonly string Version = "1.8.0";
public static readonly string Version = "1.8.1";

public static readonly uint GameVersion = 159507472u;
public static readonly uint GameVersionA = 1u;
Expand Down
5 changes: 4 additions & 1 deletion TLM/TLM/UI/UIMainMenuButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,13 @@ protected override void OnClick(UIMouseEventParameter p) {
protected override void OnPositionChanged() {
GlobalConfig config = GlobalConfig.Instance;

bool saveConfig = (config.MainMenuButtonX != (int)absolutePosition.x || config.MainMenuButtonY != (int)absolutePosition.y);

config.MainMenuButtonX = (int)absolutePosition.x;
config.MainMenuButtonY = (int)absolutePosition.y;

GlobalConfig.WriteConfig();
if (saveConfig)
GlobalConfig.WriteConfig();
}

internal void UpdateSprites() {
Expand Down
11 changes: 8 additions & 3 deletions TLM/TLM/UI/UITransportDemand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,14 @@ private void clickSwitchViewMode(UIComponent component, UIMouseEventParameter ev

private void ParentVisibilityChanged(UIComponent component, bool value) {
Log._Debug($"Public transport info view panel changed visibility: {value}");
if (value && Options.prohibitPocketCars)
this.Show();
else
if (value && Options.prohibitPocketCars) {
TrafficManagerTool.CurrentTransportDemandViewMode = TransportDemandViewMode.Outgoing;
if (viewModeLabel != null)
viewModeLabel.text = Translation.GetString("Outgoing_demand");
if (switchViewModeButton != null)
switchViewModeButton.text = Translation.GetString("Switch_view");
this.Show();
} else
this.Hide();
}
}
Expand Down

0 comments on commit a0814d5

Please sign in to comment.