コード例 #1
0
 public void CreateLobby(ServerPrivacy privacy, uint memberLimit)
 {
     this.privacy     = privacy;
     this.memberLimit = memberLimit;
     lobbyOwner       = selfId;
     tryCreateLobby();
 }
コード例 #2
0
 public void setPrivacy(ServerPrivacy privacy)
 {
     foreach (Server server in servers)
     {
         server.setPrivacy(privacy);
     }
 }
コード例 #3
0
        public static void Prefix(ref ServerPrivacy ___privacy, GalaxySocket __instance)
        {
            if (CoopMenuHolder.PublicCheckBox.IsChecked)
            {
                ___privacy = ServerPrivacy.Public;
            }

            Console.WriteLine($"TRY CREATE LOBBY GALAXY, PRIVACY = {___privacy.ToString()}");
        }
コード例 #4
0
 private LobbyType privacyToLobbyType(ServerPrivacy privacy)
 {
     return(privacy switch
     {
         ServerPrivacy.InviteOnly => LobbyType.LOBBY_TYPE_PRIVATE,
         ServerPrivacy.FriendsOnly => LobbyType.LOBBY_TYPE_FRIENDS_ONLY,
         ServerPrivacy.Public => LobbyType.LOBBY_TYPE_PUBLIC,
         _ => throw new ArgumentException(Convert.ToString(privacy)),
     });
コード例 #5
0
 public Server(string name, ServerPrivacy privacyLevel, string description = null)
 {
     Id           = Guid.NewGuid();
     Name         = name;
     Description  = description;
     PrivacyLevel = privacyLevel;
     Members      = new Collection <ApplicationUser>();
     Roles        = new Collection <ServerRole>();
     Categories   = new Collection <Category>();
 }
コード例 #6
0
        private ELobbyType privacyToSteamLobbyType(ServerPrivacy privacy)
        {
            switch (privacy)
            {
            case ServerPrivacy.InviteOnly:
                return(ELobbyType.k_ELobbyTypePrivate);

            case ServerPrivacy.FriendsOnly:
                return(ELobbyType.k_ELobbyTypeFriendsOnly);

            case ServerPrivacy.Public:
                return(ELobbyType.k_ELobbyTypePublic);

            default:
                throw new ArgumentException(Convert.ToString(privacy));
            }
        }
コード例 #7
0
        private LobbyType privacyToLobbyType(ServerPrivacy privacy)
        {
            switch (privacy)
            {
            case ServerPrivacy.InviteOnly:
                return(LobbyType.LOBBY_TYPE_PRIVATE);

            case ServerPrivacy.FriendsOnly:
                return(LobbyType.LOBBY_TYPE_FRIENDS_ONLY);

            case ServerPrivacy.Public:
                return(LobbyType.LOBBY_TYPE_PUBLIC);

            default:
                throw new ArgumentException(Convert.ToString(privacy));
            }
        }
コード例 #8
0
 public void SetPrivacy(ServerPrivacy privacy)
 {
     this.privacy = privacy;
     updateLobbyPrivacy();
 }
コード例 #9
0
 public override void setPrivacy(ServerPrivacy privacy)
 {
     server.SetPrivacy(privacy);
 }
コード例 #10
0
ファイル: Server.cs プロジェクト: s-yi/StardewValley
 public abstract void setPrivacy(ServerPrivacy privacy);
コード例 #11
0
 public override void setPrivacy(ServerPrivacy privacy)
 {
 }