示例#1
0
 private void TerminalRefresh()
 {
     if (MyAPIGateway.Gui.GetCurrentScreen == MyTerminalPageEnum.ControlPanel && Session.Instance.LastTerminalId == O2Generator.EntityId)
     {
         O2Generator.RefreshCustomInfo();
         MyCube.UpdateTerminal();
     }
 }
示例#2
0
 private void SettingsUpdate()
 {
     if (_count == 3)
     {
         if (SettingsUpdated)
         {
             if (Session.Enforced.Debug == 3)
             {
                 Log.Line($"SettingsUpdated: server:{_isServer} - FixRooms:{O2Set.Settings.FixRoomPressure} - O2GeneratorId [{O2Generator.EntityId}]");
             }
             SettingsUpdated = false;
             O2Set.SaveSettings();
             O2State.SaveState();
             if (!ClientUiUpdate && O2Set.Settings.FixRoomPressure)
             {
                 RestartDoorFix();
             }
         }
     }
     else if (_count == 4 && !SettingsUpdated)
     {
         if (ClientUiUpdate)
         {
             if (Session.Enforced.Debug == 3)
             {
                 Log.Line($"ClientUiUpdate: server:{_isServer} - FixRooms:{O2Set.Settings.FixRoomPressure} - O2GeneratorId [{O2Generator.EntityId}]");
             }
             ClientUiUpdate = false;
             MyCube.UpdateTerminal();
             O2Generator.RefreshCustomInfo();
             if (!_isServer)
             {
                 O2Set.NetworkUpdate();
             }
             if (O2Set.Settings.FixRoomPressure)
             {
                 RestartDoorFix();
             }
         }
     }
 }