Пример #1
0
 public override bool IsSerialized()
 {
     if (MyAPIGateway.Multiplayer.IsServer)
     {
         if (Enhancer.Storage != null)
         {
             EnhState.SaveState();
         }
     }
     return(false);
 }
Пример #2
0
 private void SaveAndSendAll()
 {
     _firstSync = true;
     if (!_isServer)
     {
         return;
     }
     EnhState.SaveState();
     EnhState.NetworkUpdate();
     if (Session.Enforced.Debug >= 3)
     {
         Log.Line($"SaveAndSendAll: EnhancerId [{Enhancer.EntityId}]");
     }
 }
Пример #3
0
 private void NeedUpdate(bool onState, bool turnOn)
 {
     if (!onState && turnOn)
     {
         EnhState.State.Online = true;
         EnhState.SaveState();
         EnhState.NetworkUpdate();
         if (!_isDedicated)
         {
             Enhancer.RefreshCustomInfo();
         }
     }
     else if (onState & !turnOn)
     {
         EnhState.State.Online = false;
         EnhState.SaveState();
         EnhState.NetworkUpdate();
         if (!_isDedicated)
         {
             Enhancer.RefreshCustomInfo();
         }
     }
 }