Document biome versions
[Pixture/pixture_revival.git] / mods / rp_default / init.lua
blob07a7efc751ecf407d73f04a7de3605bcdd2ea3c6
1 -- Use 'default' table for this mod as API
2 -- instead of 'rp_default' to not disrupt old mods
3 -- depending on this (before version 1.5.3) too much.
5 default = {}
7 default.SWAMP_WATER_VISC = 4
9 default.RIVER_WATER_VISC = 2
11 default.WATER_VISC = 1
13 default.LIGHT_MAX = 14
15 -- If a sapling is affected by fertilizer,
16 -- the growth timer is reduced by this
17 -- factor. E.g. if the timeout is 100s
18 -- and the factor is 0.1, the growth time
19 -- is reduced by 100s*0.1 = 10s.
20 default.SAPLING_FERTILIZER_TIME_BONUS_FACTOR = 0.1
22 minetest.nodedef_default.stack_max = 60
23 minetest.craftitemdef_default.stack_max = 60
26 --[[ This game uses biome versions to allow backwards-compability
27 of old maps. A biome version bump is neccessary whenever there's
28 a drastic change in biome heat/humidity point that would
29 lead to ugly discontinutities after a game update.
31 Version 1: Closest to the original Pixture game.
32 Official biomes till game version 2.1.0
33 Version 2: Major biome update introducing tons of new biomes and
34 removing the Desert and Gravel Beach. Introduced more
35 swamp biomes, swamp highland, dry land biomes, shrubbery,
36 oak forests, birch forests, "technical" ocean/beach biomes,
37 Underground biome, and much more.
38 Biome heat/humidity points of existing biomes had to be
39 completely updated.
40 Introduced in game version 3.0.0.
42 local LATEST_BIOME_VERSION = 2
43 local bv = minetest.get_mapgen_setting("rp_biome_version")
44 if bv then
45 default.biome_version = tonumber(default.biome_version)
46 end
47 if default.biome_version ~= 1 and default.biome_version ~= 2 then
48 default.biome_version = LATEST_BIOME_VERSION
49 end
50 minetest.log("action", "[rp_default] Mapgen: Using biome version "..default.biome_version)
52 dofile(minetest.get_modpath("rp_default").."/functions.lua")
54 dofile(minetest.get_modpath("rp_default").."/nodes.lua") -- simple nodes
55 dofile(minetest.get_modpath("rp_default").."/torch.lua")
56 dofile(minetest.get_modpath("rp_default").."/furnace.lua")
57 dofile(minetest.get_modpath("rp_default").."/container.lua") -- chest and bookshelf
58 dofile(minetest.get_modpath("rp_default").."/sign.lua")
59 dofile(minetest.get_modpath("rp_default").."/fence.lua")
60 dofile(minetest.get_modpath("rp_default").."/ladder.lua")
62 dofile(minetest.get_modpath("rp_default").."/craftitems.lua") -- simple craftitems
63 dofile(minetest.get_modpath("rp_default").."/bucket.lua")
64 dofile(minetest.get_modpath("rp_default").."/tools.lua")
65 dofile(minetest.get_modpath("rp_default").."/fertilizer.lua")
67 dofile(minetest.get_modpath("rp_default").."/crafting.lua")
68 dofile(minetest.get_modpath("rp_default").."/achievements.lua")
70 dofile(minetest.get_modpath("rp_default").."/mapgen_core.lua")
71 dofile(minetest.get_modpath("rp_default").."/mapgen_biomes_v"..default.biome_version..".lua")
72 dofile(minetest.get_modpath("rp_default").."/mapgen_ores.lua")
73 dofile(minetest.get_modpath("rp_default").."/mapgen_deco.lua")
75 dofile(minetest.get_modpath("rp_default").."/aliases.lua")