(svn r25508) -Change: split unit localisation choice into a choice per type of unit, and move it to the advanced settings
-Feature [FS#5482]: have tractive effort in imperial (lbf) and metric (kgf) units -Feature: have weights and volumes in imperial units (short tons, gallons)
This commit is contained in:
@@ -2803,6 +2803,17 @@ bool AfterLoadGame()
|
||||
}
|
||||
}
|
||||
|
||||
if (IsSavegameVersionBefore(184)) {
|
||||
/* The global units configuration is split up in multiple configurations. */
|
||||
extern uint8 _old_units;
|
||||
_settings_game.locale.units_velocity = Clamp(_old_units, 0, 2);
|
||||
_settings_game.locale.units_power = Clamp(_old_units, 0, 2);
|
||||
_settings_game.locale.units_weight = Clamp(_old_units, 1, 2);
|
||||
_settings_game.locale.units_volume = Clamp(_old_units, 1, 2);
|
||||
_settings_game.locale.units_force = 2;
|
||||
_settings_game.locale.units_height = Clamp(_old_units, 0, 2);
|
||||
}
|
||||
|
||||
/* Road stops is 'only' updating some caches */
|
||||
AfterLoadRoadStops();
|
||||
AfterLoadLabelMaps();
|
||||
|
@@ -1577,6 +1577,7 @@ extern uint16 _disaster_delay;
|
||||
extern byte _trees_tick_ctr;
|
||||
extern byte _age_cargo_skip_counter; // From misc_sl.cpp
|
||||
extern uint8 _old_diff_level;
|
||||
extern uint8 _old_units;
|
||||
static const OldChunks main_chunk[] = {
|
||||
OCL_ASSERT( OC_TTD, 0 ),
|
||||
OCL_ASSERT( OC_TTO, 0 ),
|
||||
@@ -1705,7 +1706,7 @@ static const OldChunks main_chunk[] = {
|
||||
OCL_NULL( 1 ), ///< Station tick counter, no longer in use
|
||||
|
||||
OCL_VAR ( OC_UINT8, 1, &_settings_game.locale.currency ),
|
||||
OCL_VAR ( OC_UINT8, 1, &_settings_game.locale.units ),
|
||||
OCL_VAR ( OC_UINT8, 1, &_old_units ),
|
||||
OCL_VAR ( OC_FILE_U8 | OC_VAR_U32, 1, &_cur_company_tick_index ),
|
||||
|
||||
OCL_NULL( 2 ), ///< Date stuff, calculated automatically
|
||||
|
@@ -249,8 +249,9 @@
|
||||
* 181 25012
|
||||
* 182 25296
|
||||
* 183 25363
|
||||
* 184 xxxxx
|
||||
*/
|
||||
extern const uint16 SAVEGAME_VERSION = 183; ///< Current savegame version of OpenTTD.
|
||||
extern const uint16 SAVEGAME_VERSION = 184; ///< Current savegame version of OpenTTD.
|
||||
|
||||
SavegameType _savegame_type; ///< type of savegame we are loading
|
||||
|
||||
|
Reference in New Issue
Block a user