mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2025-07-02 00:10:21 +02:00
add ability to follow group: items
This commit is contained in:
12
api.lua
12
api.lua
@ -8,7 +8,7 @@ local use_cmi = minetest.global_exists("cmi")
|
||||
|
||||
mobs = {
|
||||
mod = "redo",
|
||||
version = "20210318",
|
||||
version = "20210323",
|
||||
intllib = S,
|
||||
invis = minetest.global_exists("invisibility") and invisibility or {}
|
||||
}
|
||||
@ -251,9 +251,17 @@ local check_for = function(look_for, look_inside)
|
||||
for _, str in pairs(look_inside) do
|
||||
|
||||
if str == look_for then
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
if str:find("group:") then
|
||||
|
||||
local group = str:split(":")[2]
|
||||
|
||||
if minetest.get_item_group(look_for, group) ~= 0 then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user