void exitPointDepth2_OnEnter(ActionPoint sender, Load load) { if (CurrentTask.Destination.LoadDepth() == 2) // can only be dropping off at a bin location rack conveyors don't exist aat depth 2 { ParentMultiShuttle.ArrivedAtRackLocation(new TaskEventArgs(CurrentTask, load)); load.Dispose(); CurrentTask = null; } }
private void ArrivedAtDest(Load load) { if (CurrentTask.Destination.ConvType() == ConveyorTypes.OutfeedRack) { load.Switch(ParentMultiShuttle.ConveyorLocations.Find(x => x.LocName == CurrentTask.Destination), true); } else { ParentMultiShuttle.ArrivedAtRackLocation(new TaskEventArgs(CurrentTask, load)); load.Dispose(); CurrentTask = null; } }
private void ArrivedAtDest(Load load) { if (CurrentTask == null) { Log.Write(string.Format("ERROR {0}: Experior.Catalog.Dematic.Storage.MultiShuttle.Assemblies.MSlevel.ArrivedAtDest() Current task is null!", Name), Color.Red); return; } if (CurrentTask.Destination.ConvType() == ConveyorTypes.OutfeedRack) { var dest = ParentMS.ConveyorLocations.Find(x => x.LocName == CurrentTask.Destination); if (dest != null) { if (load != null) { load.Switch(dest, true); } else { Log.Write(string.Format("ERROR {0}: Experior.Catalog.Dematic.Storage.MultiShuttle.Assemblies.MSlevel.ArrivedAtDest() load is null!", Name, CurrentTask.Destination), Color.Red); Core.Environment.Scene.Pause(); } } else { Log.Write(string.Format("ERROR {0}: could not find destination {1} in Experior.Catalog.Dematic.Storage.MultiShuttle.Assemblies.MSlevel.ArrivedAtDest()", Name, CurrentTask.Destination), Color.Red); } } else { ParentMS.ArrivedAtRackLocation(new TaskEventArgs(CurrentTask, load)); if (load.Route != null) { load.Route.Remove(load); } load.Dispose(); CurrentTask = null; } }