[animalmaterials] animal_resources/weapons.lua: Use test for modpath

rather than load all mods to check for "throwing".
This commit is contained in:
AntumDeluge
2016-08-12 10:37:10 -07:00
parent e556af95ff
commit 68157ac3d8

View File

@@ -460,11 +460,8 @@ core.register_node("animal_resources:arrow_box", {
groups = {not_in_creative_inventory=1},
})
local mods = core.get_modnames()
for i,v in ipairs(mods) do
if v == element then
print("AR: throwing mod found!")
core.register_alias("animal_resources:arrow", "throwing:arrow")
end
local THROWINGDIR = minetest.get_modpath("throwing")
if THROWINGDIR then
print("AR: throwing mod found!")
core.register_alias("animal_resources:arrow", "throwing:arrow")
end