Exemplo n.º 1
0
 public void UpdateLastOperatedGrid(IMyCubeGrid LastOperatedGrid)
 {
     if (!LastOperatedGrids.Contains(LastOperatedGrid))
     {
         LastOperatedGrids.Add(LastOperatedGrid);
     }
     LastOperatedGridLastSet = MyKernel.Session.Clock.Ticker;
 }
Exemplo n.º 2
0
        void UpdatableModule.Update()
        {
            UpdateToolStatus();
            if (ToolStatus == LaserToolStatus.Standby || ToolStatus == LaserToolStatus.Damaged)
            {
                LastReportedMissingComponents.Clear();
                ToolStatusReport.Clear();
            }

            const int resetAfter = 3 * 60;

            if (MyKernel.Session.Clock.Ticker >= (LastOperatedGridLastSet + resetAfter))
            {
                LastOperatedGrids.Clear();
            }

            if (MyKernel.Session.Clock.Ticker >= (LastOperatedProjectedGridLastSet + resetAfter))
            {
                LastOperatedProjectedGrids.Clear();
            }
        }