Fix Trainer badge texture reference

This commit is contained in:
AverageConsumer
2026-08-09 20:36:16 +02:00
parent 42dd791832
commit f88802a309
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -1663,7 +1663,7 @@ return function(mod)
G.setColor(tint[1], tint[2], tint[3], owned and 1 or 0.25)
local x = math.floor(5 + (i - 1) * 134
/ math.max(1, #badges - 1))
G.draw(badgeAsset.image, quad, x, 56)
G.draw(badgeAsset.img, quad, x, 56)
else
local x = math.floor(4 + (i - 1) * badgeGap)
local nextX = math.floor(4 + i * badgeGap)
+2 -1
View File
@@ -297,7 +297,7 @@ do
}
TrainerCard.new = function()
badgeLoads = badgeLoads + 1
local badges = { image = T.love.graphics.newImage({}), quads = {} }
local badges = { img = T.love.graphics.newImage({}), quads = {} }
for i = 0, 7 do
badges.quads[i] = T.love.graphics.newQuad(0, i * 32 + 16,
16, 16, 16, 256)
@@ -307,6 +307,7 @@ do
T.love.graphics.draw = function(image, quad, x, y, ...)
if type(quad) == "table" and quad.w == 16 and quad.h == 16
and y == 56 then
assert(image ~= nil, "Trainer badge draw requires Recomp's texture")
local _, _, _, alpha = T.love.graphics.getColor()
badgeAlphas[#badgeAlphas + 1] = alpha
end