This commit is contained in:
xzb 2023-08-25 14:31:14 +08:00
parent cd1ee45866
commit 2e43869b12
2 changed files with 24 additions and 0 deletions

View File

@ -28,6 +28,18 @@ func FirePsdInterlockRelease(world ecs.World, psdId string, lockRelease bool) er
return nil
}
// 屏蔽门全开
func FirePsdWholeOpen(world ecs.World, psdId string) error {
return FirePsdOperation(world, psdId, false)
}
// 屏蔽门全关
func FirePsdWholeClose(world ecs.World, psdId string) error {
return FirePsdOperation(world, psdId, true)
}
////////////////////////////////////////////////////////////////////////////////////
// 车站单侧屏蔽门操作
// closeOpt true-关门操作false-开门操作
func FirePsdOperation(world ecs.World, psdId string, closeOpt bool) error {

View File

@ -16,6 +16,18 @@ const (
SwitchReverseRate int8 = system.PercentageRateMax
)
// 道岔定操
func FireSwitchDcj(w ecs.World, switchId string) error {
return FireSwitchTurn(w, switchId, SwitchNormalRate)
}
// 道岔反操
func FireSwitchFcj(w ecs.World, switchId string) error {
return FireSwitchTurn(w, switchId, SwitchReverseRate)
}
//////////////////////////////////////////////////////////////////////////////
// 触发道岔正常转动
// w: 当前世界
// switchId: 道岔id