2015-04-20 15:05:40 +02:00
|
|
|
--
|
|
|
|
-- The minerals mod.
|
2015-04-20 15:25:56 +02:00
|
|
|
--
|
|
|
|
|
|
|
|
minetest.log("info","/mineral mod initializing")
|
|
|
|
|
|
|
|
-- Load translation library if intllib is installed
|
|
|
|
|
|
|
|
if (minetest.get_modpath("intllib")) then
|
|
|
|
dofile(minetest.get_modpath("intllib").."/intllib.lua")
|
|
|
|
S = intllib.Getter(minetest.get_current_modname())
|
|
|
|
else
|
|
|
|
S = function ( s ) return s end
|
|
|
|
end
|
|
|
|
|
2015-04-22 21:17:21 +02:00
|
|
|
local function GetNoiseParams()
|
|
|
|
return {
|
|
|
|
scale=1, offset=0, seed=rocksl.GetNextSeed(), octaves=1, persist=1,
|
|
|
|
spread={ x=100, y=100, z=100 } }
|
|
|
|
end
|
|
|
|
|
2015-04-20 15:25:56 +02:00
|
|
|
mineral={}
|
|
|
|
mineral.noise={}
|
|
|
|
|
|
|
|
local print=function(text)
|
|
|
|
minetest.log("info","/mineral "..text)
|
|
|
|
end
|
|
|
|
|
|
|
|
local modpath=minetest.get_modpath(minetest.get_current_modname())
|
|
|
|
|
2015-04-22 21:17:21 +02:00
|
|
|
mineral.noise.Copper=GetNoiseParams()
|
|
|
|
mineral.noise.PbZn=GetNoiseParams()
|
|
|
|
mineral.noise.Iron=GetNoiseParams()
|
|
|
|
mineral.noise.Tin=GetNoiseParams()
|
|
|
|
|
2015-04-20 15:25:56 +02:00
|
|
|
dofile(modpath.."/skarn.lua")
|
2015-04-22 21:19:35 +02:00
|
|
|
dofile(modpath.."/pegmatite.lua")
|
2015-04-20 15:25:56 +02:00
|
|
|
|