Module:Sprite: Difference between revisions

add "spriteSheet = " support
(Should fix it)
(add "spriteSheet = " support)
Line 31: Line 31:


setmetatable(t, {__index = file})
setmetatable(t, {__index = file})
return t
end
function getSpriteSheet( image )
if not(image) then return nil end
local f = mw.getCurrentFrame()
local t = {
url = f:expandTemplate{
title = 'SpriteSheet',
args = {image}
}
}
if t == "" then return nil end


return t
return t
Line 84: Line 100:
autoScale = settings.autoscale,
autoScale = settings.autoscale,
image = (settings.image and getImage(settings.image))
image = (settings.image and getImage(settings.image))
or settings.spriteSheet
or (settings.spriteSheet and getSpriteSheet(settings.spriteSheet))
}
}


Bureaucrats, emailconfirmed, Interface administrators, staff, Administrators, translation-admin, translator, Widget editors
154

edits