Add option to disable bones
- Players keep inventory on death if disabled
This commit is contained in:
parent
5c59fb1091
commit
1c2489e308
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user