Skip to content

Commit

Permalink
Fix participanttable objectname (#3470)
Browse files Browse the repository at this point in the history
  • Loading branch information
hjpalpha authored Nov 2, 2023
1 parent f0d22c9 commit af9b9a2
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function ParticipantTable:read()
end

---@class ParticipantTableConfig
---@field lpdbPrefix string
---@field lpdbPrefix string?
---@field noStorage boolean
---@field matchGroupSpec table?
---@field syncPlayers boolean
Expand All @@ -81,7 +81,7 @@ end
function ParticipantTable.readConfig(args, parentConfig)
parentConfig = parentConfig or {}
local config = {
lpdbPrefix = args.lpdbPrefix or parentConfig.lpdbPrefix or Variables.varDefault('lpdbPrefix') or '',
lpdbPrefix = args.lpdbPrefix or parentConfig.lpdbPrefix or Variables.varDefault('lpdbPrefix'),
noStorage = Logic.readBool(args.noStorage or parentConfig.noStorage or
Variables.varDefault('disable_LPDB_storage') or not Namespace.isMain()),
matchGroupSpec = TournamentStructure.readMatchGroupsSpec(args),
Expand Down Expand Up @@ -286,7 +286,8 @@ end
---@param lpdbData table
---@return string
function ParticipantTable:objectName(lpdbData)
return 'ranking_' .. self.config.lpdbPrefix .. '_' .. lpdbData.prizepoolindex .. '_' .. lpdbData.opponentname
local lpdbPrefix = self.config.lpdbPrefix and ('_' .. self.config.lpdbPrefix) or ''
return 'ranking' .. lpdbPrefix .. lpdbData.prizepoolindex .. '_' .. lpdbData.opponentname
end

---@param lpdbData table
Expand Down

0 comments on commit af9b9a2

Please sign in to comment.