From fa7211d7bdf68be1df571f222a047ddd6cd764b0 Mon Sep 17 00:00:00 2001 From: walker Date: Tue, 23 Jan 2024 09:35:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=BA=E6=AE=B5=E5=A4=8D=E4=BD=8D/=E9=A2=84?= =?UTF-8?q?=E5=A4=8D=E4=BD=8D=E6=8E=A5=E5=8F=A3=E9=80=BB=E8=BE=91=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fi/section.go | 27 ++++++++++++++------------- jl-ecs-go | 2 +- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/fi/section.go b/fi/section.go index f7cbc78..1193eb7 100644 --- a/fi/section.go +++ b/fi/section.go @@ -2,10 +2,11 @@ package fi import ( "fmt" + "strings" + "joylink.club/ecs" "joylink.club/rtsssimulation/component" "joylink.club/rtsssimulation/entity" - "strings" ) // AxleSectionDrstDrive 计轴直接复位操作 @@ -19,12 +20,12 @@ func AxleSectionDrstDrive(w ecs.World, sectionId string, set bool) error { if sectionModel == nil { return ecs.NewErrResult(fmt.Errorf("区段模型[%s]不存实体", sectionId)) } - if set { - axleSectionEntry := wd.EntityMap[sectionId] - if !axleSectionEntry.HasComponent(component.AxleSectionFaultTag) { - return ecs.NewErrResult(fmt.Errorf("区段[%s]非故障占用,无法进行复位操作", sectionId)) - } - } + // if set { + // axleSectionEntry := wd.EntityMap[sectionId] + // if !axleSectionEntry.HasComponent(component.AxleSectionFaultTag) { + // return ecs.NewErrResult(fmt.Errorf("区段[%s]非故障占用,无法进行复位操作", sectionId)) + // } + // } // faDcAxleDeviceEntry := entity.FindAxleManageDevice(wd, sectionModel.CentralizedStation()) @@ -53,12 +54,12 @@ func AxleSectionPdrstDrive(w ecs.World, sectionId string, set bool) error { if sectionModel == nil { return ecs.NewErrResult(fmt.Errorf("区段模型[%s]不存实体", sectionId)) } - if set { - axleSectionEntry := wd.EntityMap[sectionId] - if !axleSectionEntry.HasComponent(component.AxleSectionFaultTag) { - return ecs.NewErrResult(fmt.Errorf("区段[%s]非故障占用,无法进行复位操作", sectionId)) - } - } + // if set { + // axleSectionEntry := wd.EntityMap[sectionId] + // if !axleSectionEntry.HasComponent(component.AxleSectionFaultTag) { + // return ecs.NewErrResult(fmt.Errorf("区段[%s]非故障占用,无法进行复位操作", sectionId)) + // } + // } // faDcAxleDeviceEntry := entity.FindAxleManageDevice(wd, sectionModel.CentralizedStation()) diff --git a/jl-ecs-go b/jl-ecs-go index 5d4e5c5..8a028e6 160000 --- a/jl-ecs-go +++ b/jl-ecs-go @@ -1 +1 @@ -Subproject commit 5d4e5c51fd43fa25d3ef7a8bd2cbc3d277b94a8d +Subproject commit 8a028e6405150dada3caa4c90f34ebf93aef6163