Difference between revisions of "Callback: Customized building name"

From GRFSpecs
Jump to navigationJump to search
(use new grf templates)
(more strict var 10/18 masking)
 
Line 1: Line 1:
 
== House customized building name (14D) ==
 
== House customized building name (14D) ==
   
This callback is activated from the Tile Description Query tool, when enquiring a house.  Variable 10 will be set to 1 if the house is complete, otherwise it will be 0.  The return value is the "xx" of a D0xx text ID.  If the callback fails, the Query tool will use the house name set in property 12 (Building name ID).
+
This callback is activated from the Tile Description Query tool, when enquiring a house. Bit 0 of variable 10 will be set to 1 if the house is complete, otherwise it will be 0. The return value is the "xx" of a D0xx text ID.  If the callback fails, the Query tool will use the house name set in property 12 (Building name ID).
   
 
{{grfFrom|8}} For GRF version 8 and above you can also return 400 to display the name from the property. (instead of failing the callback).
 
{{grfFrom|8}} For GRF version 8 and above you can also return 400 to display the name from the property. (instead of failing the callback).

Latest revision as of 12:34, 18 April 2015

House customized building name (14D)

This callback is activated from the Tile Description Query tool, when enquiring a house. Bit 0 of variable 10 will be set to 1 if the house is complete, otherwise it will be 0. The return value is the "xx" of a D0xx text ID.  If the callback fails, the Query tool will use the house name set in property 12 (Building name ID).

GRFv≥8 For GRF version 8 and above you can also return 400 to display the name from the property. (instead of failing the callback).

Since this callback is not performed frequently, you do not need to specify a mask.  It will always be performed, and the name will only change when successful.

Available for OpenTTD since r15172, and for TTDPatch since TTDPatch 2.6r2249