mirror of
https://github.com/minetest-mods/technic.git
synced 2024-12-25 18:30:29 +01:00
Screwdriver fix
This commit is contained in:
parent
0e58a6f014
commit
d041c13ad8
@ -21,11 +21,13 @@
|
|||||||
minetest.env:set_node(pos,node)
|
minetest.env:set_node(pos,node)
|
||||||
meta = minetest.env:get_meta(pos)
|
meta = minetest.env:get_meta(pos)
|
||||||
meta:from_table(meta0)
|
meta:from_table(meta0)
|
||||||
-- appropriatly set the wear of the screwdriver
|
local item=itemstack:to_table()
|
||||||
-- m = itemstack:get_wear()
|
local item_wear=tonumber((item["wear"]))
|
||||||
-- if m == 0 then m = 65535 end
|
item_wear=item_wear+819
|
||||||
-- m = m-6554
|
if item_wear>65535 then itemstack:clear() return itemstack end
|
||||||
-- return {wear=m}
|
item["wear"]=tostring(item_wear)
|
||||||
|
itemstack:replace(item)
|
||||||
|
return itemstack
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user