diff options
author | h-v-smacker <hans-von-smacker+github@gmail.com> | 2018-06-28 01:18:47 +0300 |
---|---|---|
committer | h-v-smacker <hans-von-smacker+github@gmail.com> | 2018-06-28 01:18:47 +0300 |
commit | 17961912206c9d185d35bc61de5163984eca686c (patch) | |
tree | b1d2039873292e7401b7842b0b001a9c1e1279bc | |
parent | fb5c21e05ce97d24e2b392d236f6945f7fd967bc (diff) |
no door rotation for sonic screwdriver
-rw-r--r-- | technic/tools/sonic_screwdriver.lua | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/technic/tools/sonic_screwdriver.lua b/technic/tools/sonic_screwdriver.lua index 366ddaa..e75f267 100644 --- a/technic/tools/sonic_screwdriver.lua +++ b/technic/tools/sonic_screwdriver.lua @@ -39,15 +39,20 @@ local function screwdriver_handler(itemstack, user, pointed_thing, mode) return end + -- exclude doors from rotatable options (causes a crash) + if node.name == "doors:hidden" or string.find(node.name, "^doors:door_") then + return + end + -- contrary to the default screwdriver, do not check for can_dig, to allow rotating machines with CLU's in them -- this is consistent with the previous sonic screwdriver - + local meta1 = minetest.deserialize(itemstack:get_metadata()) if not meta1 or not meta1.charge or meta1.charge < 100 then return end - minetest.sound_play("technic_sonic_screwdriver", {pos = pos, gain = 0.3, max_hear_distance = 10}) + minetest.sound_play("technic_sonic_screwdriver", {pos = pos, gain = 0.1, max_hear_distance = 10}) -- Set param2 local rotationPart = node.param2 % 32 -- get first 4 bits |