Callback: Vehicle Start/stop check
From GRFSpecs
Jump to navigationJump to search
Vehicle Start/stop check (31)
This callback is called whenever a player (or the AI) tries to start or stop a vehicle. This is mainly useful for preventing vehicles from leaving the depot unless a given condition is met. To check whether a vehicle is being started or stopped, check bit 1 of variable B2. If set, the vehicle is currently stopped and if clear, the vehicle is moving (or at least, not stopped manually).
The return value is a D0xx text to use as second line of an error message, or FF to indicate that the start/stop action should succeed. The callback is always used when defined, no bit in the action 0 property needs to be set to activate it.