Skip to content

Commit

Permalink
Apply #27: Blue poll for routing restriction signals
Browse files Browse the repository at this point in the history
  • Loading branch information
telk5093 committed Mar 3, 2024
1 parent bbf3c64 commit 994066e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
29 changes: 25 additions & 4 deletions ko_signal_set.pnml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ grf {
bit: 3;
def_value: 1;
}

// Use caution signals(Y and YG) together
use_routing_restriction {
type: bool;
name: string(STR_PARAM_USE_ROUTING_RESTRICTION_NAME);
desc: string(STR_PARAM_USE_ROUTING_RESTRICTION_DESC);
bit: 4;
def_value: 1;
}
}

// Use blue signal as open state
Expand Down Expand Up @@ -140,9 +149,21 @@ if (!extended_feature_test("action3_signals_custom_signal_sprites")) {
// Electric signals
#include "./src/electric.pnml"

param[10] = reserve_sprites(1);
replace (param[10]) {
recolour_sprite {
0x84: 0xC8;
0x85: 0xCA;
0x86: 0xCC;
}
}

// General signal switches
switch(FEAT_SIGNALS, SELF, sw_signal_types, (extra_callback_info2 & 0x00FFFF00) >> 8) {
0x0: sw_signal_block; // Block
switch (FEAT_SIGNALS, SELF, sw_signal_types, [
STORE_TEMP(param[10] + (hasbit(extra_callback_info2, 24) ? 0 : 1), 0x100),
((extra_callback_info2 & 0x00FFFF00) >> 8)
]) {
0x000: sw_signal_block; // Block
0x100: sw_signal_entry; // Entry
0x200: sw_signal_exit; // Exit
0x300: sw_signal_combo; // Combo
Expand All @@ -154,9 +175,9 @@ switch(FEAT_SIGNALS, SELF, sw_signal_types, (extra_callback_info2 & 0x00FFFF00)
}

// Item
item(FEAT_SIGNALS, ko_signal_set, 0) {
item (FEAT_SIGNALS, ko_signal_set, 0) {
property {
enable_restricted_signals: 1;
enable_restricted_signals: use_routing_restriction;
enable_signal_recolour: 1;
enable_no_entry_signals: 1;
extra_aspects: 3;
Expand Down
2 changes: 2 additions & 0 deletions lang/english.lng
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ STR_PARAM_USE_TVM_NAME :Change semaphore block signal
STR_PARAM_USE_TVM_DESC :Change semaphore block signal to TVM block sign which is used for high speed rails, which is the same graphics for red and green state. (default: enabled)
STR_PARAM_USE_CAUTION_SIGNALS_NAME :Use caution signals
STR_PARAM_USE_CAUTION_SIGNALS_DESC :Use deceleration(YG) and caution(Y) signals for electric combo, exit signals respectively. (default: enabled)
STR_PARAM_USE_ROUTING_RESTRICTION_NAME :Show routing restrictions
STR_PARAM_USE_ROUTING_RESTRICTION_DESC :When enabled, signals with routing restriction programs atttached are shown with a blue signal post.
# STR_PARAM_FORCE_TVM_SIGNAL_SIDE_NAME :Position of the TVM signal's side
# STR_PARAM_FORCE_TVM_SIGNAL_SIDE_DESC :Force TVM signal's position regardless of the driving traffic side. (default: As driving traffic side)
# STR_PARAM_TVM_SIGNAL_SIDE_TRAFFIC_SIDE :As driving traffic side
Expand Down
2 changes: 2 additions & 0 deletions lang/korean.lng
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ STR_PARAM_USE_TVM_NAME :구식 폐색 신호기를 TVM
STR_PARAM_USE_TVM_DESC :구식 폐색 신호기를 고속철도에서 사용하는 TVM 폐색 표지로 변경합니다. TVM 폐색 표지는 진행/정지 신호가 구분되지 않습니다. (기본값: 켬)
STR_PARAM_USE_CAUTION_SIGNALS_NAME :주의 신호 사용
STR_PARAM_USE_CAUTION_SIGNALS_DESC :전자식 복합, 출구 신호기의 진행 신호를 각각 감속(YG), 주의(Y) 신호로 변경합니다. (기본값: 켬)
STR_PARAM_USE_ROUTING_RESTRICTION_NAME :경로 제한 표시
STR_PARAM_USE_ROUTING_RESTRICTION_DESC :이 설정을 켜면, 경로 제한 프로그램이 있는 신호기의 기둥을 파란색으로 표시합니다.
# STR_PARAM_FORCE_TVM_SIGNAL_SIDE_NAME :TVM 신호 위치
# STR_PARAM_FORCE_TVM_SIGNAL_SIDE_DESC :TVM 신호기의 위치를 통행 방향과 상관없이 강제할 수 있습니다 (기본값: 통행 방향)
# STR_PARAM_TVM_SIGNAL_SIDE_TRAFFIC_SIDE :통행 방향
Expand Down

0 comments on commit 994066e

Please sign in to comment.