(svn r24619) -Change: Check for bankruptcy on a monthly basis (ZxBioHazardZx)
This commit is contained in:
@@ -2746,6 +2746,11 @@ bool AfterLoadGame()
|
||||
/* Fix too high inflation rates */
|
||||
if (_economy.inflation_prices > MAX_INFLATION) _economy.inflation_prices = MAX_INFLATION;
|
||||
if (_economy.inflation_payment > MAX_INFLATION) _economy.inflation_payment = MAX_INFLATION;
|
||||
|
||||
/* We have to convert the quarters of bankruptcy into months of bankruptcy */
|
||||
FOR_ALL_COMPANIES(c) {
|
||||
c->months_of_bankruptcy = 3 * c->months_of_bankruptcy;
|
||||
}
|
||||
}
|
||||
|
||||
/* Road stops is 'only' updating some caches */
|
||||
|
@@ -272,7 +272,7 @@ static const SaveLoad _company_desc[] = {
|
||||
|
||||
SLE_VAR(CompanyProperties, num_valid_stat_ent, SLE_UINT8),
|
||||
|
||||
SLE_VAR(CompanyProperties, quarters_of_bankruptcy,SLE_UINT8),
|
||||
SLE_VAR(CompanyProperties, months_of_bankruptcy, SLE_UINT8),
|
||||
SLE_CONDVAR(CompanyProperties, bankrupt_asked, SLE_FILE_U8 | SLE_VAR_U16, 0, 103),
|
||||
SLE_CONDVAR(CompanyProperties, bankrupt_asked, SLE_UINT16, 104, SL_MAX_VERSION),
|
||||
SLE_VAR(CompanyProperties, bankrupt_timeout, SLE_INT16),
|
||||
|
@@ -926,7 +926,7 @@ static const OldChunks _company_chunk[] = {
|
||||
|
||||
OCL_SVAR( OC_UINT8, Company, colour ),
|
||||
OCL_SVAR( OC_UINT8, Company, money_fraction ),
|
||||
OCL_SVAR( OC_UINT8, Company, quarters_of_bankruptcy ),
|
||||
OCL_SVAR( OC_UINT8, Company, months_of_bankruptcy ),
|
||||
OCL_SVAR( OC_FILE_U8 | OC_VAR_U16, Company, bankrupt_asked ),
|
||||
OCL_SVAR( OC_FILE_U32 | OC_VAR_I64, Company, bankrupt_value ),
|
||||
OCL_SVAR( OC_UINT16, Company, bankrupt_timeout ),
|
||||
|
@@ -240,8 +240,9 @@
|
||||
* 174 23973 1.2.x
|
||||
* 175 24136
|
||||
* 176 24446
|
||||
* 177 24619
|
||||
*/
|
||||
extern const uint16 SAVEGAME_VERSION = 176; ///< Current savegame version of OpenTTD.
|
||||
extern const uint16 SAVEGAME_VERSION = 177; ///< Current savegame version of OpenTTD.
|
||||
|
||||
SavegameType _savegame_type; ///< type of savegame we are loading
|
||||
|
||||
|
Reference in New Issue
Block a user