diff --git a/src/arkhamdb/DeckInstructionGenerator.ttslua b/src/arkhamdb/DeckInstructionGenerator.ttslua index e8e3db7e..94607d1c 100644 --- a/src/arkhamdb/DeckInstructionGenerator.ttslua +++ b/src/arkhamdb/DeckInstructionGenerator.ttslua @@ -76,7 +76,6 @@ function generate(_, playerColor) -- create the main part of the instructions local createGallery = false for _, entry in ipairs(idList) do - -- start a new line and add first part of instruction table.insert(descriptionParts, "\n- add: " .. entry.id .. " (") -- maybe add hyperlink to card face @@ -85,7 +84,6 @@ function generate(_, playerColor) table.insert(descriptionParts, '') end - -- name of the card table.insert(descriptionParts, "**" .. entry.name .. "**") -- maybe close hyperlink @@ -93,7 +91,6 @@ function generate(_, playerColor) table.insert(descriptionParts, "") end - -- closing bracket table.insert(descriptionParts, ")") -- maybe add hyperlink for back @@ -145,9 +142,10 @@ function getIdFromData(metadata) end function addGallery(t) + addedImages = {} + table.insert(t, "\n\n" .. galleryTemplateStart .. "\n") - addedImages = {} for _, entry in ipairs(idList) do maybeAddImageToGallery(t, entry) end @@ -208,12 +206,19 @@ function processCard(cardData, playerColor) if id then local cardDetails = { id = id, - name = cardData.Nickname, metadata = md, cardId = math.floor(cardData.CardID % 100), sideways = cardData["SidewaysCard"] } + if cardData.Nickname ~= "" then + cardDetails.name = cardData.Nickname + elseif md.type == "Minicard" then + cardDetails.name = "Minicard" + else + cardDetails.name = "-" + end + -- add images unless minicard if md.type ~= "Minicard" then local _, customDeckData = next(cardData["CustomDeck"])