Callback: Cargo sub-type display for industries
From GRFSpecs
Jump to navigationJump to search
Cargo sub-type display for industries (37)
This callback allows you to display some text after the cargo name in the industry fund window and in industry windows. Just like callback 19, the return value must be the number of a D0xx string set by an action 4 in the same .grf file. Returning FFh causes no text to be displayed.
During the callback, the lowest byte of var. 18 can have the following values:
Number | Meaning |
---|---|
00 | Return subtext for first accepted cargo type |
01 | Return subtext for second accepted cargo type |
02 | Return subtext for third accepted cargo type |
03 | Return subtext for first produced cargo type |
04 | Return subtext for second produced cargo type |
Bits 8..15 of var. 18 can have the following values:
Number | Meaning |
---|---|
00 | The text is to be displayed in the industry fund window. The industry isn't built yet, so you can't access the industry variables |
01 | The text is to be displayed in the window of the industry. You can use the industry variables here. |
02 | The text is to be displayed in the industry directory window. You can use the industry variables here. |
other values | Reserved for future use |
Other bits of var. 18 are reserved for future use.
Since OpenTTD r17802, the contents of registers 100h..105h are copied onto the text reference stack.