public void ReleaseSectionStartFixPoint_OnSnapped(FixPoint fixpoint, FixPoint.SnapEventArgs e) { NextConveyor = fixpoint.Parent as IRouteStatus; NextRouteStatus = NextConveyor.GetRouteStatus(fixpoint); NextRouteStatus.OnRouteStatusChanged += NextRouteStatus_OnRouteStatusChanged; releaseSection.Speed = NextConveyor.Speed; }
public override void EndFixPoint_OnSnapped(Core.Parts.FixPoint stranger, Core.Parts.FixPoint.SnapEventArgs e) { if (stranger.Type != FixPoint.Types.End) { //Get the available status of the next conveyor and set as this conveyors available status //This route available status will mirror the route available status of the next conveyor (merge/divert) NextConveyor = stranger.Parent as IRouteStatus; NextRouteStatus = NextConveyor.GetRouteStatus(stranger);// .GetAvailableStatus(stranger); RouteAvailable = NextRouteStatus.Available; //ThisRouteStatus.Available = NextRouteStatus.Available; NextRouteStatus.OnRouteStatusChanged += NextRouteStatus_OnAvailableChanged; } else { Core.Environment.Log.Write("WARNING can't snap an end to and end; turn your conveyor arround", Color.Orange); } }