public override bool IsSerialized() { if (MyAPIGateway.Multiplayer.IsServer) { if (Enhancer.Storage != null) { EnhState.SaveState(); } } return(false); }
private void SaveAndSendAll() { _firstSync = true; if (!_isServer) { return; } EnhState.SaveState(); EnhState.NetworkUpdate(); if (Session.Enforced.Debug >= 3) { Log.Line($"SaveAndSendAll: EnhancerId [{Enhancer.EntityId}]"); } }
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(); } } }