private void StorageSetup() { if (EmiState == null) { EmiState = new EmitterState(Emitter); } EmiState.StorageInit(); EmiState.LoadState(); }
private void SaveAndSendAll() { _firstSync = true; EmiState.SaveState(); EmiState.NetworkUpdate(); if (Session.Enforced.Debug >= 3) { Log.Line($"SaveAndSendAll: EmitterId [{Emitter.EntityId}]"); } }
public override bool IsSerialized() { if (MyAPIGateway.Multiplayer.IsServer) { if (Emitter.Storage != null) { EmiState.SaveState(); } } return(false); }
private void NeedUpdate() { EmiState.State.Mode = (int)EmitterMode; EmiState.State.BoundingRange = ShieldComp?.DefenseShields?.BoundingRange ?? 0f; EmiState.State.Compatible = (IsStatic && EmitterMode == EmitterType.Station) || (!IsStatic && EmitterMode != EmitterType.Station); EmiState.SaveState(); if (Session.Instance.MpActive) { EmiState.NetworkUpdate(); } }
private void StorageSetup() { if (EmiState == null) { EmiState = new EmitterState(Emitter); } EmiState.StorageInit(); EmiState.LoadState(); if (MyAPIGateway.Multiplayer.IsServer) { EmiState.State.ActiveEmitterId = 0; EmiState.State.Backup = false; EmiState.State.Los = true; if (EmiState.State.Suspend) { EmiState.State.Suspend = false; EmiState.State.Link = false; EmiState.State.Mode = -1; EmiState.State.BoundingRange = -1; } } }