Fixed set mode for mining drill mk2 and mk3

This commit is contained in:
Thomas 2017-03-04 19:44:39 +01:00
parent fd609d0f7b
commit 11610cd9cb

View File

@ -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]) 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 item["name"]="technic:mining_drill_mk2_"..mode
meta["mode"]=mode meta["mode"]=mode
item["metadata"]=minetest.serialize(meta) itemstack:set_metadata(minetest.serialize(meta))
itemstack:replace(item)
return itemstack return itemstack
end 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]) 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 item["name"]="technic:mining_drill_mk3_"..mode
meta["mode"]=mode meta["mode"]=mode
item["metadata"]=minetest.serialize(meta) itemstack:set_metadata(minetest.serialize(meta))
itemstack:replace(item)
return itemstack return itemstack
end end