Add fix to prevent player joining being held at 0,0,0

This commit is contained in:
Tai @ Flex 2016-12-09 16:37:05 +00:00
parent 9344744020
commit 2f13fa2d54
2 changed files with 8 additions and 3 deletions

View File

@ -8,7 +8,10 @@ local denom = {
emerald = {"oresplus:emerald", "oresplus:emeraldblock"} emerald = {"oresplus:emerald", "oresplus:emeraldblock"}
} }
local function detached_funds(name) local function detached_funds(name, player_name)
if not player_name then
player_name = name
end
return minetest.create_detached_inventory("funds_" .. name, { return minetest.create_detached_inventory("funds_" .. name, {
allow_move = function(inv, from_list, to_list, to_index, count, player) allow_move = function(inv, from_list, to_list, to_index, count, player)
return 0 return 0
@ -49,7 +52,8 @@ local function detached_funds(name)
on_take = function(inv, listname, index, stack, player) on_take = function(inv, listname, index, stack, player)
return stack:get_count() return stack:get_count()
end end
}) },
player_name)
end end
minetest.register_on_joinplayer(function(player) minetest.register_on_joinplayer(function(player)

View File

@ -160,7 +160,8 @@ minetest.register_on_joinplayer(function(player, _)
end end
end end
end end
}) },
player:get_player_name())
skin:set_size("main", 1) skin:set_size("main", 1)
for _, v in pairs(skin_db) do for _, v in pairs(skin_db) do