summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas <tom2357@online.de>2017-03-04 19:44:39 +0100
committerThomas <tom2357@online.de>2017-03-04 19:44:39 +0100
commit11610cd9cb7e22e52e5d68a7e1bfbe6440e3f4a3 (patch)
tree47cf2160c7649122d0c9620e6af453d90ecf1e83
parentfd609d0f7b0015f981a3cbecf15fb4a8af88454d (diff)
Fixed set mode for mining drill mk2 and mk3
-rw-r--r--technic/tools/mining_drill.lua6
1 files changed, 2 insertions, 4 deletions
diff --git a/technic/tools/mining_drill.lua b/technic/tools/mining_drill.lua
index 8a25abe..fee7c4e 100644
--- a/technic/tools/mining_drill.lua
+++ b/technic/tools/mining_drill.lua
@@ -254,8 +254,7 @@ local function mining_drill_mk2_setmode(user,itemstack)
minetest.chat_send_player(player_name, S("Mining Drill Mk%d Mode %d"):format(2, mode)..": "..mining_drill_mode_text[mode][1])
item["name"]="technic:mining_drill_mk2_"..mode
meta["mode"]=mode
- item["metadata"]=minetest.serialize(meta)
- itemstack:replace(item)
+ itemstack:set_metadata(minetest.serialize(meta))
return itemstack
end
@@ -278,8 +277,7 @@ local function mining_drill_mk3_setmode(user,itemstack)
minetest.chat_send_player(player_name, S("Mining Drill Mk%d Mode %d"):format(3, mode)..": "..mining_drill_mode_text[mode][1])
item["name"]="technic:mining_drill_mk3_"..mode
meta["mode"]=mode
- item["metadata"]=minetest.serialize(meta)
- itemstack:replace(item)
+ itemstack:set_metadata(minetest.serialize(meta))
return itemstack
end