Browse Source

change bones basis and target to 0.5

master
poikilos 7 years ago
committed by Jacob Gustafson
parent
commit
c9d28f6d62
  1. 4
      README.md
  2. 1
      etc/game-install-ENLIVEN
  3. 52
      patches/subgame-basis/mods/bones/init-something.lua
  4. 52
      patches/subgame-basis/mods/bones/init.lua
  5. 81
      patches/subgame/mods/bones/init-something.lua
  6. 81
      patches/subgame/mods/bones/init.lua

4
README.md

@ -123,6 +123,10 @@ Otherwise just install everything EXCEPT cme_to_spawners & tsm_pyramids_to_spawn
* The included minetest.conf recommended for your clients includes the line enable_local_map_saving = true, which will cache the world locally on their machines. You can feel free to change that according to your preference. * The included minetest.conf recommended for your clients includes the line enable_local_map_saving = true, which will cache the world locally on their machines. You can feel free to change that according to your preference.
## Changes: ## Changes:
### (2018-03-13)
* added mapfix mod since dynamic_liquid makes one block create a whole pond if set high above ground
* removed mapfix due to [improvements to minetest](https://github.com/minetest/minetest/issues/2767)
* removed dynamic_liquid since it makes oceans deplete as they go into caves (see <https://forum.minetest.net/viewtopic.php?t=16485>)
### (2018-03-08) ### (2018-03-08)
* added technic_armor since is now in separate repo * added technic_armor since is now in separate repo
### (2018-03-06) ### (2018-03-06)

1
etc/game-install-ENLIVEN

@ -936,6 +936,7 @@ 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 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 # 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 dynamic_liquid dynamic_liquid https://github.com/minetest-mods/dynamic_liquid.git
add_git_mod mapfix mapfix https://github.com/minetest-mods/mapfix
#endregion MOB AND WORLDGEN MODS #endregion MOB AND WORLDGEN MODS

52
patches/subgame-basis/mods/bones/init-0.5.0-dev.lua → patches/subgame-basis/mods/bones/init-something.lua

@ -1,8 +1,6 @@
-- Minetest 0.4 mod: bones -- Minetest 0.4 mod: bones
-- See README.txt for licensing and other information. -- See README.txt for licensing and other information.
bones = {}
local function is_owner(pos, name) local function is_owner(pos, name)
local owner = minetest.get_meta(pos):get_string("owner") local owner = minetest.get_meta(pos):get_string("owner")
if owner == "" or owner == name or minetest.check_player_privs(name, "protection_bypass") then if owner == "" or owner == name or minetest.check_player_privs(name, "protection_bypass") then
@ -70,12 +68,6 @@ minetest.register_node("bones:bones", {
on_metadata_inventory_take = function(pos, listname, index, stack, player) on_metadata_inventory_take = function(pos, listname, index, stack, player)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
if meta:get_inventory():is_empty("main") then if meta:get_inventory():is_empty("main") then
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
minetest.remove_node(pos) minetest.remove_node(pos)
end end
end, end,
@ -167,18 +159,6 @@ local drop = function(pos, itemstack)
end end
end end
local player_inventory_lists = { "main", "craft" }
bones.player_inventory_lists = player_inventory_lists
local function is_all_empty(player_inv)
for _, list_name in ipairs(player_inventory_lists) do
if not player_inv:is_empty(list_name) then
return false
end
end
return true
end
minetest.register_on_dieplayer(function(player) minetest.register_on_dieplayer(function(player)
local bones_mode = minetest.settings:get("bones_mode") or "bones" local bones_mode = minetest.settings:get("bones_mode") or "bones"
@ -193,7 +173,8 @@ minetest.register_on_dieplayer(function(player)
end end
local player_inv = player:get_inventory() local player_inv = player:get_inventory()
if is_all_empty(player_inv) then if player_inv:is_empty("main") and
player_inv:is_empty("craft") then
return return
end end
@ -211,12 +192,19 @@ minetest.register_on_dieplayer(function(player)
end end
if bones_mode == "drop" then if bones_mode == "drop" then
for _, list_name in ipairs(player_inventory_lists) do
for i = 1, player_inv:get_size(list_name) do -- drop inventory items
drop(pos, player_inv:get_stack(list_name, i)) for i = 1, player_inv:get_size("main") do
drop(pos, player_inv:get_stack("main", i))
end end
player_inv:set_list(list_name, {}) player_inv:set_list("main", {})
-- drop crafting grid items
for i = 1, player_inv:get_size("craft") do
drop(pos, player_inv:get_stack("craft", i))
end end
player_inv:set_list("craft", {})
drop(pos, ItemStack("bones:bones")) drop(pos, ItemStack("bones:bones"))
return return
end end
@ -227,18 +215,20 @@ minetest.register_on_dieplayer(function(player)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
local inv = meta:get_inventory() local inv = meta:get_inventory()
inv:set_size("main", 8 * 4) inv:set_size("main", 8 * 4)
inv:set_list("main", player_inv:get_list("main"))
for _, list_name in ipairs(player_inventory_lists) do for i = 1, player_inv:get_size("craft") do
for i = 1, player_inv:get_size(list_name) do local stack = player_inv:get_stack("craft", i)
local stack = player_inv:get_stack(list_name, i)
if inv:room_for_item("main", stack) then if inv:room_for_item("main", stack) then
inv:add_item("main", stack) inv:add_item("main", stack)
else -- no space left else
--drop if no space left
drop(pos, stack) drop(pos, stack)
end end
end end
player_inv:set_list(list_name, {})
end player_inv:set_list("main", {})
player_inv:set_list("craft", {})
meta:set_string("formspec", bones_formspec) meta:set_string("formspec", bones_formspec)
meta:set_string("owner", player_name) meta:set_string("owner", player_name)

52
patches/subgame-basis/mods/bones/init.lua

@ -1,6 +1,8 @@
-- Minetest 0.4 mod: bones -- Minetest 0.4 mod: bones
-- See README.txt for licensing and other information. -- See README.txt for licensing and other information.
bones = {}
local function is_owner(pos, name) local function is_owner(pos, name)
local owner = minetest.get_meta(pos):get_string("owner") local owner = minetest.get_meta(pos):get_string("owner")
if owner == "" or owner == name or minetest.check_player_privs(name, "protection_bypass") then if owner == "" or owner == name or minetest.check_player_privs(name, "protection_bypass") then
@ -68,6 +70,12 @@ minetest.register_node("bones:bones", {
on_metadata_inventory_take = function(pos, listname, index, stack, player) on_metadata_inventory_take = function(pos, listname, index, stack, player)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
if meta:get_inventory():is_empty("main") then if meta:get_inventory():is_empty("main") then
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
minetest.remove_node(pos) minetest.remove_node(pos)
end end
end, end,
@ -159,6 +167,18 @@ local drop = function(pos, itemstack)
end end
end end
local player_inventory_lists = { "main", "craft" }
bones.player_inventory_lists = player_inventory_lists
local function is_all_empty(player_inv)
for _, list_name in ipairs(player_inventory_lists) do
if not player_inv:is_empty(list_name) then
return false
end
end
return true
end
minetest.register_on_dieplayer(function(player) minetest.register_on_dieplayer(function(player)
local bones_mode = minetest.settings:get("bones_mode") or "bones" local bones_mode = minetest.settings:get("bones_mode") or "bones"
@ -173,8 +193,7 @@ minetest.register_on_dieplayer(function(player)
end end
local player_inv = player:get_inventory() local player_inv = player:get_inventory()
if player_inv:is_empty("main") and if is_all_empty(player_inv) then
player_inv:is_empty("craft") then
return return
end end
@ -192,19 +211,12 @@ minetest.register_on_dieplayer(function(player)
end end
if bones_mode == "drop" then if bones_mode == "drop" then
for _, list_name in ipairs(player_inventory_lists) do
-- drop inventory items for i = 1, player_inv:get_size(list_name) do
for i = 1, player_inv:get_size("main") do drop(pos, player_inv:get_stack(list_name, i))
drop(pos, player_inv:get_stack("main", i))
end end
player_inv:set_list("main", {}) player_inv:set_list(list_name, {})
-- drop crafting grid items
for i = 1, player_inv:get_size("craft") do
drop(pos, player_inv:get_stack("craft", i))
end end
player_inv:set_list("craft", {})
drop(pos, ItemStack("bones:bones")) drop(pos, ItemStack("bones:bones"))
return return
end end
@ -215,20 +227,18 @@ minetest.register_on_dieplayer(function(player)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
local inv = meta:get_inventory() local inv = meta:get_inventory()
inv:set_size("main", 8 * 4) inv:set_size("main", 8 * 4)
inv:set_list("main", player_inv:get_list("main"))
for i = 1, player_inv:get_size("craft") do for _, list_name in ipairs(player_inventory_lists) do
local stack = player_inv:get_stack("craft", i) for i = 1, player_inv:get_size(list_name) do
local stack = player_inv:get_stack(list_name, i)
if inv:room_for_item("main", stack) then if inv:room_for_item("main", stack) then
inv:add_item("main", stack) inv:add_item("main", stack)
else else -- no space left
--drop if no space left
drop(pos, stack) drop(pos, stack)
end end
end end
player_inv:set_list(list_name, {})
player_inv:set_list("main", {}) end
player_inv:set_list("craft", {})
meta:set_string("formspec", bones_formspec) meta:set_string("formspec", bones_formspec)
meta:set_string("owner", player_name) meta:set_string("owner", player_name)

81
patches/subgame/mods/bones/init-0.5.0-dev.lua → patches/subgame/mods/bones/init-something.lua

@ -1,8 +1,6 @@
-- Minetest 0.4 mod: bones -- Minetest 0.4 mod: bones
-- See README.txt for licensing and other information. -- See README.txt for licensing and other information.
bones = {}
local function is_owner(pos, name) local function is_owner(pos, name)
local owner = minetest.get_meta(pos):get_string("owner") local owner = minetest.get_meta(pos):get_string("owner")
if owner == "" or owner == name or minetest.check_player_privs(name, "protection_bypass") then if owner == "" or owner == name or minetest.check_player_privs(name, "protection_bypass") then
@ -70,12 +68,6 @@ minetest.register_node("bones:bones", {
on_metadata_inventory_take = function(pos, listname, index, stack, player) on_metadata_inventory_take = function(pos, listname, index, stack, player)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
if meta:get_inventory():is_empty("main") then if meta:get_inventory():is_empty("main") then
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
minetest.remove_node(pos) minetest.remove_node(pos)
end end
end, end,
@ -167,19 +159,6 @@ local drop = function(pos, itemstack)
end end
end end
local player_inventory_lists = { "main", "craft" }
bones.player_inventory_lists = player_inventory_lists
local function is_all_empty(player_inv)
for _, list_name in ipairs(player_inventory_lists) do
if not player_inv:is_empty(list_name) then
return false
end
end
return true
end
minetest.register_on_dieplayer(function(player) minetest.register_on_dieplayer(function(player)
local bones_mode = minetest.settings:get("bones_mode") or "bones" local bones_mode = minetest.settings:get("bones_mode") or "bones"
@ -187,24 +166,20 @@ minetest.register_on_dieplayer(function(player)
bones_mode = "bones" bones_mode = "bones"
end end
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()) local pos = vector.round(player:getpos())
-- return if keep inventory set or in creative mode -- return if keep inventory set or in creative mode
if bones_mode == "keep" or (creative and creative.is_enabled_for if bones_mode == "keep" or (creative and creative.is_enabled_for
and creative.is_enabled_for(player:get_player_name())) then and creative.is_enabled_for(player:get_player_name())) then
if enable_bones_logging then minetest.log("action", "[bones] " .. player:get_player_name() .. "'s bones do not remain since in creative_mode -- died at " .. minetest.pos_to_string(vector.round(player:getpos())))
minetest.log("action", "[bones] " .. player:get_player_name() .. "'s bones do not remain since player has creative -- died at " .. minetest.pos_to_string(vector.round(player:getpos()))) minetest.chat_send_player(player:get_player_name(), player:get_player_name() .. "'s bones do not remain since in creative_mode -- died at " .. minetest.pos_to_string(pos)) --formerly ("Bones placed at %s."):format(pos)
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 creative -- died at " .. minetest.pos_to_string(pos))
end
return return
end end
local player_inv = player:get_inventory() local player_inv = player:get_inventory()
if is_all_empty(player_inv) then if player_inv:is_empty("main") and
player_inv:is_empty("craft") then
minetest.log("action", "[bones] " .. player:get_player_name() .. "'s bones do not remain since inventory and craft are empty -- died at " .. minetest.pos_to_string(vector.round(player:getpos())))
minetest.chat_send_player(player:get_player_name(), player:get_player_name() .. "'s bones do not remain since inventory and craft are empty -- died at " .. minetest.pos_to_string(pos)) --formerly ("Bones placed at %s."):format(pos)
return return
end end
@ -222,46 +197,48 @@ minetest.register_on_dieplayer(function(player)
end end
if bones_mode == "drop" then if bones_mode == "drop" then
for _, list_name in ipairs(player_inventory_lists) do
for i = 1, player_inv:get_size(list_name) do -- drop inventory items
drop(pos, player_inv:get_stack(list_name, i)) for i = 1, player_inv:get_size("main") do
drop(pos, player_inv:get_stack("main", i))
end end
player_inv:set_list(list_name, {}) player_inv:set_list("main", {})
-- drop crafting grid items
for i = 1, player_inv:get_size("craft") do
drop(pos, player_inv:get_stack("craft", i))
end end
player_inv:set_list("craft", {})
drop(pos, ItemStack("bones:bones")) drop(pos, ItemStack("bones:bones"))
if enable_bones_logging then minetest.log("action", "[bones] " .. player:get_player_name() .. "'s bones do not remain since area is_protected -- died at " .. minetest.pos_to_string(pos))
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)) minetest.chat_send_player(player:get_player_name(), player:get_player_name() .. "'s do not remain since area is_protected -- died at " .. minetest.pos_to_string(pos)) --formerly ("Bones placed at %s."):format(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 return
end end
local param2 = minetest.dir_to_facedir(player:get_look_dir()) local param2 = minetest.dir_to_facedir(player:get_look_dir())
minetest.set_node(pos, {name = "bones:bones", param2 = param2}) 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)) minetest.log("action", "[bones] " .. player:get_player_name() .. "'s bones remain where died at " .. minetest.pos_to_string(pos))
end minetest.chat_send_player(player:get_player_name(), player:get_player_name() .. "'s bones remain where died at " .. minetest.pos_to_string(pos)) --formerly ("Bones placed at %s."):format(pos)
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 meta = minetest.get_meta(pos)
local inv = meta:get_inventory() local inv = meta:get_inventory()
inv:set_size("main", 8 * 4) inv:set_size("main", 8 * 4)
inv:set_list("main", player_inv:get_list("main"))
for _, list_name in ipairs(player_inventory_lists) do for i = 1, player_inv:get_size("craft") do
for i = 1, player_inv:get_size(list_name) do local stack = player_inv:get_stack("craft", i)
local stack = player_inv:get_stack(list_name, i)
if inv:room_for_item("main", stack) then if inv:room_for_item("main", stack) then
inv:add_item("main", stack) inv:add_item("main", stack)
else -- no space left else
--drop if no space left
drop(pos, stack) drop(pos, stack)
end end
end end
player_inv:set_list(list_name, {})
end player_inv:set_list("main", {})
player_inv:set_list("craft", {})
meta:set_string("formspec", bones_formspec) meta:set_string("formspec", bones_formspec)
meta:set_string("owner", player_name) meta:set_string("owner", player_name)

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

@ -1,6 +1,8 @@
-- Minetest 0.4 mod: bones -- Minetest 0.4 mod: bones
-- See README.txt for licensing and other information. -- See README.txt for licensing and other information.
bones = {}
local function is_owner(pos, name) local function is_owner(pos, name)
local owner = minetest.get_meta(pos):get_string("owner") local owner = minetest.get_meta(pos):get_string("owner")
if owner == "" or owner == name or minetest.check_player_privs(name, "protection_bypass") then if owner == "" or owner == name or minetest.check_player_privs(name, "protection_bypass") then
@ -68,6 +70,12 @@ minetest.register_node("bones:bones", {
on_metadata_inventory_take = function(pos, listname, index, stack, player) on_metadata_inventory_take = function(pos, listname, index, stack, player)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
if meta:get_inventory():is_empty("main") then if meta:get_inventory():is_empty("main") then
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
minetest.remove_node(pos) minetest.remove_node(pos)
end end
end, end,
@ -159,6 +167,19 @@ local drop = function(pos, itemstack)
end end
end end
local player_inventory_lists = { "main", "craft" }
bones.player_inventory_lists = player_inventory_lists
local function is_all_empty(player_inv)
for _, list_name in ipairs(player_inventory_lists) do
if not player_inv:is_empty(list_name) then
return false
end
end
return true
end
minetest.register_on_dieplayer(function(player) minetest.register_on_dieplayer(function(player)
local bones_mode = minetest.settings:get("bones_mode") or "bones" local bones_mode = minetest.settings:get("bones_mode") or "bones"
@ -166,20 +187,24 @@ minetest.register_on_dieplayer(function(player)
bones_mode = "bones" bones_mode = "bones"
end end
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()) local pos = vector.round(player:getpos())
-- return if keep inventory set or in creative mode -- return if keep inventory set or in creative mode
if bones_mode == "keep" or (creative and creative.is_enabled_for if bones_mode == "keep" or (creative and creative.is_enabled_for
and creative.is_enabled_for(player:get_player_name())) then and creative.is_enabled_for(player:get_player_name())) then
minetest.log("action", "[bones] " .. player:get_player_name() .. "'s bones do not remain since in creative_mode -- died at " .. minetest.pos_to_string(vector.round(player:getpos()))) if enable_bones_logging then
minetest.chat_send_player(player:get_player_name(), player:get_player_name() .. "'s bones do not remain since in creative_mode -- died at " .. minetest.pos_to_string(pos)) --formerly ("Bones placed at %s."):format(pos) minetest.log("action", "[bones] " .. player:get_player_name() .. "'s bones do not remain since player has creative -- 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 creative -- died at " .. minetest.pos_to_string(pos))
end
return return
end end
local player_inv = player:get_inventory() local player_inv = player:get_inventory()
if player_inv:is_empty("main") and if is_all_empty(player_inv) then
player_inv:is_empty("craft") then
minetest.log("action", "[bones] " .. player:get_player_name() .. "'s bones do not remain since inventory and craft are empty -- died at " .. minetest.pos_to_string(vector.round(player:getpos())))
minetest.chat_send_player(player:get_player_name(), player:get_player_name() .. "'s bones do not remain since inventory and craft are empty -- died at " .. minetest.pos_to_string(pos)) --formerly ("Bones placed at %s."):format(pos)
return return
end end
@ -197,48 +222,46 @@ minetest.register_on_dieplayer(function(player)
end end
if bones_mode == "drop" then if bones_mode == "drop" then
for _, list_name in ipairs(player_inventory_lists) do
-- drop inventory items for i = 1, player_inv:get_size(list_name) do
for i = 1, player_inv:get_size("main") do drop(pos, player_inv:get_stack(list_name, i))
drop(pos, player_inv:get_stack("main", i))
end end
player_inv:set_list("main", {}) player_inv:set_list(list_name, {})
-- drop crafting grid items
for i = 1, player_inv:get_size("craft") do
drop(pos, player_inv:get_stack("craft", i))
end end
player_inv:set_list("craft", {})
drop(pos, ItemStack("bones:bones")) drop(pos, ItemStack("bones:bones"))
minetest.log("action", "[bones] " .. player:get_player_name() .. "'s bones do not remain since area is_protected -- died at " .. minetest.pos_to_string(pos)) if enable_bones_logging then
minetest.chat_send_player(player:get_player_name(), player:get_player_name() .. "'s do not remain since area is_protected -- died at " .. minetest.pos_to_string(pos)) --formerly ("Bones placed at %s."):format(pos) 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 return
end end
local param2 = minetest.dir_to_facedir(player:get_look_dir()) local param2 = minetest.dir_to_facedir(player:get_look_dir())
minetest.set_node(pos, {name = "bones:bones", param2 = param2}) 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)) minetest.log("action", "[bones] " .. player:get_player_name() .. "'s bones remain where died at " .. minetest.pos_to_string(pos))
minetest.chat_send_player(player:get_player_name(), player:get_player_name() .. "'s bones remain where died at " .. minetest.pos_to_string(pos)) --formerly ("Bones placed at %s."):format(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 meta = minetest.get_meta(pos)
local inv = meta:get_inventory() local inv = meta:get_inventory()
inv:set_size("main", 8 * 4) inv:set_size("main", 8 * 4)
inv:set_list("main", player_inv:get_list("main"))
for i = 1, player_inv:get_size("craft") do for _, list_name in ipairs(player_inventory_lists) do
local stack = player_inv:get_stack("craft", i) for i = 1, player_inv:get_size(list_name) do
local stack = player_inv:get_stack(list_name, i)
if inv:room_for_item("main", stack) then if inv:room_for_item("main", stack) then
inv:add_item("main", stack) inv:add_item("main", stack)
else else -- no space left
--drop if no space left
drop(pos, stack) drop(pos, stack)
end end
end end
player_inv:set_list(list_name, {})
player_inv:set_list("main", {}) end
player_inv:set_list("craft", {})
meta:set_string("formspec", bones_formspec) meta:set_string("formspec", bones_formspec)
meta:set_string("owner", player_name) meta:set_string("owner", player_name)

Loading…
Cancel
Save