Always load 2_throwing.lua

Reason: Previous code may be run twice, causing weirdness
This commit is contained in:
Wuzzy 2017-07-20 15:32:17 +02:00
parent 26108c11b9
commit 33fb733a1d

View File

@ -29,28 +29,9 @@ dofile(path .. "/0_gameconfig.lua")
--Items
dofile(path .. "/1_items_default.lua")
--IN CASE THROWING IS NOT INSTALLED, THIS FIXES IT
if not minetest.get_modpath("throwing") then
dofile(minetest.get_modpath("mobs_mc").."/2_throwing.lua")
minetest.register_alias("throwing:bow_wood", "mobs:bow_wood")
minetest.register_alias("throwing:arrow", "mobs:arrow")
mobs:alias_mob("throwing:arrow_entity", "mobs:arrow_entity")
else
minetest.register_alias("_:bow_wood", "throwing:bow_wood")
minetest.register_alias("_:arrow", "throwing:arrow")
mobs:alias_mob("_:arrow_entity", "throwing:arrow_entity")
end
-- Bow, arrow and throwables
dofile(path .. "/2_throwing.lua")
if not minetest.get_modpath("mcl_throwing") then
dofile(minetest.get_modpath("mobs_mc").."/2_throwing.lua")
minetest.register_alias("throwing:bow_wood", "mcl_throwing:bow")
minetest.register_alias("throwing:arrow", "mcl_throwing:arrow")
mobs:alias_mob("throwing:arrow_entity", "mcl_throwing:arrow_entity")
else
minetest.register_alias("_:bow", "throwing:bow_wood")
minetest.register_alias("_:arrow", "throwing:arrow")
mobs:alias_mob("_:arrow_entity", "throwing:arrow_entity")
end
-- Shared functions
dofile(path .. "/3_shared.lua")