mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-26 09:13:53 +01:00
Use modlib's split instead of Minetest's
This commit is contained in:
parent
90614006ba
commit
4707928f72
@ -200,8 +200,7 @@ end
|
|||||||
--> function(nodename) -> whether node matches
|
--> function(nodename) -> whether node matches
|
||||||
function nodename_matcher(node_or_groupname)
|
function nodename_matcher(node_or_groupname)
|
||||||
if modlib.text.starts_with(node_or_groupname, "group:") then
|
if modlib.text.starts_with(node_or_groupname, "group:") then
|
||||||
-- TODO consider using modlib.text.split instead of Minetest's string.split
|
local groups = modlib.text.split(node_or_groupname:sub(("group:"):len() + 1), ",")
|
||||||
local groups = node_or_groupname:sub(("group:"):len() + 1):split(",")
|
|
||||||
return function(nodename)
|
return function(nodename)
|
||||||
for _, groupname in pairs(groups) do
|
for _, groupname in pairs(groups) do
|
||||||
if minetest.get_item_group(nodename, groupname) == 0 then
|
if minetest.get_item_group(nodename, groupname) == 0 then
|
||||||
|
Loading…
Reference in New Issue
Block a user