diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-03-06 13:35:16 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-06 13:35:16 -0500 |
commit | e3b33e21c7b63f25f5bea1352bb83ab943772a66 (patch) | |
tree | 63b316c36cd2d037a099e21aebad19917fdddfc2 | |
parent | ff6675ef2875c89702f00e77ebc35fa863e60704 (diff) | |
parent | 1765c31eaa758b0a522a51ae0c1748f0fbb05f23 (diff) |
Merge pull request #314 from thomas31415/master
Fixed set mode for mining drill mk2 and mk3
-rw-r--r-- | origin | 0 | ||||
-rw-r--r-- | technic/tools/mining_drill.lua | 10 |
2 files changed, 4 insertions, 6 deletions
diff --git a/technic/tools/mining_drill.lua b/technic/tools/mining_drill.lua index 8a25abe..e8e9bcb 100644 --- a/technic/tools/mining_drill.lua +++ b/technic/tools/mining_drill.lua @@ -252,10 +252,9 @@ local function mining_drill_mk2_setmode(user,itemstack) mode=mode+1 if mode>=5 then mode=1 end 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 + itemstack:set_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 @@ -276,10 +275,9 @@ local function mining_drill_mk3_setmode(user,itemstack) mode=mode+1 if mode>=6 then mode=1 end 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 + itemstack:set_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 |