列车脱线

This commit is contained in:
xiazengbin 2022-07-29 17:49:29 +08:00
parent c862318813
commit e66a0c204a

View File

@ -118,8 +118,7 @@ public class VirtualRealityTrain extends VirtualRealityDevice {
/**
* 车载服务通讯是否正常在线
*/
private boolean communication;
private boolean communication;
/**
* 列车运行级别
*/
@ -508,7 +507,7 @@ public class VirtualRealityTrain extends VirtualRealityDevice {
super(code, groupNumber, DeviceType.TRAIN);
this.groupNumber = groupNumber;
this.gear = Handwheel.ATO;
this.communication = true;
this.communication = true;
this.atpOn = true;
this.door1 = new Door(this, "1");
this.door2 = new Door(this, "2");
@ -524,7 +523,7 @@ public class VirtualRealityTrain extends VirtualRealityDevice {
@Override
public void reset() {
this.noCommunicateDevice = false;
this.communication = true;
this.communication = true;
this.runLevel = null;
this.driveMode = null;
this.tempPreselectionMode = PreselectionMode.AM_C;
@ -654,7 +653,7 @@ public class VirtualRealityTrain extends VirtualRealityDevice {
}
private void init() {
this.communication = true;
this.communication = true;
this.jump = false;
this.hold = false;
this.standParkedTrainActivity = null;
@ -1286,7 +1285,18 @@ public class VirtualRealityTrain extends VirtualRealityDevice {
return false;
}
},
/** 列车脱线 */
OFF_LINE {
@Override
public boolean apply(MapElement device) {
if (super.apply(device)) {
VirtualRealityTrain train = (VirtualRealityTrain) device;
train.emergencyBreak(); //暂时就在这里直接处理可能正常应该是ATP的责任
return true;
}
return false;
}
},
/** 突然EB */
SUDDEN_EB{},;