Disable treespawning on mapgen
[minetest_hades.git] / mods / default / init.lua
blob63449be6876fa85b14395a4216a8a6e6a9020c3e
1 -- Minetest 0.4 mod: default
2 -- See README.txt for licensing and other information.
5 -- The API documentation in here was moved into doc/lua_api.txt
8 WATER_ALPHA = 160
9 WATER_VISC = 1
10 LAVA_VISC = 7
11 LIGHT_MAX = 14
14 -- Definitions made by this mod that other mods can use too
15 default = {}
17 -- GUI related stuff
18 default.gui_bg = "bgcolor[#080808BB;false]"
19 default.gui_bg_img = "background[5,5;1,1;inventory.png;true]"
20 default.gui_slots = "listcolors[#000000;#C68D3C;#ffffff;#C68D3C;#000000]" -- 455757--4D6161 [#00000069;#5A5A5A;#141318;#30434C;#FFF]
21 default.chestgui_bg_img = "background[5,5;1,1;chestui.png;true]"
23 function default.get_hotbar_bg(x,y)
24 local out = ""
25 for i=0,7,1 do
26 out = out .."image["..x+i..","..y..";1,1;gui_hb_bg.png]"
27 end
28 return out
29 end
31 default.gui_survival_form = "size[8,8.5]"..
32 default.gui_bg..
33 default.gui_bg_img..
34 default.gui_slots..
35 "list[current_player;main;0,4.25;8,1;]"..
36 "list[current_player;main;0,5.5;8,3;8]"..
37 "list[current_player;craft;3,0.5;3,3;]"..
38 "list[current_player;craftpreview;7,1.5;1,1;]"..
39 "image[6,1.5;1,1;gui_furnace_arrow_bg.png^[transformR270]]"..
40 default.get_hotbar_bg(0,4.25)
42 -- Load files
43 dofile(minetest.get_modpath("default").."/functions.lua")
44 dofile(minetest.get_modpath("default").."/nodes.lua")
45 dofile(minetest.get_modpath("default").."/tools.lua")
46 dofile(minetest.get_modpath("default").."/craftitems.lua")
47 dofile(minetest.get_modpath("default").."/crafting.lua")
48 dofile(minetest.get_modpath("default").."/mapgen.lua")
49 dofile(minetest.get_modpath("default").."/player.lua")
50 dofile(minetest.get_modpath("default").."/trees.lua")
51 dofile(minetest.get_modpath("default").."/furnace.lua")
52 dofile(minetest.get_modpath("default").."/prismafurnance.lua")
54 --infotext
55 minetest.register_on_newplayer(function(player)
56 local cb = function(player)
57 minetest.chat_send_player(player:get_player_name(), "Welcome on planet Hades")
58 minetest.chat_send_player(player:get_player_name(), "Search for some water. Lay down fertile sand next to the water to become dirt. Look at the crafting guide, what you can craft to survive")
59 minetest.chat_send_player(player:get_player_name(), "Good Luck - End of transmission")
60 end
61 minetest.after(2.0, cb, player)
62 end)
64 -- 10 slot hotbar key 1 - 0 (for ppl w/o a mouseweel)
65 hotbar_size = minetest.setting_get("hotbar_size") or 10
67 minetest.register_on_joinplayer(function(player)
68 player:hud_set_hotbar_itemcount(hotbar_size)
69 minetest.after(0.5,function()
70 player:hud_set_hotbar_selected_image("gui_hotbar_selected.png")
71 end)
72 end)