From 987cc5a6a425b1f9bcd9000608dc389a45c675a1 Mon Sep 17 00:00:00 2001 From: you <ovvv@web.de> Date: Mon, 05 Jun 2017 16:51:59 +0200 Subject: [PATCH] Add api documentation (#361) --- technic/tools/prospector.lua | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/technic/tools/prospector.lua b/technic/tools/prospector.lua index d663bd2..b28f1d8 100644 --- a/technic/tools/prospector.lua +++ b/technic/tools/prospector.lua @@ -28,9 +28,11 @@ minetest.chat_send_player(user:get_player_name(), "Right-click to set target block type") return end - toolmeta.charge = toolmeta.charge - charge_to_take - toolstack:set_metadata(minetest.serialize(toolmeta)) - technic.set_RE_wear(toolstack, toolmeta.charge, technic.power_tools[toolstack:get_name()]) + if not technic.creative_mode then + toolmeta.charge = toolmeta.charge - charge_to_take + toolstack:set_metadata(minetest.serialize(toolmeta)) + technic.set_RE_wear(toolstack, toolmeta.charge, technic.power_tools[toolstack:get_name()]) + end local start_pos = pointed_thing.under local forward = minetest.facedir_to_dir(minetest.dir_to_facedir(user:get_look_dir(), true)) local right = forward.x ~= 0 and { x=0, y=1, z=0 } or (forward.y ~= 0 and { x=0, y=0, z=1 } or { x=1, y=0, z=0 }) -- Gitblit v1.8.0