2019-09-10 19:09:51 +02:00
|
|
|
-- bones/init.lua
|
|
|
|
|
2013-05-18 16:06:57 +02:00
|
|
|
-- Minetest 0.4 mod: bones
|
2016-03-21 22:22:26 +01:00
|
|
|
-- See README.txt for licensing and other information.
|
2014-12-24 20:54:24 +01:00
|
|
|
|
2019-09-10 19:09:51 +02:00
|
|
|
-- Load support for MT game translation.
|
|
|
|
local S = minetest.get_translator("bones")
|
2023-05-05 17:50:43 +02:00
|
|
|
|
2023-05-12 09:37:26 +02:00
|
|
|
local bones_max_slots = minetest.settings:get("bones_max_slots") or 15 * 10
|
2023-05-05 17:50:43 +02:00
|
|
|
local dead_player_callbacks={}
|
2023-05-12 09:37:26 +02:00
|
|
|
-- we're going to display no less than 4*8 slots, we'll also provide at least 4*8 slots in bones
|
|
|
|
local min_inv_size = 4 * 8
|
2023-05-05 17:50:43 +02:00
|
|
|
|
|
|
|
bones = {}
|
2018-02-20 19:15:03 +01:00
|
|
|
|
2013-05-18 16:06:57 +02:00
|
|
|
local function is_owner(pos, name)
|
2013-05-25 00:40:03 +02:00
|
|
|
local owner = minetest.get_meta(pos):get_string("owner")
|
2016-03-16 19:34:07 +01:00
|
|
|
if owner == "" or owner == name or minetest.check_player_privs(name, "protection_bypass") then
|
2013-05-18 16:06:57 +02:00
|
|
|
return true
|
|
|
|
end
|
|
|
|
return false
|
|
|
|
end
|
|
|
|
|
2023-05-05 17:50:43 +02:00
|
|
|
local function get_bones_formspec_wh(cols,rows)
|
|
|
|
return
|
2023-05-06 10:24:22 +02:00
|
|
|
"size[" .. cols .. "," .. (rows + 5) .. "]" ..
|
2023-05-05 17:50:43 +02:00
|
|
|
"list[current_name;main;0,0.3;" .. cols .. "," .. rows .. ";]" ..
|
2023-05-06 10:24:22 +02:00
|
|
|
"list[current_player;main;" .. ((cols - 8) / 2) .. "," .. rows .. ".85;8,1;]" ..
|
|
|
|
"list[current_player;main;".. ((cols - 8) / 2) .. "," .. (rows + 2) .. ".08;8,3;8]" ..
|
2023-05-05 17:50:43 +02:00
|
|
|
"listring[current_name;main]" ..
|
|
|
|
"listring[current_player;main]" ..
|
|
|
|
default.get_hotbar_bg(0,4.85)
|
|
|
|
end
|
|
|
|
|
|
|
|
local function get_bones_formspec_for_size(numitems)
|
|
|
|
--the absolute minimum is 4*8
|
2023-05-12 09:37:26 +02:00
|
|
|
if numitems <= min_inv_size then
|
2023-05-05 17:50:43 +02:00
|
|
|
return get_bones_formspec_wh(8, 4)
|
|
|
|
end
|
|
|
|
--if we're over 4*8, but below 4*15 we make it 4 rows and adjust the column count to make everything fit
|
|
|
|
if numitems <= 4 * 15 then
|
2023-05-12 09:37:26 +02:00
|
|
|
return get_bones_formspec_wh(math.ceil(numitems / 4), 4)
|
2023-05-05 17:50:43 +02:00
|
|
|
end
|
|
|
|
--if we're over 4*15 we'll make 15 columns and adjust the row count to make everything fit
|
2023-05-12 09:37:26 +02:00
|
|
|
return get_bones_formspec_wh(15, math.ceil(numitems / 15))
|
2023-05-05 17:50:43 +02:00
|
|
|
end
|
2014-12-24 20:54:24 +01:00
|
|
|
|
2017-05-22 15:41:17 +02:00
|
|
|
local share_bones_time = tonumber(minetest.settings:get("share_bones_time")) or 1200
|
|
|
|
local share_bones_time_early = tonumber(minetest.settings:get("share_bones_time_early")) or share_bones_time / 4
|
2014-12-27 16:46:03 +01:00
|
|
|
|
2023-07-05 23:14:02 +02:00
|
|
|
local bones_def = {
|
2019-09-10 19:09:51 +02:00
|
|
|
description = S("Bones"),
|
2013-05-18 16:06:57 +02:00
|
|
|
tiles = {
|
2016-07-30 02:49:49 +02:00
|
|
|
"bones_top.png^[transform2",
|
2013-05-18 16:06:57 +02:00
|
|
|
"bones_bottom.png",
|
|
|
|
"bones_side.png",
|
|
|
|
"bones_side.png",
|
|
|
|
"bones_rear.png",
|
|
|
|
"bones_front.png"
|
|
|
|
},
|
|
|
|
paramtype2 = "facedir",
|
2016-03-21 22:22:26 +01:00
|
|
|
groups = {dig_immediate = 2},
|
2016-07-30 02:49:49 +02:00
|
|
|
sounds = default.node_sound_gravel_defaults(),
|
2016-03-21 22:22:26 +01:00
|
|
|
|
2013-05-18 16:06:57 +02:00
|
|
|
can_dig = function(pos, player)
|
2013-05-25 00:40:03 +02:00
|
|
|
local inv = minetest.get_meta(pos):get_inventory()
|
2016-02-26 00:05:23 +01:00
|
|
|
local name = ""
|
|
|
|
if player then
|
|
|
|
name = player:get_player_name()
|
|
|
|
end
|
|
|
|
return is_owner(pos, name) and inv:is_empty("main")
|
2013-05-18 16:06:57 +02:00
|
|
|
end,
|
2016-03-21 22:22:26 +01:00
|
|
|
|
2013-05-18 16:06:57 +02:00
|
|
|
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
|
|
|
if is_owner(pos, player:get_player_name()) then
|
|
|
|
return count
|
|
|
|
end
|
|
|
|
return 0
|
|
|
|
end,
|
2016-03-21 22:22:26 +01:00
|
|
|
|
2013-05-18 16:06:57 +02:00
|
|
|
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
|
|
|
return 0
|
|
|
|
end,
|
2016-03-21 22:22:26 +01:00
|
|
|
|
2013-05-18 16:06:57 +02:00
|
|
|
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
|
|
|
|
if is_owner(pos, player:get_player_name()) then
|
|
|
|
return stack:get_count()
|
|
|
|
end
|
|
|
|
return 0
|
|
|
|
end,
|
2016-03-21 22:22:26 +01:00
|
|
|
|
2013-05-18 16:06:57 +02:00
|
|
|
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
2013-05-25 00:40:03 +02:00
|
|
|
local meta = minetest.get_meta(pos)
|
2014-06-14 07:36:54 +02:00
|
|
|
if meta:get_inventory():is_empty("main") then
|
2017-10-02 11:01:01 +02:00
|
|
|
local inv = player:get_inventory()
|
|
|
|
if inv:room_for_item("main", {name = "bones:bones"}) then
|
|
|
|
inv:add_item("main", {name = "bones:bones"})
|
|
|
|
else
|
|
|
|
minetest.add_item(pos, "bones:bones")
|
|
|
|
end
|
2014-06-14 07:36:54 +02:00
|
|
|
minetest.remove_node(pos)
|
2013-05-18 16:06:57 +02:00
|
|
|
end
|
|
|
|
end,
|
2016-03-21 22:22:26 +01:00
|
|
|
|
2014-04-15 17:13:46 +02:00
|
|
|
on_punch = function(pos, node, player)
|
2016-03-21 22:22:26 +01:00
|
|
|
if not is_owner(pos, player:get_player_name()) then
|
2014-04-15 17:13:46 +02:00
|
|
|
return
|
|
|
|
end
|
2016-03-21 22:22:26 +01:00
|
|
|
|
|
|
|
if minetest.get_meta(pos):get_string("infotext") == "" then
|
2015-02-03 20:23:00 +01:00
|
|
|
return
|
|
|
|
end
|
2016-03-21 22:22:26 +01:00
|
|
|
|
2014-04-15 17:13:46 +02:00
|
|
|
local inv = minetest.get_meta(pos):get_inventory()
|
|
|
|
local player_inv = player:get_inventory()
|
|
|
|
local has_space = true
|
2016-03-21 22:22:26 +01:00
|
|
|
|
|
|
|
for i = 1, inv:get_size("main") do
|
2014-04-15 17:13:46 +02:00
|
|
|
local stk = inv:get_stack("main", i)
|
|
|
|
if player_inv:room_for_item("main", stk) then
|
|
|
|
inv:set_stack("main", i, nil)
|
|
|
|
player_inv:add_item("main", stk)
|
|
|
|
else
|
|
|
|
has_space = false
|
|
|
|
break
|
|
|
|
end
|
|
|
|
end
|
2016-03-21 22:22:26 +01:00
|
|
|
|
2014-04-15 17:13:46 +02:00
|
|
|
-- remove bones if player emptied them
|
|
|
|
if has_space then
|
2015-02-03 20:23:00 +01:00
|
|
|
if player_inv:room_for_item("main", {name = "bones:bones"}) then
|
|
|
|
player_inv:add_item("main", {name = "bones:bones"})
|
|
|
|
else
|
|
|
|
minetest.add_item(pos,"bones:bones")
|
|
|
|
end
|
2014-04-15 17:13:46 +02:00
|
|
|
minetest.remove_node(pos)
|
|
|
|
end
|
|
|
|
end,
|
2016-03-21 22:22:26 +01:00
|
|
|
|
2013-05-18 16:06:57 +02:00
|
|
|
on_timer = function(pos, elapsed)
|
2013-05-25 00:40:03 +02:00
|
|
|
local meta = minetest.get_meta(pos)
|
2014-12-27 16:46:03 +01:00
|
|
|
local time = meta:get_int("time") + elapsed
|
|
|
|
if time >= share_bones_time then
|
2019-09-10 19:09:51 +02:00
|
|
|
meta:set_string("infotext", S("@1's old bones", meta:get_string("owner")))
|
2013-05-18 16:06:57 +02:00
|
|
|
meta:set_string("owner", "")
|
|
|
|
else
|
2014-12-27 16:46:03 +01:00
|
|
|
meta:set_int("time", time)
|
2013-05-18 16:06:57 +02:00
|
|
|
return true
|
|
|
|
end
|
|
|
|
end,
|
2016-04-16 04:21:45 +02:00
|
|
|
on_blast = function(pos)
|
|
|
|
end,
|
2023-07-05 23:14:02 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
default.set_inventory_action_loggers(bones_def, "bones")
|
|
|
|
|
|
|
|
minetest.register_node("bones:bones", bones_def)
|
2013-05-18 16:06:57 +02:00
|
|
|
|
2014-12-27 16:46:03 +01:00
|
|
|
local function may_replace(pos, player)
|
|
|
|
local node_name = minetest.get_node(pos).name
|
|
|
|
local node_definition = minetest.registered_nodes[node_name]
|
|
|
|
|
2016-03-21 22:22:26 +01:00
|
|
|
-- if the node is unknown, we return false
|
2014-12-27 16:46:03 +01:00
|
|
|
if not node_definition then
|
2016-03-21 22:22:26 +01:00
|
|
|
return false
|
2014-12-27 16:46:03 +01:00
|
|
|
end
|
|
|
|
|
2020-12-08 22:20:16 +01:00
|
|
|
-- allow replacing air
|
|
|
|
if node_name == "air" then
|
|
|
|
return true
|
|
|
|
end
|
|
|
|
|
|
|
|
-- don't replace nodes inside protections
|
|
|
|
if minetest.is_protected(pos, player:get_player_name()) then
|
|
|
|
return false
|
|
|
|
end
|
|
|
|
|
|
|
|
-- allow replacing liquids
|
|
|
|
if node_definition.liquidtype ~= "none" then
|
2014-12-27 16:46:03 +01:00
|
|
|
return true
|
|
|
|
end
|
|
|
|
|
|
|
|
-- don't replace filled chests and other nodes that don't allow it
|
|
|
|
local can_dig_func = node_definition.can_dig
|
|
|
|
if can_dig_func and not can_dig_func(pos, player) then
|
|
|
|
return false
|
|
|
|
end
|
|
|
|
|
|
|
|
-- default to each nodes buildable_to; if a placed block would replace it, why shouldn't bones?
|
|
|
|
-- flowers being squished by bones are more realistical than a squished stone, too
|
2020-12-08 22:20:16 +01:00
|
|
|
return node_definition.buildable_to
|
2014-12-27 16:46:03 +01:00
|
|
|
end
|
|
|
|
|
2016-03-21 22:22:26 +01:00
|
|
|
local drop = function(pos, itemstack)
|
2016-08-05 14:55:43 +02:00
|
|
|
local obj = minetest.add_item(pos, itemstack:take_item(itemstack:get_count()))
|
2016-03-21 22:22:26 +01:00
|
|
|
if obj then
|
2018-07-01 21:44:03 +02:00
|
|
|
obj:set_velocity({
|
2016-03-21 22:22:26 +01:00
|
|
|
x = math.random(-10, 10) / 9,
|
|
|
|
y = 5,
|
|
|
|
z = math.random(-10, 10) / 9,
|
|
|
|
})
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2018-02-20 19:15:03 +01:00
|
|
|
local player_inventory_lists = { "main", "craft" }
|
|
|
|
bones.player_inventory_lists = player_inventory_lists
|
|
|
|
|
2023-05-06 10:24:22 +02:00
|
|
|
--functions registered this way won't be called if bones_mode is keep
|
2023-05-05 17:50:43 +02:00
|
|
|
function bones.register_dead_player_inv_management(func)
|
|
|
|
table.insert(dead_player_callbacks, func)
|
2023-05-05 07:31:06 +02:00
|
|
|
end
|
|
|
|
|
2023-05-06 10:24:22 +02:00
|
|
|
local function player_dies_transfer_inventory(player)
|
|
|
|
local result = {}
|
2023-05-05 07:31:06 +02:00
|
|
|
local player_inv = player:get_inventory()
|
|
|
|
for _, list_name in ipairs(player_inventory_lists) do
|
|
|
|
for i = 1, player_inv:get_size(list_name) do
|
2023-05-06 10:24:22 +02:00
|
|
|
table.insert(result, player_inv:get_stack(list_name, i))
|
2023-05-05 07:31:06 +02:00
|
|
|
end
|
|
|
|
player_inv:set_list(list_name, {})
|
|
|
|
end
|
2023-05-06 10:24:22 +02:00
|
|
|
return result
|
2023-05-05 07:31:06 +02:00
|
|
|
end
|
|
|
|
|
2023-05-05 17:50:43 +02:00
|
|
|
bones.register_dead_player_inv_management(player_dies_transfer_inventory)
|
2023-05-05 07:31:06 +02:00
|
|
|
|
2023-05-29 19:01:11 +02:00
|
|
|
local function collect_all_items(player)
|
2023-05-29 20:16:01 +02:00
|
|
|
local all_items = {}
|
2023-05-29 19:01:11 +02:00
|
|
|
for _, fun in ipairs(dead_player_callbacks) do
|
|
|
|
local items = fun(player)
|
2023-05-29 20:16:01 +02:00
|
|
|
table.insert_all(all_items, items)
|
2023-05-29 19:01:11 +02:00
|
|
|
end
|
2023-05-29 20:16:01 +02:00
|
|
|
return all_items
|
2023-05-29 19:01:11 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
-- check if it's possible to place bones, if not find space near player
|
|
|
|
local function find_node_for_bones_on_player_death(player, player_pos)
|
|
|
|
local bones_pos = nil
|
|
|
|
local bones_inv = nil
|
|
|
|
local bones_meta = nil
|
|
|
|
local bones_mode = "bones"
|
|
|
|
bones_pos = player_pos
|
|
|
|
local air
|
|
|
|
if may_replace(bones_pos, player) then
|
|
|
|
air = bones_pos
|
|
|
|
else
|
|
|
|
air = minetest.find_node_near(bones_pos, 1, {"air"})
|
|
|
|
end
|
|
|
|
|
|
|
|
if air and not minetest.is_protected(air, player_name) then
|
|
|
|
bones_pos = air
|
|
|
|
local param2 = minetest.dir_to_facedir(player:get_look_dir())
|
|
|
|
minetest.set_node(bones_pos, {name = "bones:bones", param2 = param2})
|
|
|
|
bones_meta = minetest.get_meta(bones_pos)
|
|
|
|
bones_inv = bones_meta:get_inventory()
|
|
|
|
--make it so big that anything reasonable will for sure fit inside
|
|
|
|
bones_inv:set_size("main", bones_max_slots)
|
|
|
|
else
|
|
|
|
bones_mode = "drop"
|
|
|
|
bones_pos = nil
|
|
|
|
end
|
|
|
|
return bones_mode, bones_pos, bones_inv, bones_meta
|
|
|
|
end
|
|
|
|
|
|
|
|
local function dump_into(bones_mode, bones_inv, bones_pos, all_inventory)
|
|
|
|
local dropped = false
|
|
|
|
for _, item in ipairs(all_inventory) do
|
|
|
|
if bones_mode == "bones" and bones_inv:room_for_item("main", item) then
|
|
|
|
bones_inv:add_item("main", item)
|
|
|
|
else
|
|
|
|
drop(player_pos, item)
|
|
|
|
dropped = true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
return dropped
|
|
|
|
end
|
|
|
|
|
2013-05-18 16:06:57 +02:00
|
|
|
minetest.register_on_dieplayer(function(player)
|
2023-05-06 10:24:22 +02:00
|
|
|
local player_pos = vector.round(player:get_pos())
|
2017-05-22 15:41:17 +02:00
|
|
|
local bones_mode = minetest.settings:get("bones_mode") or "bones"
|
2016-03-21 22:22:26 +01:00
|
|
|
if bones_mode ~= "bones" and bones_mode ~= "drop" and bones_mode ~= "keep" then
|
|
|
|
bones_mode = "bones"
|
|
|
|
end
|
2023-05-05 07:31:06 +02:00
|
|
|
local player_name = player:get_player_name()
|
2023-05-06 10:24:22 +02:00
|
|
|
local bones_inv = nil
|
|
|
|
local bones_pos = nil
|
|
|
|
local bones_meta = nil
|
2016-03-21 22:22:26 +01:00
|
|
|
|
2018-06-02 09:54:45 +02:00
|
|
|
local bones_position_message = minetest.settings:get_bool("bones_position_message") == true
|
2023-05-06 10:24:22 +02:00
|
|
|
local pos_string = minetest.pos_to_string(player_pos)
|
2018-06-02 09:54:45 +02:00
|
|
|
|
2016-03-21 22:22:26 +01:00
|
|
|
-- return if keep inventory set or in creative mode
|
2020-12-13 18:59:19 +01:00
|
|
|
if bones_mode == "keep" or minetest.is_creative_enabled(player_name) then
|
2018-06-02 09:54:45 +02:00
|
|
|
minetest.log("action", player_name .. " dies at " .. pos_string ..
|
|
|
|
". No bones placed")
|
|
|
|
if bones_position_message then
|
2019-09-10 19:09:51 +02:00
|
|
|
minetest.chat_send_player(player_name, S("@1 died at @2.", player_name, pos_string))
|
2018-06-02 09:54:45 +02:00
|
|
|
end
|
2013-05-18 16:06:57 +02:00
|
|
|
return
|
|
|
|
end
|
2016-03-21 22:22:26 +01:00
|
|
|
|
2023-05-29 19:01:11 +02:00
|
|
|
local all_inventory = collect_all_items(player)
|
|
|
|
if bones_mode == "bones" and #all_inventory > 0 then
|
|
|
|
bones_mode, bones_pos, bones_inv, bones_meta = find_node_for_bones_on_player_death(player, player_pos)
|
|
|
|
end
|
|
|
|
if bones_mode == "drop" and #all_inventory > 0 then
|
|
|
|
all_inventory.insert(all_inventory,ItemStack("bones:bones"))
|
2023-05-05 17:50:43 +02:00
|
|
|
end
|
2023-05-29 19:01:11 +02:00
|
|
|
local dropped = dump_into(bones_mode, bones_inv, bones_pos, all_inventory)
|
2023-05-05 17:50:43 +02:00
|
|
|
|
2023-05-12 09:37:26 +02:00
|
|
|
local log_message
|
|
|
|
local chat_message
|
2016-03-21 22:22:26 +01:00
|
|
|
|
2023-05-12 09:37:26 +02:00
|
|
|
if bones_pos then
|
|
|
|
if dropped then
|
|
|
|
log_message = "Inventory partially dropped"
|
|
|
|
chat_message = "@1 died at @2, and partially dropped their inventory."
|
2023-05-05 07:31:06 +02:00
|
|
|
else
|
2023-05-12 09:37:26 +02:00
|
|
|
log_message = "Bones placed"
|
|
|
|
chat_message = "@1 died at @2, and bones were placed."
|
2013-05-18 16:06:57 +02:00
|
|
|
end
|
2023-05-05 07:31:06 +02:00
|
|
|
else
|
2023-05-12 09:37:26 +02:00
|
|
|
drop(player_pos, ItemStack("bones:bones"))
|
|
|
|
if dropped then
|
|
|
|
log_message = "Inventory dropped"
|
|
|
|
chat_message = "@1 died at @2, and dropped their inventory."
|
2023-05-05 07:31:06 +02:00
|
|
|
else
|
2023-05-12 09:37:26 +02:00
|
|
|
log_message = "No bones placed"
|
|
|
|
chat_message = "@1 died at @2."
|
2018-06-02 09:54:45 +02:00
|
|
|
end
|
2013-05-18 16:06:57 +02:00
|
|
|
end
|
2016-03-21 22:22:26 +01:00
|
|
|
|
2023-05-06 10:24:22 +02:00
|
|
|
if bones_position_message then
|
2023-05-12 09:37:26 +02:00
|
|
|
chat_message = S(chat_message, player_name, pos_string)
|
|
|
|
minetest.chat_send_player(player_name, chat_message)
|
2023-05-06 10:24:22 +02:00
|
|
|
end
|
|
|
|
|
2023-05-12 09:37:26 +02:00
|
|
|
minetest.log("action", player_name .. " dies at " .. pos_string .. ". " .. log_message)
|
2018-06-02 09:54:45 +02:00
|
|
|
|
2023-05-06 10:24:22 +02:00
|
|
|
if bones_inv then
|
2023-05-12 09:37:26 +02:00
|
|
|
local inv_size = bones_max_slots
|
|
|
|
for i = 1, bones_max_slots do
|
2023-05-06 10:24:22 +02:00
|
|
|
local stack = bones_inv:get_stack("main", i)
|
2023-05-05 17:50:43 +02:00
|
|
|
if stack:get_count() == 0 then
|
|
|
|
inv_size = i - 1
|
|
|
|
break
|
|
|
|
end
|
2014-04-15 17:13:46 +02:00
|
|
|
end
|
2023-05-12 09:37:26 +02:00
|
|
|
if inv_size <= min_inv_size then
|
|
|
|
bones_inv:set_size("main", min_inv_size)
|
2023-05-06 10:24:22 +02:00
|
|
|
else
|
|
|
|
bones_inv:set_size("main", inv_size)
|
|
|
|
end
|
|
|
|
bones_meta:set_string("formspec", get_bones_formspec_for_size(inv_size))
|
|
|
|
bones_meta:set_string("owner", player_name)
|
2016-03-21 22:22:26 +01:00
|
|
|
|
2023-05-05 17:50:43 +02:00
|
|
|
if share_bones_time ~= 0 then
|
2023-05-06 10:24:22 +02:00
|
|
|
bones_meta:set_string("infotext", S("@1's fresh bones", player_name))
|
2016-03-21 22:22:26 +01:00
|
|
|
|
2023-05-06 10:24:22 +02:00
|
|
|
if share_bones_time_early == 0 or not minetest.is_protected(bones_pos, player_name) then
|
|
|
|
bones_meta:set_int("time", 0)
|
2023-05-05 17:50:43 +02:00
|
|
|
else
|
2023-05-06 10:24:22 +02:00
|
|
|
bones_meta:set_int("time", (share_bones_time - share_bones_time_early))
|
2023-05-05 17:50:43 +02:00
|
|
|
end
|
2014-12-27 16:46:03 +01:00
|
|
|
|
2023-05-06 10:24:22 +02:00
|
|
|
minetest.get_node_timer(bones_pos):start(10)
|
2014-12-27 16:46:03 +01:00
|
|
|
else
|
2023-05-06 10:24:22 +02:00
|
|
|
bones_meta:set_string("infotext", S("@1's bones", player_name))
|
2014-12-27 16:46:03 +01:00
|
|
|
end
|
|
|
|
end
|
2013-05-18 16:06:57 +02:00
|
|
|
end)
|