init.lua 1.6 KB

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