2015-07-16 17:44:01 +00:00
|
|
|
function give_initial_stuff(player)
|
|
|
|
if minetest.setting_getbool("give_initial_stuff") then
|
|
|
|
minetest.log("action", "Giving initial stuff to player "..player:get_player_name())
|
2015-11-22 19:21:19 +00:00
|
|
|
local inv = player:get_inventory()
|
|
|
|
inv:set_list("main", {})
|
|
|
|
inv:set_list("craft", {})
|
|
|
|
inv:add_item('main', 'default:pick_wood')
|
|
|
|
inv:add_item('main', 'default:sword_wood')
|
|
|
|
inv:add_item('main', 'default:torch 3')
|
2015-07-16 17:44:01 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2015-12-07 23:00:32 +00:00
|
|
|
minetest.register_on_joinplayer(give_initial_stuff)
|
2015-11-22 19:21:19 +00:00
|
|
|
minetest.register_on_respawnplayer(give_initial_stuff)
|