(svn r20373) -Feature: [NewGRF] callback 0x156 to use another name for airport layouts than the default "Layout x"

pull/155/head
yexo 14 years ago
parent 0f131719aa
commit 51fe375651

@ -258,6 +258,11 @@ public:
case BAIRW_LAYOUT_NUM:
SetDParam(0, STR_STATION_BUILD_AIRPORT_LAYOUT_NAME);
SetDParam(1, _selected_airport_layout + 1);
if (_selected_airport_index != -1) {
const AirportSpec *as = GetAirportSpecFromClass(_selected_airport_class, _selected_airport_index);
StringID string = GetAirportTextCallback(as, _selected_airport_layout, CBID_AIRPORT_LAYOUT_NAME);
if (string != STR_UNDEFINED) SetDParam(0, string);
}
break;
default: break;

@ -248,6 +248,9 @@ enum CallbackID {
* used as a custom string ID in the 0xD000 range.
*/
CBID_AIRPORT_ADDITIONAL_TEXT = 0x155, // 15 bit callback
/** Called to determine text to show as airport layout name. */
CBID_AIRPORT_LAYOUT_NAME = 0x156, // 15 bit callback
};
/**

Loading…
Cancel
Save