public void UpdateLastOperatedGrid(IMyCubeGrid LastOperatedGrid) { if (!LastOperatedGrids.Contains(LastOperatedGrid)) { LastOperatedGrids.Add(LastOperatedGrid); } LastOperatedGridLastSet = MyKernel.Session.Clock.Ticker; }
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(); } }