Модуль:Участник:BabylonAS/Nova

Материал из Minecraft Wiki
Перейти к: навигация, поиск

Это песочница «Нова» участника BabylonAS, используемая для разработки модулей и тестирования возможностей Lua.


Подстраницы пространства модулей участника[править код]

local p = {}

function p.multisprite(f)
    local args = f
    if f == mw.getCurrentFrame() then
        args = require("Модуль:ProcessArgs").merge(true)
    end
    
    local sprite = require("Модуль:Спрайт").sprite
    
    if args["данные"] then
    	return sprite(args)
    end
    
    local sheetsmod = args["список"]
    local sheets = mw.loadData("Модуль:" .. sheetsmod)
    
    for i, modname in ipairs(sheets) do
        args["данные"] = modname
        local out = sprite(args)
        
        --if mw.ustring.match(out, "strong") ~= nil then
            return out
        --end
    end
    
    error("Спрайт не найден")
end

function p.spritetest(f)
	local sprite = require([[Модуль:Спрайт]]).base
	
	sprites = {}
	
	table.insert(sprites, sprite{["изобр"] = "DivineRPGCSS.png", ["масштаб"] = 2, ["поз"] = 177})
	table.insert(sprites, sprite{["изобр"] = "DivineRPGCSS.png", ["масштаб"] = 2, ["поз"] = 178})
	table.insert(sprites, sprite{["изобр"] = "DivineRPGCSS.png", ["масштаб"] = 2, ["поз"] = 179})
	table.insert(sprites, sprite{["изобр"] = "DivineRPGCSS.png", ["масштаб"] = 2, ["поз"] = 180})
	table.insert(sprites, sprite{["изобр"] = "DivineRPGCSS.png", ["масштаб"] = 2, ["поз"] = 181})
	table.insert(sprites, sprite{["изобр"] = "DivineRPGCSS.png", ["масштаб"] = 2, ["поз"] = 182})
	table.insert(sprites, sprite{["изобр"] = "DivineRPGCSS.png", ["масштаб"] = 2, ["поз"] = 183})
	table.insert(sprites, sprite{["изобр"] = "DivineRPGCSS.png", ["масштаб"] = 2, ["поз"] = 184})
	table.insert(sprites, sprite{["изобр"] = "DivineRPGCSS.png", ["масштаб"] = 2, ["поз"] = 185})
	table.insert(sprites, sprite{["изобр"] = "DivineRPGCSS.png", ["масштаб"] = 2, ["поз"] = 186})
	table.insert(sprites, sprite{["изобр"] = "DivineRPGCSS.png", ["масштаб"] = 2, ["поз"] = 187})
	table.insert(sprites, sprite{["изобр"] = "DivineRPGCSS.png", ["масштаб"] = 2, ["поз"] = 209})
	table.insert(sprites, sprite{["изобр"] = "DivineRPGCSS.png", ["масштаб"] = 2, ["поз"] = 210})
	table.insert(sprites, sprite{["изобр"] = "DivineRPGCSS.png", ["масштаб"] = 2, ["поз"] = 211})
	table.insert(sprites, sprite{["изобр"] = "DivineRPGCSS.png", ["масштаб"] = 2, ["поз"] = 212})
	table.insert(sprites, sprite{["изобр"] = "DivineRPGCSS.png", ["масштаб"] = 2, ["поз"] = 213})
	table.insert(sprites, sprite{["изобр"] = "DivineRPGCSS.png", ["масштаб"] = 2, ["поз"] = 257})
	table.insert(sprites, sprite{["изобр"] = "DivineRPGCSS.png", ["масштаб"] = 2, ["поз"] = 258})
	table.insert(sprites, sprite{["изобр"] = "DivineRPGCSS.png", ["масштаб"] = 2, ["поз"] = 259})
	table.insert(sprites, sprite{["изобр"] = "DivineRPGCSS.png", ["масштаб"] = 2, ["поз"] = 260})
	table.insert(sprites, sprite{["изобр"] = "DivineRPGCSS.png", ["масштаб"] = 2, ["поз"] = 261})
	table.insert(sprites, sprite{["изобр"] = "DivineRPGCSS.png", ["масштаб"] = 2, ["поз"] = 262})
	table.insert(sprites, sprite{["изобр"] = "DivineRPGCSS.png", ["масштаб"] = 2, ["поз"] = 263})
	table.insert(sprites, sprite{["изобр"] = "DivineRPGCSS.png", ["масштаб"] = 2, ["поз"] = 290})
	table.insert(sprites, sprite{["изобр"] = "DivineRPGCSS.png", ["масштаб"] = 2, ["поз"] = 291})
	
	return table.concat(sprites, "\n")
