diff --git a/component/common.go b/component/common.go index 61a89b4..40f79ed 100644 --- a/component/common.go +++ b/component/common.go @@ -16,10 +16,10 @@ var ( BitStateType = ecs.NewComponentType[BitState]() ) -type Bypass struct { +/*type Bypass struct { BypassEnable bool // 摁钮,钥匙 是否旁路 OldVal bool //摁钮旁路旧值 -} +}*/ // 唯一ID组件 type Uid struct { @@ -50,7 +50,7 @@ func CalculateTwoPositionAvgSpeed(t int, tick int) int32 { // 仅有两状态的组件 type BitState struct { - Bypass + //Bypass Val bool } diff --git a/component/ibp.go b/component/ibp.go index 6017d39..e1b3c1b 100644 --- a/component/ibp.go +++ b/component/ibp.go @@ -45,7 +45,7 @@ var AlarmDriveType = ecs.NewComponentType[AlarmDrive]() // 挡位组件 type GearState struct { - Bypass + //Bypass Val int32 } diff --git a/fi/ibp.go b/fi/ibp.go index d2fa9d2..e69c9ad 100644 --- a/fi/ibp.go +++ b/fi/ibp.go @@ -2,8 +2,6 @@ package fi import ( "fmt" - "joylink.club/bj-rtsts-server/dto/request_proto" - "joylink.club/ecs" "joylink.club/rtsssimulation/component" "joylink.club/rtsssimulation/entity" @@ -60,7 +58,7 @@ func SwitchKeyGear(w ecs.World, id string, gear int32) error { return result.Err } -func SetBypassBtn(w ecs.World, id string, p request_proto.BypassOperationReq_Operation) error { +/*func SetBypassBtn(w ecs.World, id string, p request_proto.BypassOperationReq_Operation) error { result := <-ecs.Request[ecs.EmptyType](w, func() ecs.Result[ecs.EmptyType] { wd := entity.GetWorldData(w) @@ -98,4 +96,4 @@ func convertBypassBoolVal(p request_proto.BypassOperationReq_Operation) bool { val = false } return val -} +}*/ diff --git a/sys/circuit_sys/ibp.go b/sys/circuit_sys/ibp.go index 374326c..f4e165a 100644 --- a/sys/circuit_sys/ibp.go +++ b/sys/circuit_sys/ibp.go @@ -114,9 +114,9 @@ func (ibp *IBPSys) empState(entry *ecs.Entry, s *component.EmpElectronic) { func getIbpBtnVal(entry *ecs.Entry) bool { btn := component.BitStateType.Get(entry) //旁路后返回之前的值 - if btn.BypassEnable { + /* if btn.BypassEnable { return btn.OldVal - } + }*/ return btn.Val } @@ -124,9 +124,9 @@ func getIbpBtnVal(entry *ecs.Entry) bool { func getIbpKeyVal(entry *ecs.Entry) bool { btn := component.GearStateType.Get(entry) //旁路后返回之前的值 - if btn.BypassEnable { + /* if btn.BypassEnable { return btn.OldVal - } + }*/ return btn.Val == 0 } diff --git a/sys/circuit_sys/psd.go b/sys/circuit_sys/psd.go index 63835f1..c004025 100644 --- a/sys/circuit_sys/psd.go +++ b/sys/circuit_sys/psd.go @@ -72,24 +72,18 @@ func (p *PsdSys) Update(world ecs.World) { mkx := component.MkxType.Get(mkxEntry) //门控箱站台门关闭 pcb := component.BitStateType.Get(mkx.PCB) - if !pcb.BypassEnable { - if mkx.PCB != nil && pcb.Val { - pcbTd = true - } + if mkx.PCB != nil && pcb.Val { + pcbTd = true } //门控箱站台门打开 pob := component.BitStateType.Get(mkx.POB) - if !pob.BypassEnable { - if mkx.POB != nil && pob.Val { - pobTd = true - } + if mkx.POB != nil && pob.Val { + pobTd = true } //门控箱站台确认 pab := component.BitStateType.Get(mkx.PAB) - if !pab.BypassEnable { - if mkx.PAB != nil && pab.Val { - pabTd = true - } + if mkx.PAB != nil && pab.Val { + pabTd = true } } if pmc.PCBJ != nil {