The International Simutrans Forum

Simutrans Extended => Simutrans-Extended bug reports => Simutrans-Extended development => Simutrans-Extended closed bug reports => Topic started by: RESTRICTED ACCOUNT on August 09, 2018, 11:04:55 AM

Title: Bug: Parameter "increase_maintenance_by_percent" can not set correctly
Post by: RESTRICTED ACCOUNT on August 09, 2018, 11:04:55 AM
If "increase_maintenance_by_percent" is larger than 200 in .dat file, "increase_maintenance_by_percent" is set to 200. (The maintenance cost will eventually double)
For example, CartMailNew (https://github.com/jamespetts/simutrans-pak128.britain/blob/ff3b9c365049f22b5006dad6c1621c8ce764bddf/bus/carts.dat) has increase_maintenance_by_percent set to 275 but it only rises to 100% like following image.
(https://simutrans-germany.com/files/upload/increase_maint_bug.png)

If "increase_maintenance_by_percent" is smaller than 200 in .dat file, "increase_maintenance_by_percent" is set to 100. (The maintenance cost will not rise at all)
If "increase_maintenance_by_percent" is not set in .dat file, the default setting is used. (This is correct behavior. The maintenance cost will eventually increase to 4 times in the default setting of 128Britain-Ex)
Title: Re: Bug: Parameter "increase_maintenance_by_percent" can not set correctly
Post by: jamespetts on August 09, 2018, 05:49:49 PM
Thank you for the report - I believe that I have now fixed this, which was, I think, caused by a rounding/loss of precision error.
Title: Re: Bug: Parameter "increase_maintenance_by_percent" can not set correctly
Post by: RESTRICTED ACCOUNT on August 10, 2018, 12:37:23 PM
I confirmed today's nightly build and it has been fixed. :thumbsup:
Thank you for the quick fix ^-^
Title: Re: Bug: Parameter "increase_maintenance_by_percent" can not set correctly
Post by: jamespetts on August 10, 2018, 12:46:25 PM
Splendid, thank you for confirming.