From a61cd3bc3dad25d46a2f252cc92c760a5f50dedf Mon Sep 17 00:00:00 2001 From: Dorian Wouters Date: Sun, 14 Aug 2016 15:11:40 +0200 Subject: [PATCH] Move minetest.rotate_node override to a pre-default _misc init --- minetestforfun_game/mods/_misc_init/init.lua | 9 +++++++++ .../mods/_misc_init}/inventory_rotate_node.lua | 2 +- minetestforfun_game/mods/default/depends.txt | 1 + mods/_misc/init.lua | 4 ---- 4 files changed, 11 insertions(+), 5 deletions(-) create mode 100755 minetestforfun_game/mods/_misc_init/init.lua rename {mods/_misc => minetestforfun_game/mods/_misc_init}/inventory_rotate_node.lua (99%) create mode 100644 minetestforfun_game/mods/default/depends.txt diff --git a/minetestforfun_game/mods/_misc_init/init.lua b/minetestforfun_game/mods/_misc_init/init.lua new file mode 100755 index 00000000..bf26caec --- /dev/null +++ b/minetestforfun_game/mods/_misc_init/init.lua @@ -0,0 +1,9 @@ +---------------------------------------- +-- Server Misc Mod - pre-default init -- +---------------------------------------- + +local cwd = minetest.get_modpath(minetest.get_current_modname()) + +-- Inventory refill function override +-- see https://github.com/MinetestForFun/server-minetestforfun/issues/462 +dofile(cwd.."/inventory_rotate_node.lua") diff --git a/mods/_misc/inventory_rotate_node.lua b/minetestforfun_game/mods/_misc_init/inventory_rotate_node.lua similarity index 99% rename from mods/_misc/inventory_rotate_node.lua rename to minetestforfun_game/mods/_misc_init/inventory_rotate_node.lua index 9fbdbbb7..4df3ac13 100644 --- a/mods/_misc/inventory_rotate_node.lua +++ b/minetestforfun_game/mods/_misc_init/inventory_rotate_node.lua @@ -19,4 +19,4 @@ function minetest.rotate_node(itemstack, placer, pointed_thing) end end return ret -end +end diff --git a/minetestforfun_game/mods/default/depends.txt b/minetestforfun_game/mods/default/depends.txt new file mode 100644 index 00000000..a3d73590 --- /dev/null +++ b/minetestforfun_game/mods/default/depends.txt @@ -0,0 +1 @@ +_misc_init? diff --git a/mods/_misc/init.lua b/mods/_misc/init.lua index ec2768ca..3fa9b566 100755 --- a/mods/_misc/init.lua +++ b/mods/_misc/init.lua @@ -9,10 +9,6 @@ dofile(cwd.."/carbone_init.lua") dofile(cwd.."/commands.lua") dofile(cwd.."/forbid_underwater_torch.lua") --- Inventory refill function override --- see https://github.com/MinetestForFun/server-minetestforfun/issues/462 -dofile(cwd.."/inventory_rotate_node.lua") - -- Give initial stuff dofile(cwd.."/give_initial_stuff.lua")