~fgaz/minetest-falling_nodes

45239a0b711f115b01b920225777d228d819d7b2 — Francesco Gazzetta 2 months ago 51a13e6
Give players an ititial set of items
1 files changed, 9 insertions(+), 0 deletions(-)

M mods/falling_nodes_game/init.lua
M mods/falling_nodes_game/init.lua => mods/falling_nodes_game/init.lua +9 -0
@@ 1,11 1,20 @@
falling_nodes_game = {}

local INITIAL_ITEMS = {
  "falling_nodes:dust",
  "falling_nodes:fire",
  "falling_nodes:indestructible_wall",
}

minetest.register_on_newplayer(function(player)
  minetest.set_player_privs(player:get_player_name(), {
    fast = true,
    fly = true,
    noclip = true,
  })
  for _,item in ipairs(INITIAL_ITEMS) do
    player:get_inventory():add_item("main", item .. " 99")
  end
end)
minetest.register_on_joinplayer(function(player)
  player:override_day_night_ratio(1)