Tweak some textures, new chest texture
[oweals/minetest_game.git] / mods / default / init.lua
1 -- Minetest 0.4 mod: default
2 -- See README.txt for licensing and other information.
3
4 -- The API documentation in here was moved into doc/lua_api.txt
5
6 WATER_ALPHA = 160
7 WATER_VISC = 1
8 LAVA_VISC = 7
9 LIGHT_MAX = 14
10
11 -- Definitions made by this mod that other mods can use too
12 default = {}
13
14 -- GUI related stuff
15 default.gui_bg = "bgcolor[#080808BB;true]"
16 default.gui_bg_img = "background[5,5;1,1;gui_formbg.png;true]"
17 default.gui_slots = "listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF]"
18
19 function default.get_hotbar_bg(x,y)
20         local out = ""
21         for i=0,7,1 do
22                 out = out .."image["..x+i..","..y..";1,1;gui_hb_bg.png]"
23         end
24         return out
25 end
26
27 default.gui_suvival_form = "size[8,8.5]"..
28                         default.gui_bg..
29                         default.gui_bg_img..
30                         default.gui_slots..
31                         "list[current_player;main;0,4.25;8,1;]"..
32                         "list[current_player;main;0,5.5;8,3;8]"..
33                         "list[current_player;craft;1.75,0.5;3,3;]"..
34                         "list[current_player;craftpreview;5.75,1.5;1,1;]"..
35                         "image[4.75,1.5;1,1;gui_furnace_arrow_bg.png^[transformR270]"..
36                         default.get_hotbar_bg(0,4.25)
37
38 -- Load files
39 dofile(minetest.get_modpath("default").."/functions.lua")
40 dofile(minetest.get_modpath("default").."/nodes.lua")
41 dofile(minetest.get_modpath("default").."/tools.lua")
42 dofile(minetest.get_modpath("default").."/craftitems.lua")
43 dofile(minetest.get_modpath("default").."/crafting.lua")
44 dofile(minetest.get_modpath("default").."/mapgen.lua")
45 dofile(minetest.get_modpath("default").."/player.lua")
46 dofile(minetest.get_modpath("default").."/trees.lua")
47 dofile(minetest.get_modpath("default").."/aliases.lua")