GRF: Add railtype custom signal sprite restricted flag, and control flag

This commit is contained in:
Jonathan G Rennison
2020-09-26 11:53:44 +01:00
parent d32672a325
commit b6f583a799
8 changed files with 25 additions and 6 deletions

View File

@@ -2489,7 +2489,7 @@ void DrawSingleSignal(TileIndex tile, const RailtypeInfo *rti, Track track, Sign
uint x, y;
GetSignalXY(tile, pos, x, y);
SpriteID sprite = GetCustomSignalSprite(rti, tile, type, variant, condition);
SpriteID sprite = GetCustomSignalSprite(rti, tile, type, variant, condition, false, show_restricted);
bool is_custom_sprite = (sprite != 0);
if (sprite != 0) {
sprite += image;
@@ -2513,7 +2513,7 @@ void DrawSingleSignal(TileIndex tile, const RailtypeInfo *rti, Track track, Sign
is_custom_sprite = origin_slot != _opengfx_grf_file_index && (origin_slot >= _first_user_grf_file_index);
}
if (is_custom_sprite && show_restricted && _settings_client.gui.show_restricted_signal_default) {
if (is_custom_sprite && show_restricted && _settings_client.gui.show_restricted_signal_default && !HasBit(rti->ctrl_flags, RTCF_RESTRICTEDSIG)) {
/* Use duplicate sprite block, instead of GRF-specified signals */
if (type == SIGTYPE_PROG) {
if (variant == SIG_SEMAPHORE) {