Improved breakdowns: Various changes and fixes.

* Revert breakdown_chance to (mostly) its original behaviour.
* Create a new breakdown_chance_factor to hold breakdown_chance
  from improved breakdowns logic.
* Revert airport crash probabilities back to original behaviour, with
  modified behaviour only during emergency landings.
* Low power breakdowns now only reduce the power of the engine which
  has broken down.
* Low power breakdowns no longer reduce speed directly.
* Add callback function to run whenever improved breakdowns setting
  is changed. Reset breakdown_chance_factor where required.
* More whitespace/formatting...
This commit is contained in:
Jonathan G Rennison
2016-01-31 22:55:25 +00:00
parent 9742300a1e
commit 5eed9865d6
14 changed files with 89 additions and 43 deletions

View File

@@ -298,7 +298,7 @@ CommandCost CmdBuildRoadVehicle(TileIndex tile, DoCommandFlag flags, const Engin
v->reliability = e->reliability;
v->reliability_spd_dec = e->reliability_spd_dec;
v->breakdown_chance = 128;
v->breakdown_chance_factor = 128;
v->max_age = e->GetLifeLengthInDays();
_new_vehicle_id = v->index;