small rewrite and optimition

This commit is contained in:
adrido 2014-07-27 08:37:22 +02:00
parent e97e7810e3
commit 196bccb5a1
5 changed files with 51 additions and 17 deletions

View File

@ -1,6 +1,36 @@
--dofile(minetest.get_modpath("christmas_craft").."/mods.lua")--disabled because 4seasons is not installed local worldpath = minetest.get_worldpath()
dofile(minetest.get_modpath("christmas_craft").."/crafts.lua") --temporary disabled because cristmas is over-- christmas_craft = {};
dofile(minetest.get_modpath("christmas_craft").."/settings.lua") -- makes it snow christmas_craft.config = Settings(worldpath.."/christmas_craft.conf")
local conf_table = christmas_craft.config:to_table()
--look into readme.txt how to change settings
local defaults = {
enable_4seasons = "false",
enable_crafts = "true",
enable_snowing = "true",
}
for k, v in pairs(defaults) do
if conf_table[k] == nil then
christmas_craft.config:set(k, v)
end
end
if christmas_craft.config:get("enable_enable_4seasons") == "true" then
dofile(minetest.get_modpath("christmas_craft").."/4seasons.lua")--enable in christmas_craft.conf if you have 4 seasons installed
end
if christmas_craft.config:get("enable_crafts") == "true" then
dofile(minetest.get_modpath("christmas_craft").."/crafts.lua") --enable this if you want craft rezieps
end
if christmas_craft.config:get("enable_snow") == "true" then
dofile(minetest.get_modpath("christmas_craft").."/snow.lua") -- enable this if you want snow
end
-- blocks -- -- blocks --
minetest.register_node("christmas_craft:snowman", { minetest.register_node("christmas_craft:snowman", {

View File

@ -39,6 +39,24 @@ HOW TO INSTALL?
6. enjoy the mod 6. enjoy the mod
Configuration
....................................................
to edit the settings create a christmas_craft.conf file in your world dir.
add and modify the following lines:
enable_4seasons = "false"
enable_crafts = "true"
enable_snowing = "true"
example if you dont want the snowing landscape change
enable_snowing = "true"
to
enable_snowing = "false"
thats all :)
OTHER STUFF OTHER STUFF
.................................................... ....................................................
CHRISTMAS CRAFT MOD FOR MINETEST BY INFINATUM CHRISTMAS CRAFT MOD FOR MINETEST BY INFINATUM

View File

@ -1,14 +0,0 @@
--------------------------------------------------
-- CONFIGURATION ---------------------------------
--------------------------------------------------
-------------------------------------------------------------
-- Change settings by changing the values after the "=". ----
-------------------------------------------------------------
-- enabels mod support --
dofile.enable_4seasons = false