Example #1
0
 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);
 }
Example #2
0
 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();
     }
 }