mirror of
https://bitbucket.org/kingarthursteam/christmas_craft.git
synced 2024-12-22 16:50:18 +01:00
small rewrite and optimition
This commit is contained in:
parent
e97e7810e3
commit
196bccb5a1
36
init.lua
36
init.lua
@ -1,6 +1,36 @@
|
||||
--dofile(minetest.get_modpath("christmas_craft").."/mods.lua")--disabled because 4seasons is not installed
|
||||
dofile(minetest.get_modpath("christmas_craft").."/crafts.lua") --temporary disabled because cristmas is over--
|
||||
dofile(minetest.get_modpath("christmas_craft").."/settings.lua") -- makes it snow
|
||||
local worldpath = minetest.get_worldpath()
|
||||
christmas_craft = {};
|
||||
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 --
|
||||
|
||||
minetest.register_node("christmas_craft:snowman", {
|
||||
|
18
readme.txt
18
readme.txt
@ -39,6 +39,24 @@ HOW TO INSTALL?
|
||||
|
||||
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
|
||||
....................................................
|
||||
CHRISTMAS CRAFT MOD FOR MINETEST BY INFINATUM
|
||||
|
14
settings.txt
14
settings.txt
@ -1,14 +0,0 @@
|
||||
--------------------------------------------------
|
||||
-- CONFIGURATION ---------------------------------
|
||||
--------------------------------------------------
|
||||
|
||||
-------------------------------------------------------------
|
||||
-- Change settings by changing the values after the "=". ----
|
||||
-------------------------------------------------------------
|
||||
|
||||
-- enabels mod support --
|
||||
dofile.enable_4seasons = false
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user