Add option to disable bones

- Players keep inventory on death if disabled
master
BlockMen 2015-10-21 10:37:35 +02:00
parent 5c59fb1091
commit 1c2489e308
2 changed files with 24 additions and 22 deletions

View File

@ -1,10 +1,13 @@
# This file contains settings of Minetest Game that can be changed in minetest.conf
# This file contains settings of Minetest NeXt that can be changed in minetest.conf
# By default, all the settings are commented and not functional.
# Uncomment settings by removing the preceding #.
# Whether creative mode (fast digging of all blocks, unlimited resources) should be enabled
#creative_mode = false
# Whether players inventory is placed into a node on death (bones node)
#enable_bones = true
# The time in seconds after which the bones of a dead player can be looted by everyone
# 0 to disable
#share_bones_time = 1200

View File

@ -1,5 +1,4 @@
-- Minetest 0.4 mod: bones
-- See README.txt for licensing and other information.
local bones_enabled = core.setting_getbool("enable_bones") ~= false
bones = {}
@ -150,7 +149,7 @@ local function may_replace(pos, player)
end
minetest.register_on_dieplayer(function(player)
if minetest.setting_getbool("creative_mode") then
if minetest.setting_getbool("creative_mode") or not bones_enabled then
return
end