init.lua 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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.."/tools.lua")
  37. dofile(default_path.."/item_entity.lua")
  38. dofile(default_path.."/craftitems.lua")
  39. dofile(default_path.."/crafting.lua")
  40. dofile(default_path.."/mapgen.lua")
  41. dofile(default_path.."/aliases.lua")
  42. dofile(default_path.."/legacy.lua")