reformatting
This commit is contained in:
parent
48f2e1bbe9
commit
2a65cf0375
@ -4,7 +4,7 @@ do
|
||||
|
||||
local ArkhamDb = {}
|
||||
local internal = {}
|
||||
|
||||
|
||||
local tabooList = {}
|
||||
local configuration
|
||||
|
||||
@ -71,7 +71,7 @@ do
|
||||
|
||||
-- use secondary api (arkham.build) if deckid is too long
|
||||
if string.len(deckId) > 9 then
|
||||
deckUri = {configuration.api_uri2, deckId }
|
||||
deckUri = { configuration.api_uri2, deckId }
|
||||
end
|
||||
|
||||
local deck = Request.start(deckUri, function(status)
|
||||
@ -99,11 +99,11 @@ do
|
||||
---@param cardId string ArkhamDB ID of the card that could not be found
|
||||
---@param playerColor string Color of the player's deck that had the problem
|
||||
ArkhamDb.logCardNotFound = function(cardId, playerColor)
|
||||
local request = Request.start({
|
||||
configuration.api_uri,
|
||||
configuration.cards,
|
||||
cardId
|
||||
},
|
||||
Request.start({
|
||||
configuration.api_uri,
|
||||
configuration.cards,
|
||||
cardId
|
||||
},
|
||||
function(result)
|
||||
local adbCardInfo = JSON.decode(internal.fixUtf16String(result.text))
|
||||
local cardName = adbCardInfo.real_name
|
||||
@ -365,8 +365,8 @@ do
|
||||
---@param slots table The slot list for cards in this deck. Table key is the cardId, value is the number of those cards which will be spawned
|
||||
internal.extractBondedCards = function(slots)
|
||||
-- Create a list of bonded cards first so we don't modify slots while iterating
|
||||
local bondedCards = { }
|
||||
local bondedList = { }
|
||||
local bondedCards = {}
|
||||
local bondedList = {}
|
||||
for cardId, cardCount in pairs(slots) do
|
||||
local card = allCardsBagApi.getCardById(cardId)
|
||||
if card ~= nil and card.metadata.bonded ~= nil then
|
||||
@ -539,8 +539,7 @@ do
|
||||
if self.is_successful then
|
||||
callback(self.content, table.unpack(arguments))
|
||||
end
|
||||
end, function() return self.is_done
|
||||
end)
|
||||
end, function() return self.is_done end)
|
||||
end
|
||||
|
||||
return ArkhamDb
|
||||
|
Loading…
Reference in New Issue
Block a user