Add new signal type: no-entry signal
This is only passable in one direction, but does not have a signal or show an aspect in the opposite direction Add a setting for whether this is shown in the signal UI. Off by default.
This commit is contained in:
@@ -890,10 +890,11 @@ class NIHRailType : public NIHelper {
|
||||
HasBit(info->flags, RTF_ALLOW_90DEG) ? 'a' : '-',
|
||||
HasBit(info->flags, RTF_DISALLOW_90DEG) ? 'd' : '-');
|
||||
print(buffer);
|
||||
seprintf(buffer, lastof(buffer), " Ctrl flags: %c%c%c",
|
||||
seprintf(buffer, lastof(buffer), " Ctrl flags: %c%c%c%c",
|
||||
HasBit(info->ctrl_flags, RTCF_PROGSIG) ? 'p' : '-',
|
||||
HasBit(info->ctrl_flags, RTCF_RESTRICTEDSIG) ? 'r' : '-',
|
||||
HasBit(info->ctrl_flags, RTCF_NOREALISTICBRAKING) ? 'b' : '-');
|
||||
HasBit(info->ctrl_flags, RTCF_NOREALISTICBRAKING) ? 'b' : '-',
|
||||
HasBit(info->ctrl_flags, RTCF_NOENTRYSIG) ? 'n' : '-');
|
||||
print(buffer);
|
||||
seprintf(buffer, lastof(buffer), " Powered: 0x" OTTD_PRINTFHEX64, info->powered_railtypes);
|
||||
print(buffer);
|
||||
|
@@ -5412,6 +5412,15 @@ strhelp = STR_CONFIG_SETTING_SHOW_PROGSIG_FEATURES_HELPTEXT
|
||||
proc = ProgrammableSignalsShownChanged
|
||||
cat = SC_ADVANCED
|
||||
|
||||
[SDTC_BOOL]
|
||||
var = gui.show_noentrysig_ui
|
||||
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
|
||||
def = false
|
||||
str = STR_CONFIG_SETTING_SHOW_NOENTRYSIG_FEATURES
|
||||
strhelp = STR_CONFIG_SETTING_SHOW_NOENTRYSIG_FEATURES_HELPTEXT
|
||||
proc = ProgrammableSignalsShownChanged
|
||||
cat = SC_ADVANCED
|
||||
|
||||
[SDTC_BOOL]
|
||||
var = gui.show_veh_list_cargo_filter
|
||||
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
|
||||
|
@@ -314,8 +314,13 @@ static const SpriteID SPR_PROGSIGNAL_BASE = SPR_PALETTE_BASE + PALETTE_SPRITE_CO
|
||||
static const uint16 PROGSIGNAL_SPRITE_COUNT = 32;
|
||||
static const SpriteID SPR_DUP_PROGSIGNAL_BASE = SPR_PROGSIGNAL_BASE + PROGSIGNAL_SPRITE_COUNT;
|
||||
|
||||
/* Extra signal sprites */
|
||||
static const SpriteID SPR_EXTRASIGNAL_BASE = SPR_DUP_PROGSIGNAL_BASE + PALETTE_SPRITE_COUNT;
|
||||
static const uint16 EXTRASIGNAL_SPRITE_COUNT = 16;
|
||||
static const SpriteID SPR_DUP_EXTRASIGNAL_BASE = SPR_EXTRASIGNAL_BASE + EXTRASIGNAL_SPRITE_COUNT;
|
||||
|
||||
/* Zoning sprites */
|
||||
static const SpriteID SPR_ZONING_INNER_HIGHLIGHT_BASE = SPR_DUP_PROGSIGNAL_BASE + PROGSIGNAL_SPRITE_COUNT;
|
||||
static const SpriteID SPR_ZONING_INNER_HIGHLIGHT_BASE = SPR_DUP_EXTRASIGNAL_BASE + EXTRASIGNAL_SPRITE_COUNT;
|
||||
static const uint16 ZONING_INNER_HIGHLIGHT_SPRITE_COUNT = 32;
|
||||
static const SpriteID SPR_ZONING_INNER_HIGHLIGHT_RED = SPR_ZONING_INNER_HIGHLIGHT_BASE + 19;
|
||||
static const SpriteID SPR_ZONING_INNER_HIGHLIGHT_GREEN = SPR_ZONING_INNER_HIGHLIGHT_BASE + 20;
|
||||
@@ -1372,6 +1377,7 @@ static const SpriteID SPR_IMG_SIGNAL_ELECTRIC_COMBO = SPR_SIGNALS_BASE + 44;
|
||||
static const SpriteID SPR_IMG_SIGNAL_ELECTRIC_PBS = SPR_SIGNALS_BASE + 124;
|
||||
static const SpriteID SPR_IMG_SIGNAL_ELECTRIC_PBS_OWAY = SPR_SIGNALS_BASE + 140;
|
||||
static const SpriteID SPR_IMG_SIGNAL_ELECTRIC_PROG = SPR_PROGSIGNAL_BASE + 28;
|
||||
static const SpriteID SPR_IMG_SIGNAL_ELECTRIC_NO_ENTRY = SPR_EXTRASIGNAL_BASE + 14;
|
||||
static const SpriteID SPR_IMG_SIGNAL_SEMAPHORE_NORM = SPR_SIGNALS_BASE + 60;
|
||||
static const SpriteID SPR_IMG_SIGNAL_SEMAPHORE_ENTRY = SPR_SIGNALS_BASE + 76;
|
||||
static const SpriteID SPR_IMG_SIGNAL_SEMAPHORE_EXIT = SPR_SIGNALS_BASE + 92;
|
||||
@@ -1379,6 +1385,7 @@ static const SpriteID SPR_IMG_SIGNAL_SEMAPHORE_COMBO = SPR_SIGNALS_BASE + 108;
|
||||
static const SpriteID SPR_IMG_SIGNAL_SEMAPHORE_PBS = SPR_SIGNALS_BASE + 188;
|
||||
static const SpriteID SPR_IMG_SIGNAL_SEMAPHORE_PBS_OWAY= SPR_SIGNALS_BASE + 204;
|
||||
static const SpriteID SPR_IMG_SIGNAL_SEMAPHORE_PROG = SPR_PROGSIGNAL_BASE + 12;
|
||||
static const SpriteID SPR_IMG_SIGNAL_SEMAPHORE_NO_ENTRY= SPR_EXTRASIGNAL_BASE + 6;
|
||||
static const SpriteID SPR_IMG_SIGNAL_CONVERT = SPR_OPENTTD_BASE + 135;
|
||||
|
||||
static const SpriteID SPR_IMG_TUNNEL_RAIL = 2430;
|
||||
|
Reference in New Issue
Block a user