mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-09-12 08:42:10 +02:00
These changes are primarly made to make mcl_autogroup more efficient. Previously enchanted tools required storing around 21 kB of metadata due to the way the previous version of the mod was implemented. This caused a lot of lag and a huge amount of network traffic. With the changes enchanted tools won't require more than 1 kB of metadata. The mod is also rewritten to use an API to register digging groups and compute the groupcaps for tools. This will make it easier for modders to register custom digging groups. The mod is now split up into two parts. One part called "mcl_autogroup" to implement the API for registering custom digging groups, and the other part called "_mcl_autogroup" which contains most of the code which has to be loaded after most mods.
29 lines
1.2 KiB
Lua
29 lines
1.2 KiB
Lua
mcl_core = {}
|
|
|
|
-- Repair percentage for toolrepair
|
|
mcl_core.repair = 0.05
|
|
|
|
mcl_autogroup.register_digtime_group("handy")
|
|
mcl_autogroup.register_digtime_group("pickaxey", { levels = 5 })
|
|
mcl_autogroup.register_digtime_group("axey")
|
|
mcl_autogroup.register_digtime_group("shovely")
|
|
mcl_autogroup.register_digtime_group("shearsy")
|
|
mcl_autogroup.register_digtime_group("shearsy_wool")
|
|
mcl_autogroup.register_digtime_group("shearsy_cobweb")
|
|
mcl_autogroup.register_digtime_group("swordy")
|
|
mcl_autogroup.register_digtime_group("swordy_cobweb")
|
|
mcl_autogroup.register_digtime_group("creative_breakable")
|
|
|
|
-- Load files
|
|
local modpath = minetest.get_modpath("mcl_core")
|
|
dofile(modpath.."/functions.lua")
|
|
dofile(modpath.."/nodes_base.lua") -- Simple solid cubic nodes with simple definitions
|
|
dofile(modpath.."/nodes_liquid.lua") -- Liquids
|
|
dofile(modpath.."/nodes_cactuscane.lua") -- Cactus and sugar canes
|
|
dofile(modpath.."/nodes_trees.lua") -- Tree nodes: Wood, Planks, Sapling, Leaves
|
|
dofile(modpath.."/nodes_glass.lua") -- Glass
|
|
dofile(modpath.."/nodes_climb.lua") -- Climbable nodes
|
|
dofile(modpath.."/nodes_misc.lua") -- Other and special nodes
|
|
dofile(modpath.."/craftitems.lua")
|
|
dofile(modpath.."/crafting.lua")
|