From: Pinky Snow Date: Sat, 27 Aug 2016 22:28:02 +0000 (-0400) Subject: Default: Eliminate redundant 'get modpath' calls X-Git-Tag: 0.4.15~102 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5e9e3f7e84fafd6ece535b1c7aff3b9ea4e6405b;p=oweals%2Fminetest_game.git Default: Eliminate redundant 'get modpath' calls --- diff --git a/mods/default/init.lua b/mods/default/init.lua index b362fc75..594ea36a 100644 --- a/mods/default/init.lua +++ b/mods/default/init.lua @@ -35,14 +35,16 @@ default.gui_survival_form = "size[8,8.5]".. default.get_hotbar_bg(0,4.25) -- Load files -dofile(minetest.get_modpath("default").."/functions.lua") -dofile(minetest.get_modpath("default").."/trees.lua") -dofile(minetest.get_modpath("default").."/nodes.lua") -dofile(minetest.get_modpath("default").."/furnace.lua") -dofile(minetest.get_modpath("default").."/tools.lua") -dofile(minetest.get_modpath("default").."/craftitems.lua") -dofile(minetest.get_modpath("default").."/crafting.lua") -dofile(minetest.get_modpath("default").."/mapgen.lua") -dofile(minetest.get_modpath("default").."/player.lua") -dofile(minetest.get_modpath("default").."/aliases.lua") -dofile(minetest.get_modpath("default").."/legacy.lua") +local default_path = minetest.get_modpath("default") + +dofile(default_path.."/functions.lua") +dofile(default_path.."/trees.lua") +dofile(default_path.."/nodes.lua") +dofile(default_path.."/furnace.lua") +dofile(default_path.."/tools.lua") +dofile(default_path.."/craftitems.lua") +dofile(default_path.."/crafting.lua") +dofile(default_path.."/mapgen.lua") +dofile(default_path.."/player.lua") +dofile(default_path.."/aliases.lua") +dofile(default_path.."/legacy.lua")