Callback: Custom shape check
Custom shape check (2F)
This callback is called when TTD checks if a given tile is suitable for the industry tile. The callback should return zero if the tile isn't suitable, or any other value if it is suitable.
GRFv≥7 The meaning of the returned value is different in GRF version 7; it works the same way as callback 28. 2.6 Also, since TTDPatch r1755, you can use the text reference stack for your error messages, similarly to callback 3A. The only difference is that only 4 registers are copied instead of 6.
Since the tile isn't built yet, you can use variables 41, 42, 43, and 60 only, and you can't access any industry variables, either. Variable 60 is the most useful here, since you can check the slope of the tile, or even the nearby tiles. This callback is the only way to allow your tile to be built on steep slopes.
1.1 Since OpenTTD r19744, you can access the random bits of the industry (it would get after construction) via industry variable 5F resp. RandomAction2 type 83.
PLEASE NOTE: When this callback is called, TTD is just checking, and hasn't placed any industry tiles yet. Therefore, bit 8 (tile belongs to the same industry as current) of variable 60 will always be clear, even for the current tile.