end

function p.gridtest(f)
	local grids = {}
	
	table.insert(grids, "[[Файл:Grid Божественный камень (Divine RPG).png|link=]]")
	table.insert(grids, "[[Файл:Grid Ледяной камень (Divine RPG).png|link=]]")
	table.insert(grids, "[[Файл:Grid Камень джунглей (Divine RPG).png|link=]]")
	table.insert(grids, "[[Файл:Grid Расплавленный камень (Divine RPG).png|link=]]")
	table.insert(grids, "[[Файл:Grid Камень Края (Divine RPG).png|link=]]")
	table.insert(grids, "[[Файл:Grid Камень синего огня (Divine RPG).png|link=]]")
	table.insert(grids, "[[Файл:Grid Повреждённый камень (Divine RPG).png|link=]]")
	table.insert(grids, "[[Файл:Grid Камень тени (Divine RPG).png|link=]]")
	table.insert(grids, "[[Файл:Grid Камень лечения (Divine RPG).png|link=]]")
	table.insert(grids, "[[Файл:Grid Камень Крови (Divine RPG).png|link=]]")
	table.insert(grids, '<span class="pixel-image">[[Файл:Grid Земляной камень (Divine RPG).png|32x32px|link=]]</span>')
	table.insert(grids, "[[Файл:Grid Рупиевая кирка (Divine RPG).png|link=]]")
	table.insert(grids, "[[Файл:Grid Рупиевый топор (Divine RPG).png|link=]]")
	table.insert(grids, "[[Файл:Grid Рупиевая лопата (Divine RPG).png|link=]]")
	table.insert(grids, "[[Файл:Grid Рупиевая мотыга (Divine RPG).png|link=]]")
	table.insert(grids, "[[Файл:Grid Рупиевый мультиинструмент (Divine RPG).png|link=]]")
	table.insert(grids, "[[Файл:Grid Арлемитовый слиток (Divine RPG).png|link=]]")
	table.insert(grids, "[[Файл:Grid Реалмитовый слиток (Divine RPG).png|link=]]")
	table.insert(grids, "[[Файл:Grid Рупиевый слиток (Divine RPG).png|link=]]")
	table.insert(grids, "[[Файл:Grid Незеритовый слиток (Divine RPG).png|link=]]")
	table.insert(grids, "[[Файл:Grid Слиток тени (Divine RPG).png|link=]]")
	table.insert(grids, "[[Файл:Grid Слиток адского камня (Divine RPG).png|link=]]")
	table.insert(grids, "[[Файл:Grid Водный слиток (Divine RPG).png|link=]]")
	table.insert(grids, "[[Файл:Grid Камень Дикого леса (Divine RPG).png|link=]]")
	table.insert(grids, "[[Файл:Grid Кусок Дикого леса (Divine RPG).png|link=]]")
	
	return table.concat(grids, "\n")
end

