Initial implementation of NewGRF custom signal styles

This commit is contained in:
Jonathan G Rennison
2022-06-18 23:37:35 +01:00
parent 098bb74ed2
commit 6e4c4b35e7
34 changed files with 536 additions and 75 deletions

View File

@@ -445,6 +445,26 @@ item (FEAT_GLOBALVARS) {
N.B. Realistic braking must be enabled for additional signal aspects to be used
</td>
</tr>
<tr><td>define_style</td><td>1 - 255</td>
<td>
Define a custom signal style<br />
Signals using this style will only use this GRF, or the default graphics if no graphics are returned.<br />
The value supplied is returned in the signal_style variable.<br />
This property (and related signal style properties) may be used more than once.<br />
The total number of custom signal styles in a game is currently limited to 15.
</td>
</tr>
<tr><td>style_name</td><td>string</td>
<td>
Set the name of the most recently defined style (defined using the define_style property).<br />
This property should be used if using the define_style property, as otherwise the style will have no name.
</td>
</tr>
<tr><td>no_default_style</td><td>0 or 1</td>
<td>
When enabled, custom signal graphics from this GRF are only used for custom signal styles, not the default style
</td>
</tr>
</table>
<br />
<table>
@@ -489,6 +509,11 @@ item (FEAT_GLOBALVARS) {
Above signal context variables in one variable (all of the signals_signal_context variable)
</td>
</tr>
<tr><td>signal_style</td><td>0 - 255</td>
<td>
The style ID defined using define_style for signals using a custom style, or 0 for signals using the default style
</td>
</tr>
</table>
<p>
Custom signal sprites example: