-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(gameTable): deadlock support (#5332)
Move Deadlock's Custom GameTable to GitHub
- Loading branch information
1 parent
690c14a
commit e0b9027
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
components/game_table/deadlock/game_table_character_custom.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
-- @Liquipedia | ||
-- wiki=deadlock | ||
-- page=Module:GameTable/Character/Custom | ||
-- | ||
-- Please see https://github.com/Liquipedia/Lua-Modules to contribute | ||
-- | ||
|
||
local Arguments = require('Module:Arguments') | ||
local Class = require('Module:Class') | ||
local Lua = require('Module:Lua') | ||
|
||
local GameTableCharacter = Lua.import('Module:GameTable/Character') | ||
|
||
local CustomGameTableCharacter = Class.new(GameTableCharacter) | ||
|
||
---@return integer | ||
function CustomGameTableCharacter:getNumberOfBans() | ||
return 1 | ||
end | ||
|
||
---@param opponentIndex number | ||
---@param playerIndex number | ||
---@return string | ||
function CustomGameTableCharacter:getCharacterKey(opponentIndex, playerIndex) | ||
return 'team' .. opponentIndex .. 'hero' .. playerIndex | ||
end | ||
|
||
---@param frame Frame | ||
---@return Html | ||
function CustomGameTableCharacter.results(frame) | ||
local args = Arguments.getArgs(frame) | ||
|
||
return CustomGameTableCharacter(args):readConfig():query():build() | ||
end | ||
|
||
return CustomGameTableCharacter |