private bool Remove(ServerPlayer player) { if (!Members.Contains(player.Name)) { return(false); } Members.Remove(player.Name); if (Builders.Contains(player.Name)) { Builders.Remove(player.Name); } player.Union = null; SyncToAllMembers(); player.SyncUnionInfo(); return(true); }
public void ToggleBuilder(ServerPlayer player) { lock (this) { if (!Members.Contains(player.Name)) { return; } if (!Builders.Contains(player.Name)) { Builders.Add(player.Name); } else { Builders.Remove(player.Name); } SyncToAllMembers(); player.SyncUnionInfo(); } }