Browse Source

adjust transporter state and fixed transporter safe interlock

chenkui 3 weeks ago
parent
commit
51ae52d1f5
2 changed files with 4 additions and 7 deletions
  1. 3 3
      CyberX8_Core/RtState.cs
  2. 1 4
      CyberX8_RT/Modules/Transporter/TransporterEntity.cs

+ 3 - 3
CyberX8_Core/RtState.cs

@@ -139,12 +139,12 @@ namespace CyberX8_Core
         Positioning,
         SwitchOning,
         SwitchOffing,
-        PickUping,
-        MovingTo,
-        Placing,
         Parking,
         ElevatorUping,
         ElevatorLowing,
+        PickUping,
+        MovingTo,
+        Placing,
         Transfering,
         PickUpMoveToing,
         PickUpMoveToComplete,

+ 1 - 4
CyberX8_RT/Modules/Transporter/TransporterEntity.cs

@@ -1126,10 +1126,7 @@ namespace CyberX8_RT.Modules.Transporter
                 return false;
             }
 
-            if(otherEntity.State==(int)TransporterState.Transfering||otherEntity.State==(int)TransporterState.PickUpMoveToing
-                ||otherEntity.State==(int)TransporterState.MovingTo||otherEntity.State==(int)TransporterState.PickUpValidating
-                ||otherEntity.State==(int)TransporterState.PickUpValidateComplete||otherEntity.State==(int)TransporterState.ValidateMoveTo
-                ||otherEntity.State==(int)TransporterState.Placing)
+            if(otherEntity.State>=(int)TransporterState.PickUping&&otherEntity.State<=(int)TransporterState.ConfirmCompleting)
             {
                 bool conflict= CheckModuleWithOtherModuleConflict(otherEntity,otherModule,positive,targetCell);
                 if(conflict)