Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(infobox): return false instead of nil for custom Publisherpremier #4911

Closed
wants to merge 19 commits into from
Closed
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ end

---@param args table
function CustomLeague:customParseArguments(args)
self.data.publishertier = args['supercell-sponsored']
self.data.publishertier = Logic.readBool(args['supercell-sponsored'])
end

---@param args table
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ end

---@param args table
function CustomLeague:customParseArguments(args)
self.data.publishertier = args['atvi-sponsored']
self.data.publishertier = Logic.readBool(args['atvi-sponsored'])
self.data.mode = args.player_number and 'solo' or self.data.mode
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ end

---@param args table
function CustomLeague:customParseArguments(args)
self.data.publishertier = Logic.readBool(args['supercell-sponsored']) and 'true' or nil
self.data.publishertier = Logic.readBool(args['supercell-sponsored'])
end

return CustomLeague
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ end

---@param args table
function CustomLeague:customParseArguments(args)
self.data.publishertier = args.cfpremier
self.data.publishertier = Logic.readBool(args.cfpremier)
end

---@param args table
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ end

---@param args table
function CustomLeague:customParseArguments(args)
self.data.publishertier = args.epicpremier
self.data.publishertier = Logic.readBool(args.epicpremier)
end

---@param args table
Expand Down
2 changes: 1 addition & 1 deletion components/infobox/wikis/halo/infobox_league_custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ end
---@param args table
function CustomLeague:customParseArguments(args)
self.data.mode = args.player_number and 'solo' or self.data.mode
self.data.publishertier = args['hcs-sponsored']
self.data.publishertier = Logic.readBool(args['hcs-sponsored'])
end

---@param args table
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ end

---@param args table
function CustomLeague:customParseArguments(args)
self.data.publishertier = Logic.readBool(args['moonton-sponsored']) and 'true' or nil
self.data.publishertier = Logic.readBool(args['moonton-sponsored'])
end

---@param args table
Expand Down
3 changes: 2 additions & 1 deletion components/infobox/wikis/naraka/infobox_league_custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

local Class = require('Module:Class')
local Lua = require('Module:Lua')
local Logic = require('Module:Logic')
local String = require('Module:StringUtils')

local Injector = Lua.import('Module:Widget/Injector')
Expand Down Expand Up @@ -65,7 +66,7 @@ end

---@param args table
function CustomLeague:customParseArguments(args)
self.data.publishertier = args.narakapremier
self.data.publishertier = Logic.readBool(args.narakapremier)
end

---@param lpdbData table
Expand Down
2 changes: 1 addition & 1 deletion components/infobox/wikis/pokemon/infobox_league_custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ end

---@param args table
function CustomLeague:customParseArguments(args)
self.data.publishertier = args.pokemonpremier
self.data.publishertier = Logic.readBool(args.pokemonpremier)
self.data.mode = self:_getGameMode()
end

Expand Down
2 changes: 1 addition & 1 deletion components/infobox/wikis/pubg/infobox_league_custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ end

---@param args table
function CustomLeague:customParseArguments(args)
self.data.publishertier = args.pubgpremier
self.data.publishertier = Logic.readBool(args.pubgpremier)
end

---@param args table
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ end

---@param args table
function CustomLeague:customParseArguments(args)
self.data.publishertier = args.pubgpremier
self.data.publishertier = Logic.readBool(args.pubgpremier)
end

---@param args table
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ end

---@param args table
function CustomLeague:customParseArguments(args)
self.data.publishertier = Logic.readBool(args.riotpremier) and 'true' or nil
self.data.publishertier = Logic.readBool(args.riotpremier)
end

---@param args table
Expand Down
Loading