Compare commits

...
This repository has been archived on 2020-05-24. You can view files and clone it, but cannot push or open issues or pull requests.

2 Commits

Author SHA1 Message Date
kamirama b1b868a536 Merge branch 'master' into inventory 2017-12-07 21:51:40 +01:00
kamirama d418e660a7 branched an inventory branch 2017-08-23 18:14:35 +02:00
2 changed files with 35 additions and 0 deletions

19
sparkinv/init.lua Normal file
View File

@ -0,0 +1,19 @@
local NAME = minetest.get_current_modname()
local PATH = minetest.get_modpath(NAME) .."/"
local MODFILES = minetest.get_dir_list(PATH,false)
local tab = ""
for i=1,table.getn(MODFILES),1
do
if (string.find(MODFILES[i],".lua",-4)) then
if (MODFILES[i] ~= "init.lua") then
dofile(PATH .. MODFILES[i])
if (string.len(string.sub(MODFILES[i],1,-5)) < 7)
then
tab = "\t"
end
minetest.debug("| "..NAME .."\tload\t" .. string.sub(MODFILES[i],1,-5)..tab.."\t |")
tab = ""
end
end
end

16
sparkinv/inv.lua Normal file
View File

@ -0,0 +1,16 @@
local formspec =
"size[16,12]"..
"list[current_player;main;0,0;8,1;8]" ..
"list[current_player;main;8,0;8,1;16]" ..
"list[current_player;main;0,1;8,1;24]" ..
"list[current_player;main;8,1;8,1]" ..
"bgcolor[#f464d0FF;true]" ..
--"bgcolor[#FC05E3FF;true]" ..
"listcolors[#fc059dDD;#fc059d00]" --d0
minetest.register_on_joinplayer(function(player)
minetest.after(0.01,function()
player:set_inventory_formspec(formspec)
end)
end)