diff options
author | root <root@mirzakhani.gpcf.eu> | 2018-06-28 23:24:18 +0200 |
---|---|---|
committer | root <root@mirzakhani.gpcf.eu> | 2018-06-28 23:24:18 +0200 |
commit | c330eebe903298e321d7bd9dd9f892f7b7d2b820 (patch) | |
tree | d0ee086dbe6d6496bcc2c74d8951f18b518a3077 | |
parent | b731893c172c6c0c2f4653e9953f8dfd01a2c638 (diff) | |
parent | 17961912206c9d185d35bc61de5163984eca686c (diff) |
Merge https://github.com/h-v-smacker/technic
-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 |