mirror of https://github.com/OpenTTD/OpenTTD
(svn r20373) -Feature: [NewGRF] callback 0x156 to use another name for airport layouts than the default "Layout x"
parent
d6fa76b044
commit
00902294b3
|
@ -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…
Reference in New Issue