Callback: Get accepted cargo types

From GRFSpecs
Jump to navigationJump to search

Get accepted cargo types (2A/2C)

Called when TTD needs to know what cargoes a house/industry tile can accept. The bits of the result must be filled in the following way:

Bit range Meaning
0..4 First cargo type
5..9 Second cargo type
10..14 Third cargo type

If the callback fails, the according values from property 1E is used instead for houses, and properties 0A..0C for industry tiles. This callback is most useful in combination with callback 1F/2B, so you can fully control the acceptance of your house/industry, even allowing dynamic changes

GRFv≥7 From GRF version 7 and above, the interpretation of the returned value changes: instead of climate-dependent cargo slot numbers, you have to return climate-independent cargo IDs. If your GRF has a cargo translation table, then this ID is the index in that table; otherwise, it's the cargo bit. Acceptance of cargoes not currently present will automatically be disabled.