Merge pull request 'SmallJoker's mod load order patches' (#4541) from dependency_paradise into master

Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4541
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
This commit is contained in:
the-real-herowl 2024-09-15 22:25:44 +02:00
commit 6eb0d3c9d9
10 changed files with 20 additions and 14 deletions

View File

@ -117,10 +117,6 @@ end
-- Array of unique hardness values for each group which affects dig time. -- Array of unique hardness values for each group which affects dig time.
local hardness_values = get_hardness_values_for_groups() local hardness_values = get_hardness_values_for_groups()
-- Map indexed by hardness values which return the index of that value in
-- hardness_value. Used for quick lookup.
local hardness_lookup = get_hardness_lookup_for_groups(hardness_values)
--[[local function compute_creativetimes(group) --[[local function compute_creativetimes(group)
local creativetimes = {} local creativetimes = {}
@ -186,6 +182,7 @@ local function add_groupcaps(toolname, groupcaps, groupcaps_def, efficiency)
local mult = capsdef.speed or 1 local mult = capsdef.speed or 1
local uses = capsdef.uses local uses = capsdef.uses
local def = mcl_autogroup.registered_diggroups[g] local def = mcl_autogroup.registered_diggroups[g]
assert(def, toolname .. " has unknown diggroup '" .. dump(g) .. "'")
local max_level = def.levels and #def.levels or 1 local max_level = def.levels and #def.levels or 1
assert(capsdef.level, toolname .. ' is missing level for ' .. g) assert(capsdef.level, toolname .. ' is missing level for ' .. g)
@ -313,6 +310,13 @@ function mcl_autogroup.get_wear(toolname, diggroup)
end end
local function overwrite() local function overwrite()
-- Refresh, now that all groups are known.
hardness_values = get_hardness_values_for_groups()
-- Map indexed by hardness values which return the index of that value in
-- hardness_value. Used for quick lookup.
local hardness_lookup = get_hardness_lookup_for_groups(hardness_values)
for nname, ndef in pairs(minetest.registered_nodes) do for nname, ndef in pairs(minetest.registered_nodes) do
local newgroups = table.copy(ndef.groups) local newgroups = table.copy(ndef.groups)
if (nname ~= "ignore" and ndef.diggable) then if (nname ~= "ignore" and ndef.diggable) then
@ -374,4 +378,5 @@ local function overwrite()
end end
end end
overwrite() -- Make sure all tools and groups are registered
minetest.register_on_mods_loaded(overwrite)

View File

@ -1,3 +1,4 @@
name = _mcl_autogroup name = _mcl_autogroup
depends = mcl_autogroup
author = ryvnf author = ryvnf
description = VoxeLibre core mod which automatically adds groups to all items. Very important for digging times. description = VoxeLibre core mod which automatically adds groups to all items. Very important for digging times.

View File

@ -1,5 +1,5 @@
name = mobs_mc name = mobs_mc
author = maikerumine author = maikerumine
description = Adds Minecraft-like monsters and animals. description = Adds Minecraft-like monsters and animals.
depends = mcl_init, mcl_particles, mcl_mobs, mcl_wip, mcl_core, mcl_util depends = mcl_init, mcl_particles, mcl_mobs, mcl_wip, mcl_core, mcl_util, mcl_entity_invs
optional_depends = default, mcl_tnt, mcl_bows, mcl_throwing, mcl_fishing, bones, mesecons_materials, doc_items, mcl_worlds optional_depends = default, mcl_tnt, mcl_bows, mcl_throwing, mcl_fishing, bones, mesecons_materials, doc_items, mcl_worlds

View File

@ -1,4 +1,4 @@
name = mcl_void_damage name = mcl_void_damage
author = Wuzzy author = Wuzzy
description = Deal damage to entities stuck in the deep void description = Deal damage to entities stuck in the deep void
depends = mcl_worlds depends = mcl_worlds, mcl_spawn

View File

@ -1,4 +1,4 @@
name = mcl_death_messages name = mcl_death_messages
author = 4Evergreen4 author = 4Evergreen4
description = Shows messages in chat when a player dies. description = Shows messages in chat when a player dies.
depends = mcl_colors depends = mcl_colors, mcl_damage

View File

@ -1,4 +1,4 @@
name = mcl_title name = mcl_title
description = Add an API to add in HUD title description = Add an API to add in HUD title
depends = mcl_colors depends = mcl_colors, mcl_util
author = AFCMS author = AFCMS

View File

@ -1,3 +1,3 @@
name = mesecons_button name = mesecons_button
depends = mesecons depends = mesecons, mesecons_mvps
optional_depends = doc optional_depends = doc

View File

@ -1,3 +1,3 @@
name = mcl_crimson name = mcl_crimson
author = debiankaios, Exhale author = debiankaios, Exhale
depends = mcl_core, mcl_stairs, mobs_mc, mcl_util, mcl_dye, mcl_flowerpots depends = mcl_core, mcl_fences, mcl_stairs, mobs_mc, mcl_util, mcl_dye, mcl_flowerpots, mcl_doors

View File

@ -1,3 +1,3 @@
name = mcl_fences name = mcl_fences
depends = mcl_core, mcl_sounds depends = mcl_core, mcl_nether, mcl_sounds
optional_depends = doc, screwdriver optional_depends = doc, screwdriver

View File

@ -1,4 +1,4 @@
name = mcl_grindstone name = mcl_grindstone
author = TheRandomLegoBrick, ChrisPHP author = TheRandomLegoBrick, ChrisPHP
depends = mcl_experience, mcl_sounds depends = mcl_experience, mcl_formspec, mcl_sounds
description = Add block that disenchants tools and armour except for curses, and repairs two items of the same type it is also the weapon smith's work station. description = Add block that disenchants tools and armour except for curses, and repairs two items of the same type it is also the weapon smith's work station.