Fix logic error due to operator precedence when checking item name (#8)
This commit is contained in:
parent
994c1a263d
commit
8085ab8988
4
init.lua
4
init.lua
@ -339,7 +339,7 @@ local function ccompass_permitted_target(itemstack)
|
||||
-- setting compasses when node type restriction is enabled.
|
||||
return false
|
||||
end
|
||||
if not (itemstack:get_name():sub(1,ccompass_prefix_length) == ccompass_prefix) then
|
||||
if itemstack:get_name():sub(1,ccompass_prefix_length) ~= ccompass_prefix then
|
||||
return false
|
||||
end
|
||||
local meta = itemstack:get_meta()
|
||||
@ -350,7 +350,7 @@ local function ccompass_permitted_target(itemstack)
|
||||
return true
|
||||
end
|
||||
local function ccompass_permitted_source(itemstack)
|
||||
if not itemstack:get_name():sub(1,ccompass_prefix_length) == ccompass_prefix then
|
||||
if itemstack:get_name():sub(1,ccompass_prefix_length) ~= ccompass_prefix then
|
||||
return false
|
||||
end
|
||||
local meta = itemstack:get_meta()
|
||||
|
Loading…
x
Reference in New Issue
Block a user