Add starting equipment.
This commit is contained in:
parent
52d4311071
commit
5dba3b99ec
3 changed files with 19 additions and 3 deletions
16
init.lua
16
init.lua
|
@ -32,6 +32,11 @@ if fun_caves.use_villages == nil then
|
|||
fun_caves.use_villages = true
|
||||
end
|
||||
|
||||
fun_caves.starting_equipment = minetest.setting_getbool('fun_caves_starting_equipment')
|
||||
if fun_caves.starting_equipment == nil then
|
||||
fun_caves.starting_equipment = false
|
||||
end
|
||||
|
||||
fun_caves.DEBUG = false -- for maintenance only
|
||||
|
||||
|
||||
|
@ -379,6 +384,16 @@ if not armor_mod then
|
|||
end
|
||||
|
||||
|
||||
if fun_caves.starting_equipment then
|
||||
minetest.register_on_newplayer(function(player)
|
||||
local inv = player:get_inventory()
|
||||
inv:add_item("main", 'default:sword_wood')
|
||||
inv:add_item("main", 'default:axe_wood')
|
||||
inv:add_item("main", 'default:pick_wood')
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
if not (player and fun_caves.db.status) then
|
||||
return
|
||||
|
@ -433,4 +448,3 @@ if fun_caves.db.status then
|
|||
end
|
||||
end
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue