ed53e25e57
CI / changes (pull_request) Successful in 5s
CI / unit (pull_request) Successful in 11s
CI / integration (pull_request) Successful in 20s
CI / ui (pull_request) Has been skipped
CI / conformance (pull_request) Successful in 11s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 2m41s
Cap a player's simultaneous unfinished games per kind (vs_ai, random, friends) with independent guest and durable-account tiers, held in a new single-row backend.config table (-1 = unlimited) behind an in-memory cache and editable live in the admin console (/_gm/limits). Each game is tagged with games.game_kind on creation. This replaces the earlier flat MaxActiveQuickGames=10 combined cap: the per-tier/kind config is the single mechanism, enforced at the same handler gate (ensureUnderGameLimit by kind on lobby/enqueue) plus the durable friends cap in CreateInvitation. game.Service.AtGameLimit only resolves the tier and counts; the limit policy stays at the request edge. Guests are now refused friend requests, friend-code redemption, befriend-in-game and invitation creation outright (403 guest_forbidden) -- previously only the UI hid these. Admin: a kind column in both game lists and the config editor. Defaults: guest 1 vs_ai / 1 random / 0 friends; durable 10 / 10 / 10.
45 lines
1.8 KiB
Go
45 lines
1.8 KiB
Go
//
|
|
// Code generated by go-jet DO NOT EDIT.
|
|
//
|
|
// WARNING: Changes to this file may cause incorrect behavior
|
|
// and will be lost if the code is regenerated
|
|
//
|
|
|
|
package table
|
|
|
|
// UseSchema sets a new schema name for all generated table SQL builder types. It is recommended to invoke
|
|
// this method only once at the beginning of the program.
|
|
func UseSchema(schema string) {
|
|
AccountBestMove = AccountBestMove.FromSchema(schema)
|
|
AccountRoles = AccountRoles.FromSchema(schema)
|
|
AccountStats = AccountStats.FromSchema(schema)
|
|
AccountSuspensions = AccountSuspensions.FromSchema(schema)
|
|
Accounts = Accounts.FromSchema(schema)
|
|
AdCampaigns = AdCampaigns.FromSchema(schema)
|
|
AdMessages = AdMessages.FromSchema(schema)
|
|
AdSettings = AdSettings.FromSchema(schema)
|
|
Blocks = Blocks.FromSchema(schema)
|
|
ChatMessages = ChatMessages.FromSchema(schema)
|
|
Complaints = Complaints.FromSchema(schema)
|
|
Config = Config.FromSchema(schema)
|
|
DictionaryState = DictionaryState.FromSchema(schema)
|
|
EmailConfirmations = EmailConfirmations.FromSchema(schema)
|
|
FeedbackMessages = FeedbackMessages.FromSchema(schema)
|
|
FriendCodes = FriendCodes.FromSchema(schema)
|
|
Friendships = Friendships.FromSchema(schema)
|
|
GameDrafts = GameDrafts.FromSchema(schema)
|
|
GameHidden = GameHidden.FromSchema(schema)
|
|
GameInvitationInvitees = GameInvitationInvitees.FromSchema(schema)
|
|
GameInvitations = GameInvitations.FromSchema(schema)
|
|
GameMoves = GameMoves.FromSchema(schema)
|
|
GamePlayers = GamePlayers.FromSchema(schema)
|
|
GameSetupDraws = GameSetupDraws.FromSchema(schema)
|
|
Games = Games.FromSchema(schema)
|
|
Identities = Identities.FromSchema(schema)
|
|
RetainedIdentities = RetainedIdentities.FromSchema(schema)
|
|
RobotBlocks = RobotBlocks.FromSchema(schema)
|
|
RobotFriendRequests = RobotFriendRequests.FromSchema(schema)
|
|
Sessions = Sessions.FromSchema(schema)
|
|
SuspensionReasons = SuspensionReasons.FromSchema(schema)
|
|
}
|