function p.spantest(f)
	local spans = {}
	
	table.insert(spans, '<span class="sprite" style="background-image: url(/media/0/0d/Grid_%D0%91%D0%BE%D0%B6%D0%B5%D1%81%D1%82%D0%B2%D0%B5%D0%BD%D0%BD%D1%8B%D0%B9_%D0%BA%D0%B0%D0%BC%D0%B5%D0%BD%D1%8C_%28Divine_RPG%29.png?cb=20130228050044); width: 32px; height: 32px"></span>')
	table.insert(spans, '<span class="sprite" style="background-image: url(/media/6/6a/Grid_%D0%9B%D0%B5%D0%B4%D1%8F%D0%BD%D0%BE%D0%B9_%D0%BA%D0%B0%D0%BC%D0%B5%D0%BD%D1%8C_%28Divine_RPG%29.png?cb=20130209055759); width: 32px; height: 32px"></span>')
	table.insert(spans, '<span class="sprite" style="background-image: url(/media/1/1f/Grid_%D0%9A%D0%B0%D0%BC%D0%B5%D0%BD%D1%8C_%D0%B4%D0%B6%D1%83%D0%BD%D0%B3%D0%BB%D0%B5%D0%B9_%28Divine_RPG%29.png?cb=20130227130130); width: 32px; height: 32px"></span>')
	table.insert(spans, '<span class="sprite" style="background-image: url(/media/9/9a/Grid_%D0%A0%D0%B0%D1%81%D0%BF%D0%BB%D0%B0%D0%B2%D0%BB%D0%B5%D0%BD%D0%BD%D1%8B%D0%B9_%D0%BA%D0%B0%D0%BC%D0%B5%D0%BD%D1%8C_%28Divine_RPG%29.png?cb=20130328160548); width: 32px; height: 32px"></span>')
	table.insert(spans, '<span class="sprite" style="background-image: url(/media/8/89/Grid_%D0%9A%D0%B0%D0%BC%D0%B5%D0%BD%D1%8C_%D0%9A%D1%80%D0%B0%D1%8F_%28Divine_RPG%29.png?cb=20130506045107); width: 32px; height: 32px"></span>')
	table.insert(spans, '<span class="sprite" style="background-image: url(/media/6/64/Grid_%D0%9A%D0%B0%D0%BC%D0%B5%D0%BD%D1%8C_%D1%81%D0%B8%D0%BD%D0%B5%D0%B3%D0%BE_%D0%BE%D0%B3%D0%BD%D1%8F_%28Divine_RPG%29.png?cb=20130227095031); width: 32px; height: 32px"></span>')
	table.insert(spans, '<span class="sprite" style="background-image: url(/media/c/ca/Grid_%D0%9F%D0%BE%D0%B2%D1%80%D0%B5%D0%B6%D0%B4%D1%91%D0%BD%D0%BD%D1%8B%D0%B9_%D0%BA%D0%B0%D0%BC%D0%B5%D0%BD%D1%8C_%28Divine_RPG%29.png?cb=20130226104847); width: 32px; height: 32px"></span>')
	table.insert(spans, '<span class="sprite" style="background-image: url(/media/c/c3/Grid_%D0%9A%D0%B0%D0%BC%D0%B5%D0%BD%D1%8C_%D1%82%D0%B5%D0%BD%D0%B8_%28Divine_RPG%29.png?cb=20130526084107); width: 32px; height: 32px"></span>')
	table.insert(spans, '<span class="sprite" style="background-image: url(/media/c/cb/Grid_%D0%9A%D0%B0%D0%BC%D0%B5%D0%BD%D1%8C_%D0%BB%D0%B5%D1%87%D0%B5%D0%BD%D0%B8%D1%8F_%28Divine_RPG%29.png?cb=20130425154342); width: 32px; height: 32px"></span>')
	table.insert(spans, '<span class="sprite" style="background-image: url(/media/6/6a/Grid_%D0%9A%D0%B0%D0%BC%D0%B5%D0%BD%D1%8C_%D0%9A%D1%80%D0%BE%D0%B2%D0%B8_%28Divine_RPG%29.png?cb=20130228044531); width: 32px; height: 32px"></span>')
	table.insert(spans, '<span class="sprite" style="background-image: url(/media/b/b8/Grid_%D0%97%D0%B5%D0%BC%D0%BB%D1%8F%D0%BD%D0%BE%D0%B9_%D0%BA%D0%B0%D0%BC%D0%B5%D0%BD%D1%8C_%28Divine_RPG%29.png?cb=20200627194939); background-size: 32px auto; width: 32px; height: 32px"></span>')
	table.insert(spans, '<span class="sprite" style="background-image: url(/media/1/16/Grid_%D0%A0%D1%83%D0%BF%D0%B8%D0%B5%D0%B2%D0%B0%D1%8F_%D0%BA%D0%B8%D1%80%D0%BA%D0%B0_%28Divine_RPG%29.png?cb=20130327051024); width: 32px; height: 32px"></span>')
	table.insert(spans, '<span class="sprite" style="background-image: url(/media/3/32/Grid_%D0%A0%D1%83%D0%BF%D0%B8%D0%B5%D0%B2%D1%8B%D0%B9_%D1%82%D0%BE%D0%BF%D0%BE%D1%80_%28Divine_RPG%29.png?cb=20130327043952); width: 32px; height: 32px"></span>')
	table.insert(spans, '<span class="sprite" style="background-image: url(/media/e/e3/Grid_%D0%A0%D1%83%D0%BF%D0%B8%D0%B5%D0%B2%D0%B0%D1%8F_%D0%BB%D0%BE%D0%BF%D0%B0%D1%82%D0%B0_%28Divine_RPG%29.png?cb=20130327050244); width: 32px; height: 32px"></span>')
	table.insert(spans, '<span class="sprite" style="background-image: url(/media/7/71/Grid_%D0%A0%D1%83%D0%BF%D0%B8%D0%B5%D0%B2%D0%B0%D1%8F_%D0%BC%D0%BE%D1%82%D1%8B%D0%B3%D0%B0_%28Divine_RPG%29.png?cb=20130325100534); width: 32px; height: 32px"></span>')
	table.insert(spans, '<span class="sprite" style="background-image: url(/media/4/43/Grid_%D0%A0%D1%83%D0%BF%D0%B8%D0%B5%D0%B2%D1%8B%D0%B9_%D0%BC%D1%83%D0%BB%D1%8C%D1%82%D0%B8%D0%B8%D0%BD%D1%81%D1%82%D1%80%D1%83%D0%BC%D0%B5%D0%BD%D1%82_%28Divine_RPG%29.png?cb=20130608215503); width: 32px; height: 32px"></span>')
	table.insert(spans, '<span class="sprite" style="background-image: url(/media/d/df/Grid_%D0%90%D1%80%D0%BB%D0%B5%D0%BC%D0%B8%D1%82%D0%BE%D0%B2%D1%8B%D0%B9_%D1%81%D0%BB%D0%B8%D1%82%D0%BE%D0%BA_%28Divine_RPG%29.png?cb=20130206143158); width: 32px; height: 32px"></span>')
	table.insert(spans, '<span class="sprite" style="background-image: url(/media/9/95/Grid_%D0%A0%D0%B5%D0%B0%D0%BB%D0%BC%D0%B8%D1%82%D0%BE%D0%B2%D1%8B%D0%B9_%D1%81%D0%BB%D0%B8%D1%82%D0%BE%D0%BA_%28Divine_RPG%29.png?cb=20130206143149); width: 32px; height: 32px"></span>')
	table.insert(spans, '<span class="sprite" style="background-image: url(/media/8/86/Grid_%D0%A0%D1%83%D0%BF%D0%B8%D0%B5%D0%B2%D1%8B%D0%B9_%D1%81%D0%BB%D0%B8%D1%82%D0%BE%D0%BA_%28Divine_RPG%29.png?cb=20130206164738); width: 32px; height: 32px"></span>')
	table.insert(spans, '<span class="sprite" style="background-image: url(/media/0/01/Grid_%D0%9D%D0%B5%D0%B7%D0%B5%D1%80%D0%B8%D1%82%D0%BE%D0%B2%D1%8B%D0%B9_%D1%81%D0%BB%D0%B8%D1%82%D0%BE%D0%BA_%28Divine_RPG%29.png?cb=20130228044714); width: 32px; height: 32px"></span>')
	table.insert(spans, '<span class="sprite" style="background-image: url(/media/c/ce/Grid_%D0%A1%D0%BB%D0%B8%D1%82%D0%BE%D0%BA_%D1%82%D0%B5%D0%BD%D0%B8_%28Divine_RPG%29.png?cb=20130223152951); width: 32px; height: 32px"></span>')
	table.insert(spans, '<span class="sprite" style="background-image: url(/media/9/9a/Grid_%D0%A1%D0%BB%D0%B8%D1%82%D0%BE%D0%BA_%D0%B0%D0%B4%D1%81%D0%BA%D0%BE%D0%B3%D0%BE_%D0%BA%D0%B0%D0%BC%D0%BD%D1%8F_%28Divine_RPG%29.png?cb=20130328062243); width: 32px; height: 32px"></span>')
	table.insert(spans, '<span class="sprite" style="background-image: url(/media/d/d0/Grid_%D0%92%D0%BE%D0%B4%D0%BD%D1%8B%D0%B9_%D1%81%D0%BB%D0%B8%D1%82%D0%BE%D0%BA_%28Divine_RPG%29.png?cb=20130227131901); width: 32px; height: 32px"></span>')
	table.insert(spans, '<span class="sprite" style="background-image: url(/media/0/0f/Grid_%D0%9A%D0%B0%D0%BC%D0%B5%D0%BD%D1%8C_%D0%94%D0%B8%D0%BA%D0%BE%D0%B3%D0%BE_%D0%BB%D0%B5%D1%81%D0%B0_%28Divine_RPG%29.png?cb=20130425102229); width: 32px; height: 32px"></span>')
	table.insert(spans, '<span class="sprite" style="background-image: url(/media/f/f1/Grid_%D0%9A%D1%83%D1%81%D0%BE%D0%BA_%D0%94%D0%B8%D0%BA%D0%BE%D0%B3%D0%BE_%D0%BB%D0%B5%D1%81%D0%B0_%28Divine_RPG%29.png?cb=20130328043537); width: 32px; height: 32px"></span>')
	
	return table.concat(spans, "\n")
end

return p