From dbde0d7c933f86d153ffb064c0082f4c5c50c9a1 Mon Sep 17 00:00:00 2001 From: Splizard Date: Wed, 4 Jun 2014 11:20:57 +1200 Subject: [PATCH] Put all the extra lua files in a src directory. (This cleans up the folder for users, who don't want to see all those strange files) --- init.lua | 22 +++++++++---------- abms.lua => src/abms.lua | 0 aliases.lua => src/aliases.lua | 0 .../basic_stairs_slabs.lua | 0 crafting.lua => src/crafting.lua | 0 falling_snow.lua => src/falling_snow.lua | 0 mapgen.lua => src/mapgen.lua | 11 +++++----- mapgen_v6.lua => src/mapgen_v6.lua | 0 mapgen_v7.lua => src/mapgen_v7.lua | 0 nodes.lua => src/nodes.lua | 0 sled.lua => src/sled.lua | 0 snowball.lua => src/snowball.lua | 0 stairsplus.lua => src/stairsplus.lua | 0 util.lua => src/util.lua | 0 14 files changed, 16 insertions(+), 17 deletions(-) rename abms.lua => src/abms.lua (100%) rename aliases.lua => src/aliases.lua (100%) rename basic_stairs_slabs.lua => src/basic_stairs_slabs.lua (100%) rename crafting.lua => src/crafting.lua (100%) rename falling_snow.lua => src/falling_snow.lua (100%) rename mapgen.lua => src/mapgen.lua (95%) rename mapgen_v6.lua => src/mapgen_v6.lua (100%) rename mapgen_v7.lua => src/mapgen_v7.lua (100%) rename nodes.lua => src/nodes.lua (100%) rename sled.lua => src/sled.lua (100%) rename snowball.lua => src/snowball.lua (100%) rename stairsplus.lua => src/stairsplus.lua (100%) rename util.lua => src/util.lua (100%) diff --git a/init.lua b/init.lua index e013a3c..3186d51 100644 --- a/init.lua +++ b/init.lua @@ -48,24 +48,24 @@ http://github.com/Splizard/minetest-mod-snow/ -- dofile(minetest.get_modpath("snow").."/falling_snow.lua") -- Original init.lua File Broken into Smaller Files -dofile(minetest.get_modpath("snow").."/abms.lua") -dofile(minetest.get_modpath("snow").."/aliases.lua") -dofile(minetest.get_modpath("snow").."/basic_stairs_slabs.lua") -dofile(minetest.get_modpath("snow").."/crafting.lua") -dofile(minetest.get_modpath("snow").."/snowball.lua") +dofile(minetest.get_modpath("snow").."/src/abms.lua") +dofile(minetest.get_modpath("snow").."/src/aliases.lua") +dofile(minetest.get_modpath("snow").."/src/basic_stairs_slabs.lua") +dofile(minetest.get_modpath("snow").."/src/crafting.lua") +dofile(minetest.get_modpath("snow").."/src/snowball.lua") -- The formspec menu didn't work when util.lua was the very first "dofile" so I moved -- it and all the other original "dofiles", in order, to the bottom of the list. ~ LazyJ -- Minetest would crash if the mapgen was called upon before the rest of other snow lua files so -- I put it lower on the list and that seems to do the trick. ~ LazyJ -dofile(minetest.get_modpath("snow").."/util.lua") +dofile(minetest.get_modpath("snow").."/src/util.lua") -- To get Xmas tree saplings, the "christmas_content", true or false, in "util.lua" has to be determined first. -- That means "nodes.lua", where the saplings are controlled, has to come after "util.lua". ~ LazyJ -dofile(minetest.get_modpath("snow").."/nodes.lua") -dofile(minetest.get_modpath("snow").."/mapgen.lua") -dofile(minetest.get_modpath("snow").."/sled.lua") -dofile(minetest.get_modpath("snow").."/falling_snow.lua") +dofile(minetest.get_modpath("snow").."/src/nodes.lua") +dofile(minetest.get_modpath("snow").."/src/mapgen.lua") +dofile(minetest.get_modpath("snow").."/src/sled.lua") +dofile(minetest.get_modpath("snow").."/src/falling_snow.lua") @@ -73,7 +73,7 @@ dofile(minetest.get_modpath("snow").."/falling_snow.lua") if (minetest.get_modpath("moreblocks")) then - dofile(minetest.get_modpath("snow").."/stairsplus.lua") + dofile(minetest.get_modpath("snow").."/src/stairsplus.lua") else end diff --git a/abms.lua b/src/abms.lua similarity index 100% rename from abms.lua rename to src/abms.lua diff --git a/aliases.lua b/src/aliases.lua similarity index 100% rename from aliases.lua rename to src/aliases.lua diff --git a/basic_stairs_slabs.lua b/src/basic_stairs_slabs.lua similarity index 100% rename from basic_stairs_slabs.lua rename to src/basic_stairs_slabs.lua diff --git a/crafting.lua b/src/crafting.lua similarity index 100% rename from crafting.lua rename to src/crafting.lua diff --git a/falling_snow.lua b/src/falling_snow.lua similarity index 100% rename from falling_snow.lua rename to src/falling_snow.lua diff --git a/mapgen.lua b/src/mapgen.lua similarity index 95% rename from mapgen.lua rename to src/mapgen.lua index c62815b..1b42c8f 100644 --- a/mapgen.lua +++ b/src/mapgen.lua @@ -3,10 +3,9 @@ If you want to run PlantLife and mods that depend on it, i.e. MoreTrees, Disable commenting-out the lines starting with "local mgname = " through "end" (I left a note were to start and stop) Disabling "Snow's" mapgen allows MoreTrees and PlantLife to do their thing until the issue is figured out. However, the pine and xmas tree code is still needed for when those -saplings grow into trees. - -The *starting* comment looks like this: --[[ -The *closing* comment looks like this: --]] +saplings grow into trees. --]] +--The *starting* comment looks like this: --[[ +--The *closing* comment looks like this: --]] -- ~ LazyJ, 2014_05_13 @@ -25,10 +24,10 @@ minetest.register_on_mapgen_init(function(MapgenParams) end if mgname == "v7" then --Load mapgen_v7 compatibility. - dofile(minetest.get_modpath("snow").."/mapgen_v7.lua") + dofile(minetest.get_modpath("snow").."/src/mapgen_v7.lua") else --Load mapgen_v6 compatibility. - dofile(minetest.get_modpath("snow").."/mapgen_v6.lua") + dofile(minetest.get_modpath("snow").."/src/mapgen_v6.lua") end end) diff --git a/mapgen_v6.lua b/src/mapgen_v6.lua similarity index 100% rename from mapgen_v6.lua rename to src/mapgen_v6.lua diff --git a/mapgen_v7.lua b/src/mapgen_v7.lua similarity index 100% rename from mapgen_v7.lua rename to src/mapgen_v7.lua diff --git a/nodes.lua b/src/nodes.lua similarity index 100% rename from nodes.lua rename to src/nodes.lua diff --git a/sled.lua b/src/sled.lua similarity index 100% rename from sled.lua rename to src/sled.lua diff --git a/snowball.lua b/src/snowball.lua similarity index 100% rename from snowball.lua rename to src/snowball.lua diff --git a/stairsplus.lua b/src/stairsplus.lua similarity index 100% rename from stairsplus.lua rename to src/stairsplus.lua diff --git a/util.lua b/src/util.lua similarity index 100% rename from util.lua rename to src/util.lua