Compare commits
3 Commits
e42bc90b47
...
18e935ac4e
Author | SHA1 | Date |
---|---|---|
Pascal Abresch | 18e935ac4e | |
Pascal Abresch | 3659a09133 | |
Pascal Abresch | 27f1942e3d |
2
init.lua
2
init.lua
|
@ -5,7 +5,7 @@ local MODFILES = minetest.get_dir_list(PATH, false)
|
|||
spacenum = 20 - string.len(NAME)
|
||||
minetest.debug("│ " .. NAME .. string.rep(" ",spacenum) .. "init")
|
||||
|
||||
-- This assumes that the lua/ subdir contain lua code only.
|
||||
-- This assumes that the lua/ subdir contains lua code only.
|
||||
|
||||
for i=1,table.getn(MODFILES),1
|
||||
do
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
sparktech = {}
|
||||
-- api starts with an a, should load first, if you split out any of the files in this dir into other stuff remember to declare this
|
|
@ -1,7 +1,7 @@
|
|||
local DEFAULT_BG_COLOR = "fc05e344"
|
||||
local DEFAULT_FG_COLOR = "fc059dd0"
|
||||
local DEFAULT_HL_COLOR = "fc059db0"
|
||||
|
||||
if not sparktech then sparktech = {} end
|
||||
function sparktech.makebar(texture, posx, posy, sizex, sizey, value, maxvalue, direction)
|
||||
-- direction = where to cut the texture either from thr right(0), below(1) left(2) or above (3)
|
||||
-- default is right(0)
|
||||
|
@ -38,7 +38,12 @@ function sparktech.add_inventory(size_x, size_y, formspec) -- pass an unfinished
|
|||
local bg_color = verify_hexcolor_or_nil(minetest.settings:get("spark_gui_background")) or DEFAULT_BG_COLOR
|
||||
local fg_color = verify_hexcolor_or_nil(minetest.settings:get("spark_gui_foreground")) or DEFAULT_FG_COLOR
|
||||
local fg_highlight = verify_hexcolor_or_nil(minetest.settings:get("spark_gui_highlight")) or DEFAULT_HL_COLOR
|
||||
|
||||
local gui_immersive
|
||||
if minetest.settings:get("spark_gui_full") then
|
||||
gui_immersive = "true"
|
||||
else
|
||||
gui_immersive = "false"
|
||||
end
|
||||
if not size_x or size_x < 13.9 then size_x = 13.9 end
|
||||
if not size_y or size_y < 0 then size_y = 0 end
|
||||
local l_formspec = "size[" .. tostring(size_x) .. "," .. (size_y + 4.8) .. "]" ..
|
||||
|
@ -48,7 +53,7 @@ function sparktech.add_inventory(size_x, size_y, formspec) -- pass an unfinished
|
|||
"list[current_player;craft;10.4," .. size_y .. ";3,3]" ..
|
||||
"list[current_player;craftpreview;10.4," .. (size_y + 3.8) .. ";1,1]" ..
|
||||
"listcolors[#" .. fg_color .. ";#" .. fg_highlight .. "]" ..
|
||||
"bgcolor[#" .. bg_color .. ";false]"
|
||||
"bgcolor[#" .. bg_color .. ";" .. gui_immersive .. "]"
|
||||
if not formspec then formspec = "" end
|
||||
l_formspec = l_formspec .. formspec
|
||||
return l_formspec
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
if not sparktech then sparktech = {} end
|
||||
function sparktech.register_wrench(name, dictionary)
|
||||
local dig_stlye_alt = minetest.settings:get_bool("spark_dig_stlye_alt")
|
||||
local on_use = nil
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
spark_gui_background (GUI background color <RGBA>) string fc05e344
|
||||
spark_gui_foreground (GUI foreground color <RGBA>) string fc059dd0
|
||||
spark_gui_highlight (GUI highlight color <RGBA>) string fc059db0
|
||||
spark_gui_full (GUI Full background <BOOL>) bool false
|
||||
|
|
Reference in New Issue