public GameInfo(int id, string name, IGameList list, string executable) { Id = id; Name = name; GameList = list; Executable = executable; }
private AppLobby(GameApplication application, string lobbyName, AppLobbyType lobbyType, int maxPlayersDefault, TimeSpan joinTimeOut, bool?useLegacyLobbies, int?limitGameList, int?limitGameListUpdate, int?limitSqlFilterResults, string matchmakingStoredProcedure = null) { if (log.IsDebugEnabled) { log.DebugFormat("Creating lobby: name={0}, type={1}", lobbyName, lobbyType); string limitGameListStr = limitGameList != null?limitGameList.ToString() : "null"; string useLegacylobbiesStr = useLegacyLobbies != null?useLegacyLobbies.ToString() : "null"; string limitGameListUpdateStr = limitGameListUpdate != null?limitGameListUpdate.ToString() : "null"; string limitSqlFilterResultsStr = limitSqlFilterResults != null?limitSqlFilterResults.ToString() : "null"; log.DebugFormat("AppLobby - useLegacyLobbies {0}, limitGameList {1}, limitGameListUpdate {2}, limitSqlFilterResults {3}", useLegacylobbiesStr, limitGameListStr, limitGameListUpdateStr, limitSqlFilterResultsStr); log.DebugFormat("MasterServerSettings - useLegacyLobbies {0}, limitGameList {1}, limitGameListUpdate {2}," + " limitSqlFilterResults {3}", MasterServerSettings.Default.UseLegacyLobbies, MasterServerSettings.Default.LimitGameList, MasterServerSettings.Default.LimitGameListUpdate, MasterServerSettings.Default.LimitSqlFilterResults); } this.Application = application; this.LobbyName = lobbyName; this.LobbyType = lobbyType; this.MaxPlayersDefault = maxPlayersDefault; this.JoinTimeOut = joinTimeOut; this.gameListLimit = limitGameList.HasValue ? limitGameList.Value : MasterServerSettings.Default.GameListLimit; application.IncrementLobbiesCount(); if (MasterServerSettings.Default.GameChangesPublishInterval > 0) { this.gameChangesPublishInterval = MasterServerSettings.Default.GameChangesPublishInterval; } switch (lobbyType) { default: this.GameList = new LimitedGameList(this, useLegacyLobbies, limitGameList, limitGameListUpdate); break; case AppLobbyType.ChannelLobby: this.GameList = new GameChannelList(this); break; case AppLobbyType.SqlLobby: this.GameList = new SqlFilterGameList(this, useLegacyLobbies, limitSqlFilterResults, matchmakingStoredProcedure); break; case AppLobbyType.AsyncRandomLobby: this.GameList = new AsyncRandomGameList(this); break; } InitUpdateLobbyLimits(application); InitUpdateMatchmakingStoredProcedure(application); this.ExecutionFiber = new PoolFiber(); this.ExecutionFiber.Start(); }
/// <summary> /// Prepares to categorize games. Prepares a list of genre categories to remove. Does nothing if removeothergenres is /// false. /// </summary> public override void PreProcess(IGameList games) { base.PreProcess(games); gamelist = games; devList = Database.CalculateSortedDevList(OwnedOnly ? gamelist : null, MinCount); pubList = Database.CalculateSortedPubList(OwnedOnly ? gamelist : null, MinCount); }
public AppLobby(GameApplication application, string lobbyName, AppLobbyType lobbyType, int maxPlayersDefault, TimeSpan joinTimeOut) { if (log.IsDebugEnabled) { log.DebugFormat("Creating lobby: name={0}, type={1}", lobbyName, lobbyType); } this.Application = application; this.LobbyName = lobbyName; this.MaxPlayersDefault = maxPlayersDefault; this.JoinTimeOut = joinTimeOut; switch (lobbyType) { default: this.GameList = new GameList(this); break; case AppLobbyType.ChannelLobby: this.GameList = new GameChannelList(this); break; case AppLobbyType.SqlLobby: this.GameList = new SqlGameList(this); break; } this.ExecutionFiber = new PoolFiber(); this.ExecutionFiber.Start(); }
public DBEditDlg(IGameList owned = null) { InitializeComponent(); updateViewStoreButton(); _ownedList = owned; }
public static AutoCatConfigPanel CreatePanel(AutoCat ac, IGameList ownedGames, List <AutoCat> autocats) { AutoCatType t = ac.AutoCatType; switch (t) { case AutoCatType.Genre: return(new AutoCatConfigPanel_Genre()); case AutoCatType.Flags: return(new AutoCatConfigPanel_Flags()); case AutoCatType.Tags: return(new AutoCatConfigPanel_Tags(ownedGames)); case AutoCatType.Year: return(new AutoCatConfigPanel_Year()); case AutoCatType.UserScore: return(new AutoCatConfigPanel_UserScore()); case AutoCatType.Hltb: return(new AutoCatConfigPanel_Hltb()); case AutoCatType.Manual: return(new AutoCatConfigPanel_Manual(ownedGames)); case AutoCatType.DevPub: return(new AutoCatConfigPanel_DevPub(ownedGames)); case AutoCatType.Group: return(new AutoCatConfigPanel_Group(autocats)); case AutoCatType.Name: return(new AutoCatConfigPanel_Name()); case AutoCatType.VrSupport: return(new AutoCatConfigPanel_VrSupport()); case AutoCatType.Language: return(new AutoCatConfigPanel_Language()); case AutoCatType.Curator: return(new AutoCatConfigPanel_Curator()); case AutoCatType.Platform: return(new AutoCatConfigPanel_Platform()); case AutoCatType.HoursPlayed: return(new AutoCatConfigPanel_HoursPlayed()); default: return(null); } }
public AppLobby(LoadBalancer <IncomingGameServerPeer> loadBalancer, IGameList gameList, int maxPlayersDefault, TimeSpan joinTimeOut) { this.MaxPlayersDefault = maxPlayersDefault; this.JoinTimeOut = joinTimeOut; this.ExecutionFiber = new PoolFiber(); this.ExecutionFiber.Start(); this.LoadBalancer = loadBalancer; this.GameList = gameList; }
public CDlgUpdateProfile(IGameList data, long accountId, bool overwrite, SortedSet <int> ignore) : base(GlobalStrings.CDlgUpdateProfile_UpdatingGameList, true) { SteamId = accountId; this.data = data; this.overwrite = overwrite; this.ignore = ignore; SetText(GlobalStrings.CDlgFetch_DownloadingGameList); }
public bool GetOrCreateGame(string gameId, AppLobby lobby, IGameList gameList, byte maxPlayer, IncomingGameServerPeer gameServerPeer, out GameState gameState) { lock (this.gameDict) { if (this.gameDict.TryGetValue(gameId, out gameState)) { return(false); } gameState = new GameState(lobby, gameId, maxPlayer, gameServerPeer); this.gameDict.Add(gameId, gameState); return(true); } }
public bool GetOrCreateGame(string gameId, AppLobby lobby, IGameList gameList, byte maxPlayer, IncomingGameServerPeer gameServerPeer, out GameState gameState) { lock (this.gameDict) { if (this.gameDict.TryGetValue(gameId, out gameState)) { return false; } gameState = new GameState(lobby, gameId, maxPlayer, gameServerPeer); this.gameDict.Add(gameId, gameState); return true; } }
public AutoCatConfigPanel_Tags(IGameList ownedGames) { this.ownedGames = ownedGames; InitializeComponent(); ttHelp.Ext_SetToolTip(helpPrefix, GlobalStrings.DlgAutoCat_Help_Prefix); ttHelp.Ext_SetToolTip(list_helpMinScore, GlobalStrings.DlgAutoCat_Help_ListMinScore); ttHelp.Ext_SetToolTip(list_helpOwnedOnly, GlobalStrings.DlgAutoCat_Help_ListOwnedOnly); ttHelp.Ext_SetToolTip(helpTagsPerGame, GlobalStrings.DlgAutoCat_Help_ListTagsPerGame); ttHelp.Ext_SetToolTip(helpWeightFactor, GlobalStrings.DlgAutoCat_Help_ListWeightFactor); ttHelp.Ext_SetToolTip(helpExcludeGenres, GlobalStrings.DlgAutoCat_Help_ListExcludeGenres); clbTags.DisplayMember = "text"; //Hide count column lstIncluded.Columns[1].Width = 0; }
public void LoadDynamicServices(IServiceProvider services) { var itype = typeof(IGameList); var types = AppDomain.CurrentDomain.GetAssemblies() .SelectMany(assembly => assembly.GetTypes()) .Where(p => itype.IsAssignableFrom(p)); types.ForEach(type => { IGameList gameList = (IGameList)services.GetService(type); //_log.Info($"Registering {type.ToString()} {(gameList?.ToString() ?? "null")}"); if (gameList != null) { _gameLists.Add(gameList); _gameListsKeyed.Add(gameList.Code, gameList); } }); }
public AutoCatConfigPanel_Manual(IGameList gamelist) { InitializeComponent(); ownedGames = gamelist; ttHelp.Ext_SetToolTip(helpPrefix, GlobalStrings.DlgAutoCat_Help_Prefix); FillRemoveList(); FillAddList(); clbRemoveSelected.DisplayMember = "text"; clbAddSelected.DisplayMember = "text"; //Hide count columns lstRemove.Columns[1].Width = 0; lstAdd.Columns[1].Width = 0; }
/// <summary> /// Prepares to categorize games. Prepares a list of genre categories to remove. Does nothing if removeothergenres is /// false. /// </summary> public override void PreProcess(IGameList games) { base.PreProcess(games); if (!RemoveOtherGenres) { return; } genreCategories = new SortedSet <Category>(); foreach (string genre in Database.AllGenres) { if (games.CategoryExists(string.IsNullOrEmpty(Prefix) ? genre : Prefix + genre) && !IgnoredGenres.Contains(genre)) { genreCategories.Add(games.GetCategory(genre)); } } }
public AutoCatConfigPanel_DevPub(IGameList g) { InitializeComponent(); ownedGames = g; ttHelp.Ext_SetToolTip(helpPrefix, GlobalStrings.DlgAutoCat_Help_Prefix); ttHelp.Ext_SetToolTip(list_helpScore, GlobalStrings.DlgAutoCat_Help_MinScore); ttHelp.Ext_SetToolTip(list_helpOwnedOnly, GlobalStrings.DlgAutoCat_Help_ListOwnedOnly); ttHelp.Ext_SetToolTip(btnDevSelected, GlobalStrings.DlgAutoCat_Help_DevSelected); ttHelp.Ext_SetToolTip(btnPubSelected, GlobalStrings.DlgAutoCat_Help_PubSelected); clbDevelopersSelected.DisplayMember = "text"; clbPublishersSelected.DisplayMember = "text"; //Hide count columns lstDevelopers.Columns[1].Width = 0; lstPublishers.Columns[1].Width = 0; }
public DlgAutoCat(List <AutoCat> autoCats, IGameList ownedGames, AutoCat selected, string profile) { InitializeComponent(); AutoCatList = new List <AutoCat>(); profilePath = profile; foreach (AutoCat c in autoCats) { AutoCat clone = c.Clone(); AutoCatList.Add(clone); if (c.Equals(selected)) { initial = clone; } } this.ownedGames = ownedGames; }
public AppLobby(GameApplication application, string lobbyName, AppLobbyType lobbyType, int maxPlayersDefault, TimeSpan joinTimeOut) { if (log.IsDebugEnabled) { log.DebugFormat("Creating lobby: name={0}, type={1}", lobbyName, lobbyType); } this.Application = application; this.LobbyName = lobbyName; this.LobbyType = lobbyType; this.MaxPlayersDefault = maxPlayersDefault; this.JoinTimeOut = joinTimeOut; this.gameListLimit = MasterServerSettings.Default.GameListLimit; if (MasterServerSettings.Default.GameChangesPublishInterval > 0) { this.gameChangesPublishInterval = MasterServerSettings.Default.GameChangesPublishInterval; } switch (lobbyType) { default: this.GameList = new GameList(this); break; case AppLobbyType.ChannelLobby: this.GameList = new GameChannelList(this); break; case AppLobbyType.SqlLobby: this.GameList = new SqlGameList(this); break; case AppLobbyType.AsyncRandomLobby: this.GameList = new AsyncRandomGameList(this); break; } this.ExecutionFiber = new PoolFiber(); this.ExecutionFiber.Start(); }
public bool TryCreateGame(string gameId, AppLobby lobby, IGameList gameList, byte maxPlayer, IncomingGameServerPeer gameServerPeer, out GameState gameState) { bool result = false; lock (this.gameDict) { if (this.gameDict.TryGetValue(gameId, out gameState) == false) { gameState = new GameState(lobby, gameId, maxPlayer, gameServerPeer); this.gameDict.Add(gameId, gameState); result = true; } } if (result) { if (log.IsDebugEnabled) { log.DebugFormat("Created game: gameId={0}, appId={1}", gameId, this.ApplicationId); } } return result; }
public bool TryCreateGame(string gameId, AppLobby lobby, IGameList gameList, byte maxPlayer, IncomingGameServerPeer gameServerPeer, out GameState gameState) { bool result = false; lock (this.gameDict) { if (this.gameDict.TryGetValue(gameId, out gameState) == false) { gameState = new GameState(lobby, gameId, maxPlayer, gameServerPeer); this.gameDict.Add(gameId, gameState); result = true; } } if (result) { if (log.IsDebugEnabled) { log.DebugFormat("Created game: gameId={0}, appId={1}", gameId, this.ApplicationId); } } return(result); }
public DlgGame(IGameList data, GameInfo game = null) : this() { Data = data; Game = game; editMode = Game != null; }
public AppLobby(LoadBalancer <IncomingGameServerPeer> loadBalancer, IGameList gameList) : this(loadBalancer, gameList, 0, TimeSpan.FromSeconds(15)) { }
/// <summary> /// Prepares to categorize games. Prepares a list of genre categories to remove. Does nothing if removeothergenres is /// false. /// </summary> public override void PreProcess(IGameList games) { base.PreProcess(games); gamelist = games; }
public async Task <DataGameList> GetGames(string type) { IGameList gameList = _gameListsKeyed[type.ToLowerInvariant()]; return(await gameList.GetGamesNew()); }
/// <inheritdoc /> public override void DeProcess() { base.DeProcess(); gamelist = null; }
/// <summary> /// Must be called before any categorizations are done. Should be overridden to perform any necessary database analysis /// or other preparation. /// After this is called, no configuration options should be changed before using CategorizeGame. /// </summary> public virtual void PreProcess(IGameList games) { this.games = games; }
public virtual void DeProcess() { games = null; }
public GameInfo(int id, string name, IGameList list) : this(id, name, list, null) { }
/// <inheritdoc /> public override void PreProcess(IGameList games) { this.games = games; GetRecommendations(); }