game-antum/patches/mod-animal_resources__weapo...

28 lines
900 B
Diff

--- weapons.lua.orig 2014-09-10 13:45:19.000000000 -0700
+++ weapons.lua 2016-08-12 10:32:45.493748228 -0700
@@ -12,7 +12,7 @@
--
-- Contact sapier a t gmx net
-------------------------------------------------------------------------------
-assert(weapons_spacer == nil)
+--assert(weapons_spacer == nil)
local weapons_spacer = {} --unused to fix lua doxygen bug only
-------------------------------------------------------------------------------
@@ -460,11 +460,8 @@
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