1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-17 17:32:45 +01:00

(svn r16324) [0.7] -Backport from trunk:

- Fix: Desyncs due to the fact that depot searching with a maximum search depth simply does not work with YAPF's caches [FS#2900] (r16323)
- Fix: Trains could get stuck in a depot when they wanted to go to the same depot again [FS#2873] (r16322)
- Fix: In the scenario editor change the (starting) game year of the scenario, not the (starting) game year for new games/scenarios (r16321)
- Fix: Loading of savegames created in revision between 0.3.5 and 0.3.6 caused crash (r16320)
- Fix: [NoAI] Set the autorenew settings for new AI companies to the default values, not to 0 or the local settings (r16316)
- Fix: [NewGRF] Allow accessing the house age when the house is not yet built (r16314)
- Fix: (Get|Set)TrackBits() is only valid for RAIL_TILE_NORMAL and _SIGNALS (r16311)
This commit is contained in:
rubidium
2009-05-16 20:29:53 +00:00
parent 085b498c28
commit ab7b117c50
23 changed files with 173 additions and 131 deletions

View File

@@ -784,8 +784,8 @@ static void ToolbarScenDateBackward(Window *w)
w->HandleButtonClick(TBSE_DATEBACKWARD);
w->SetDirty();
_settings_newgame.game_creation.starting_year = Clamp(_settings_newgame.game_creation.starting_year - 1, MIN_YEAR, MAX_YEAR);
SetDate(ConvertYMDToDate(_settings_newgame.game_creation.starting_year, 0, 1));
_settings_game.game_creation.starting_year = Clamp(_settings_game.game_creation.starting_year - 1, MIN_YEAR, MAX_YEAR);
SetDate(ConvertYMDToDate(_settings_game.game_creation.starting_year, 0, 1));
}
_left_button_clicked = false;
}
@@ -797,8 +797,8 @@ static void ToolbarScenDateForward(Window *w)
w->HandleButtonClick(TBSE_DATEFORWARD);
w->SetDirty();
_settings_newgame.game_creation.starting_year = Clamp(_settings_newgame.game_creation.starting_year + 1, MIN_YEAR, MAX_YEAR);
SetDate(ConvertYMDToDate(_settings_newgame.game_creation.starting_year, 0, 1));
_settings_game.game_creation.starting_year = Clamp(_settings_game.game_creation.starting_year + 1, MIN_YEAR, MAX_YEAR);
SetDate(ConvertYMDToDate(_settings_game.game_creation.starting_year, 0, 1));
}
_left_button_clicked = false;
}
@@ -1233,8 +1233,8 @@ public:
virtual void OnPaint()
{
this->SetWidgetDisabledState(TBSE_DATEBACKWARD, _settings_newgame.game_creation.starting_year <= MIN_YEAR);
this->SetWidgetDisabledState(TBSE_DATEFORWARD, _settings_newgame.game_creation.starting_year >= MAX_YEAR);
this->SetWidgetDisabledState(TBSE_DATEBACKWARD, _settings_game.game_creation.starting_year <= MIN_YEAR);
this->SetWidgetDisabledState(TBSE_DATEFORWARD, _settings_game.game_creation.starting_year >= MAX_YEAR);
/* Draw brown-red toolbar bg. */
GfxFillRect(0, 0, this->width - 1, this->height - 1, 0xB2);
@@ -1242,7 +1242,7 @@ public:
this->DrawWidgets();
SetDParam(0, ConvertYMDToDate(_settings_newgame.game_creation.starting_year, 0, 1));
SetDParam(0, ConvertYMDToDate(_settings_game.game_creation.starting_year, 0, 1));
DrawStringCenteredTruncated(this->widget[TBSE_DATEBACKWARD].right, this->widget[TBSE_DATEFORWARD].left, 6, STR_00AF, TC_FROMSTRING);
/* We hide this panel when the toolbar space gets too small */