From 4fec90684978f0a33528dff2d71b46cc006fbae7 Mon Sep 17 00:00:00 2001 From: weizhihong Date: Wed, 30 Nov 2022 16:22:20 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E9=81=93=E5=B2=94=E5=AE=9A=E5=8F=8D?= =?UTF-8?q?=E4=BD=8D=E8=83=8C=E6=99=AF=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vo/training2/rule/BgSceneStatusRule.java | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/main/java/club/joylink/rtss/vo/training2/rule/BgSceneStatusRule.java b/src/main/java/club/joylink/rtss/vo/training2/rule/BgSceneStatusRule.java index 5898c8194..c544e377e 100644 --- a/src/main/java/club/joylink/rtss/vo/training2/rule/BgSceneStatusRule.java +++ b/src/main/java/club/joylink/rtss/vo/training2/rule/BgSceneStatusRule.java @@ -38,6 +38,39 @@ public enum BgSceneStatusRule { signal.setBlockade(true); return getBgScene(simulation); } + }, + /** + * 道岔定位背景:将道岔设置为范围 + */ + SWITCH_BG_SCENE("道岔定位背景") { + @Override + public String doHandle(Simulation simulation, MapElement mapElement) { + Switch iSwitch = (Switch) mapElement; + setSingleSwitchPositionDirectly(iSwitch, false); + return getBgScene(simulation); + } + }, + /** + * 道岔定位背景:将道岔设置为反位 + */ + SWITCH_NP_BG_SCENE("道岔定位背景") { + @Override + public String doHandle(Simulation simulation, MapElement mapElement) { + Switch iSwitch = (Switch) mapElement; + setSingleSwitchPositionDirectly(iSwitch, false); + return getBgScene(simulation); + } + }, + /** + * 道岔反位背景:将道岔设置为定位 + */ + SWITCH_RP_BG_SCENE("道岔反位背景") { + @Override + public String doHandle(Simulation simulation, MapElement mapElement) { + Switch iSwitch = (Switch) mapElement; + setSingleSwitchPositionDirectly(iSwitch, true); + return getBgScene(simulation); + } } ;