Browse Source

add no items message to bones patch

master
poikilos 7 years ago
committed by Jacob Gustafson
parent
commit
a66a176d55
  1. 5
      etc/game-install-ENLIVEN
  2. 14
      patches/subgame/mods/bones/init.lua

5
etc/game-install-ENLIVEN

@ -935,13 +935,14 @@ add_git_mod bakedclay bakedclay https://github.com/tenplus1/bakedclay.git
add_git_mod quartz quartz https://github.com/minetest-mods/quartz
add_git_mod magma_conduits magma_conduits https://github.com/FaceDeer/magma_conduits.git
# dynamic_liquid: makes suspended source blocks move down until supported--therefore improves the underground especially when using mods like magma_conduits
add_git_mod dynamic_liquid dynamic_liquid https://github.com/minetest-mods/dynamic_liquid.git
add_git_mod mapfix mapfix https://github.com/minetest-mods/mapfix
remove_mod dynamic_liquid
#add_git_mod dynamic_liquid dynamic_liquid https://github.com/minetest-mods/dynamic_liquid.git
#endregion MOB AND WORLDGEN MODS
#region NON-WORLDGEN NODE/ITEM MODS
#add_git_mod mapfix mapfix https://github.com/minetest-mods/mapfix
add_git_mod boost_cart boost_cart https://github.com/SmallJoker/boost_cart.git
echo "Installing minetest-mods' (NOT MinetestForFun's PvP fork of Echoes91's, NOT Echoes91's Throwing enhanced NOT PilzAdam's NOT Jeija's) Throwing <https://forum.minetest.net/viewtopic.php?f=11&t=11437>"
add_git_mod throwing throwing https://github.com/minetest-mods/throwing.git

14
patches/subgame/mods/bones/init.lua

@ -179,7 +179,6 @@ local function is_all_empty(player_inv)
return true
end
minetest.register_on_dieplayer(function(player)
local bones_mode = minetest.settings:get("bones_mode") or "bones"
@ -189,8 +188,8 @@ minetest.register_on_dieplayer(function(player)
local enable_bones_logging = minetest.settings:get_bool("enable_bones_logging")
local enable_bones_chat_msg = minetest.settings:get_bool("enable_bones_chat_msg")
local pos = vector.round(player:getpos())
-- return if keep inventory set or in creative mode
if bones_mode == "keep" or (creative and creative.is_enabled_for
and creative.is_enabled_for(player:get_player_name())) then
@ -205,6 +204,12 @@ minetest.register_on_dieplayer(function(player)
local player_inv = player:get_inventory()
if is_all_empty(player_inv) then
if enable_bones_logging then
minetest.log("action", "[bones] " .. player:get_player_name() .. "'s bones do not remain since player has no items -- died at " .. minetest.pos_to_string(vector.round(player:getpos())))
end
if enable_bones_chat_msg then
minetest.chat_send_player(player:get_player_name(), player:get_player_name() .. "'s bones do not remain since player has no items -- died at " .. minetest.pos_to_string(pos))
end
return
end
@ -229,24 +234,27 @@ minetest.register_on_dieplayer(function(player)
player_inv:set_list(list_name, {})
end
drop(pos, ItemStack("bones:bones"))
if enable_bones_logging then
minetest.log("action", "[bones] " .. player:get_player_name() .. "'s bones do not remain since cannot place bones here -- died at " .. minetest.pos_to_string(pos))
end
if enable_bones_chat_msg then
minetest.chat_send_player(player:get_player_name(), player:get_player_name() .. "'s do not remain since cannot place bones here -- died at " .. minetest.pos_to_string(pos))
end
return
end
local param2 = minetest.dir_to_facedir(player:get_look_dir())
minetest.set_node(pos, {name = "bones:bones", param2 = param2})
if enable_bones_logging then
minetest.log("action", "[bones] " .. player:get_player_name() .. "'s bones remain where died at " .. minetest.pos_to_string(pos))
end
if enable_bones_chat_msg then
minetest.chat_send_player(player:get_player_name(), player:get_player_name() .. "'s bones remain where died at " .. minetest.pos_to_string(pos))
end
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
inv:set_size("main", 8 * 4)

Loading…
Cancel
Save