public void Ask() { if (NeedsSync && !Networker.IsServer) { Networker.SendToServer(Header, "Get", null, EntityID); } }
public void Set(T New) { if (IsValid(New)) { if (Networker.IsServer) { Underlying = New; Networker.SendToAll(Header, "Set", Serialize(Underlying), EntityID); } else { Networker.SendToServer(Header, "SetRequest", Serialize(New), EntityID); } } }
public void Set(T New) { if (IsValid(New)) { if (Networker.IsServer && !New.Equals(Underlying)) { Underlying = New; if (MyAPIGateway.Multiplayer.MultiplayerActive) { Networker.SendToAll(Header, "Set", Serialize(Underlying), EntityID); } } else { Networker.SendToServer(Header, "SetRequest", Serialize(New), EntityID); } } else { LaserTools.SessionCore.DebugWrite($"AutoSet[{Entity.DisplayName}]", $"Invalid value supplied: {New.ToString()}"); } }
public void Ask() { Networker.SendToServer(Header, "Get", null, EntityID); }