From 92f5cb0fdefd9849f850c3378b5ffcb9b97e8d45 Mon Sep 17 00:00:00 2001 From: HybridDog Date: Sat, 13 Aug 2016 13:09:11 +0200 Subject: [PATCH] move stairs dofiles to nodes.lua M init.lua M src/nodes.lua --- init.lua | 11 ----------- src/nodes.lua | 13 +++++++++++++ 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/init.lua b/init.lua index a4df9e4..306962d 100644 --- a/init.lua +++ b/init.lua @@ -63,22 +63,11 @@ dofile(modpath.."/src/snowball.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(modpath.."/src/nodes.lua") -dofile(modpath.."/src/basic_stairs_slabs.lua") dofile(modpath.."/src/mapgen.lua") dofile(modpath.."/src/sled.lua") dofile(modpath.."/src/falling_snow.lua") - --- Check for "MoreBlocks". If not found, skip this next "dofile". - -if rawget(_G, "stairsplus") -and minetest.get_modpath("moreblocks") then - - dofile(modpath.."/src/stairsplus.lua") - -end - local is_uneven --This function places snow checking at the same time for snow level and increasing as needed. --This also takes into account sourrounding snow and makes snow even. diff --git a/src/nodes.lua b/src/nodes.lua index efac247..f8ba54d 100644 --- a/src/nodes.lua +++ b/src/nodes.lua @@ -462,3 +462,16 @@ minetest.override_item("default:snow", { end, on_use = snow.shoot_snowball }) + + + +-- Do stairs files + +local path = minetest.get_modpath"snow".."/src/" + +dofile(path.."basic_stairs_slabs.lua") + +if minetest.global_exists"stairsplus" +and minetest.get_modpath"moreblocks" then + dofile(path.."stairsplus.lua") +end