private void NeedUpdate() { ModState.SaveState(); if (Session.Instance.MpActive) { ModState.NetworkUpdate(); } }
public override bool IsSerialized() { if (MyAPIGateway.Multiplayer.IsServer) { if (Modulator.Storage != null) { ModState.SaveState(); ModSet.SaveSettings(); } } return(false); }
private void SaveAndSendAll() { _firstSync = true; if (!_isServer) { return; } ModSet.SaveSettings(); ModState.SaveState(); ModSet.NetworkUpdate(); ModState.NetworkUpdate(); if (Session.Enforced.Debug >= 3) { Log.Line($"SaveAndSendAll: ModualtorId [{Modulator.EntityId}]"); } }
private void Timing() { if (_tock60 && !_isDedicated && MyAPIGateway.Gui.GetCurrentScreen == MyTerminalPageEnum.ControlPanel && Session.Instance.LastTerminalId == Modulator.EntityId) { Modulator.RefreshCustomInfo(); MyCube.UpdateTerminal(); } if (_tock33) { if (SettingsUpdated) { SettingsUpdated = false; ModSet.SaveSettings(); ModState.SaveState(); if (Session.Enforced.Debug == 3) { Log.Line($"SettingsUpdated: server:{_isServer} - ModulatorId [{Modulator.EntityId}]"); } } } else if (_tock34) { if (ClientUiUpdate) { ClientUiUpdate = false; MyCube.UpdateTerminal(); Modulator.RefreshCustomInfo(); if (!_isServer) { ModSet.NetworkUpdate(); } } } if (_isDedicated || (_subDelayed && _tick > _subTick + 9)) { if (Session.Enforced.Debug == 3) { Log.Line($"Delayed tick: {_tick} - hierarchytick: {_subTick}"); } _subDelayed = false; HierarchyChanged(); } }
private void Timing() { if (_tock60 && !_isDedicated) { TerminalRefresh(); } if (_tock33) { if (SettingsUpdated) { SettingsUpdated = false; ModSet.SaveSettings(); ModState.SaveState(); if (Session.Enforced.Debug == 3) { Log.Line($"SettingsUpdated: server:{_isServer} - ModulatorId [{Modulator.EntityId}]"); } } } else if (_tock34) { if (ClientUiUpdate) { ClientUiUpdate = false; MyCube.UpdateTerminal(); Modulator.RefreshCustomInfo(); if (!_isServer) { ModSet.NetworkUpdate(); } } } if (_isDedicated || (_subDelayed && _tick > _subTick + 9)) { if (Session.Enforced.Debug == 3) { Log.Line($"Delayed tick: {_tick} - hierarchytick: {_subTick}"); } _subDelayed = false; HierarchyChanged(); } }