mirror of https://github.com/OpenTTD/OpenTTD
(svn r20261) [1.0] -Backport from trunk:
- Fix: Make it possible to properly assess the length of the rail toolbar caption, don't require '{WHITE}' control codes (r20242) - Fix: Check for disallowed level crossings also when converting rail (r20237) - Fix: Haiku uses a 'special' location for headers (r20219) - Fix: Desync due to (temporary) wrong railtype; when loading a savegame the railtype of some (high ID) trains could be wrong [FS#3945] (r20137)release/1.0
parent
9531e10e82
commit
00a2f93bd6
|
@ -2311,6 +2311,13 @@ detect_library() {
|
|||
log 2 " trying /usr/pkg/include/$4$5... no"
|
||||
fi
|
||||
fi
|
||||
if [ -z "$res" ] && [ "$os" = "HAIKU" ]; then
|
||||
eval "$2=`ls -1 /boot/common/include/$4*.h 2>/dev/null | egrep \"\/$5\$\"`"
|
||||
eval "res=\$$2"
|
||||
if [ -z "$res" ]; then
|
||||
log 2 " trying /boot/common/include/$4$5... no"
|
||||
fi
|
||||
fi
|
||||
|
||||
eval "res=\$$2"
|
||||
if [ -n "$res" ] && ( [ -n "$force_static" ] || ( [ "$enable_static" != "0" ] && [ "$os" != "OSX" ] ) ); then
|
||||
|
|
|
@ -59,7 +59,7 @@ enum BuildVehicleWidgets {
|
|||
static const NWidgetPart _nested_build_vehicle_widgets[] = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, BUILD_VEHICLE_WIDGET_CAPTION), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, BUILD_VEHICLE_WIDGET_CAPTION), SetDataTip(STR_WHITE_STRING, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
NWidget(WWT_SHADEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_STICKYBOX, COLOUR_GREY),
|
||||
EndContainer(),
|
||||
|
|
|
@ -601,8 +601,7 @@ bool SettingsDisableElrail(int32 p1)
|
|||
FOR_ALL_TRAINS(t) {
|
||||
/* power and acceleration is cached only for front engines */
|
||||
if (t->IsFrontEngine()) {
|
||||
t->PowerChanged();
|
||||
t->UpdateAcceleration();
|
||||
t->ConsistChanged(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1396,6 +1396,10 @@ CommandCost CmdConvertRail(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
|
|||
break;
|
||||
case MP_ROAD:
|
||||
if (!IsLevelCrossing(tile)) continue;
|
||||
if (RailNoLevelCrossings(totype)) {
|
||||
_error_message = STR_ERROR_CROSSING_DISALLOWED;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
case MP_TUNNELBRIDGE:
|
||||
if (GetTunnelBridgeTransportType(tile) != TRANSPORT_RAIL) continue;
|
||||
|
|
|
@ -642,7 +642,6 @@ struct BuildRailToolbarWindow : Window {
|
|||
const RailtypeInfo *rti = GetRailTypeInfo(railtype);
|
||||
|
||||
assert(railtype < RAILTYPE_END);
|
||||
this->GetWidget<NWidgetCore>(RTW_CAPTION)->widget_data = rti->max_speed > 0 ? STR_TOOLBAR_RAILTYPE_VELOCITY : STR_JUST_STRING;
|
||||
this->GetWidget<NWidgetCore>(RTW_BUILD_NS)->widget_data = rti->gui_sprites.build_ns_rail;
|
||||
this->GetWidget<NWidgetCore>(RTW_BUILD_X)->widget_data = rti->gui_sprites.build_x_rail;
|
||||
this->GetWidget<NWidgetCore>(RTW_BUILD_EW)->widget_data = rti->gui_sprites.build_ew_rail;
|
||||
|
@ -696,8 +695,13 @@ struct BuildRailToolbarWindow : Window {
|
|||
{
|
||||
if (widget == RTW_CAPTION) {
|
||||
const RailtypeInfo *rti = GetRailTypeInfo(this->railtype);
|
||||
SetDParam(0, rti->strings.toolbar_caption);
|
||||
SetDParam(1, rti->max_speed);
|
||||
if (rti->max_speed > 0) {
|
||||
SetDParam(0, STR_TOOLBAR_RAILTYPE_VELOCITY);
|
||||
SetDParam(1, rti->strings.toolbar_caption);
|
||||
SetDParam(2, rti->max_speed);
|
||||
} else {
|
||||
SetDParam(0, rti->strings.toolbar_caption);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -829,7 +833,7 @@ struct BuildRailToolbarWindow : Window {
|
|||
static const NWidgetPart _nested_build_rail_widgets[] = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, RTW_CAPTION), SetDataTip(STR_RAIL_TOOLBAR_RAILROAD_CONSTRUCTION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, RTW_CAPTION), SetDataTip(STR_WHITE_STRING, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
|
|
Loading…
Reference in New Issue