mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-27 03:00:38 +01:00
fix Only one enchanted piece of armor is allowed to be placed in the armor slots at one time.
This commit is contained in:
parent
7ce1871ef8
commit
bfe1c2d0ad
@ -437,6 +437,9 @@ minetest.register_on_joinplayer(function(player)
|
|||||||
|
|
||||||
--MFF (crabman/27/11/2015) no same item type. *helmet*
|
--MFF (crabman/27/11/2015) no same item type. *helmet*
|
||||||
local ptype = name:split(":")[2]:split("_")[1]
|
local ptype = name:split(":")[2]:split("_")[1]
|
||||||
|
if ptype == "enchanted" then
|
||||||
|
ptype = name:split(":")[2]:split("_")[2]
|
||||||
|
end
|
||||||
for i=1, size do
|
for i=1, size do
|
||||||
local stack = player_inv:get_stack(listname, i)
|
local stack = player_inv:get_stack(listname, i)
|
||||||
if stack:get_count() > 0 then
|
if stack:get_count() > 0 then
|
||||||
|
Loading…
Reference in New Issue
Block a user