Lompat ke isi

Pengguna:ItsPlantseed/Test

Dari Wikipedia bahasa Indonesia, ensiklopedia bebas

local p = {}

local moduleSprite = Module:Sprite local moduleInvData = 'Module:$1'

local sprite = require( moduleSprite ).sprite local ids = mw.loadData( moduleInvData ).ids

local sheet = moduleInvData:gsub( '%$1', args.sheet ) p.image = function( f ) local args = f if f == mw.getCurrentFrame() then args = f:getParent().args end

local idData = ids[args[1]] local image

if idData then image = sprite{ iddata = idData, data = sheet } end

return image end

function p.animate( f ) local args = f if f == mw.getCurrentFrame() then args = f:getParent().args end

local icons = {} for icon in mw.text.gsplit( args[1], '%s*;%s*' ) do if icon == then table.insert( icons, '
' ) else

table.insert( icons, '' .. icon .. image .. '' ) end end icons[1] = icons[1]:gsub( '^', '' )

return '' .. table.concat( icons ) .. '' end return p