From c7bfc7a20e5f3371b8c57aad1b62199632c52922 Mon Sep 17 00:00:00 2001 From: teknomunk Date: Mon, 16 Sep 2024 06:10:59 -0500 Subject: [PATCH] Address review comments --- mods/CORE/_mcl_autogroup/init.lua | 9 ++++----- mods/CORE/mcl_autogroup/API.md | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/mods/CORE/_mcl_autogroup/init.lua b/mods/CORE/_mcl_autogroup/init.lua index 4cff9f511..5da2bf7d6 100644 --- a/mods/CORE/_mcl_autogroup/init.lua +++ b/mods/CORE/_mcl_autogroup/init.lua @@ -317,13 +317,12 @@ local GROUP_MAP = { ["snappy"] = "shearsy", } -function mcl_autogroup.group_compatibility(groups, node_def) +function mcl_autogroup.group_compatibility(groups) local grouped = false - for name,_ in pairs(groups) do + for name,old_group_value in pairs(groups) do local new_group = GROUP_MAP[name] if new_group then - groups[new_group] = 1 - node_def.groups[new_group] = 1 + groups[new_group] = old_group_value end if mcl_autogroup.registered_diggroups[name] then grouped = true @@ -350,7 +349,7 @@ local function overwrite() if not newgroups.unbreakable and not newgroups.indestructible then ndef.diggable = true - mcl_autogroup.group_compatibility(newgroups, ndef) + mcl_autogroup.group_compatibility(newgroups) if not ndef._mcl_hardness then ndef._mcl_hardness = 0 end diff --git a/mods/CORE/mcl_autogroup/API.md b/mods/CORE/mcl_autogroup/API.md index 4d045aa67..1e2636877 100644 --- a/mods/CORE/mcl_autogroup/API.md +++ b/mods/CORE/mcl_autogroup/API.md @@ -2,7 +2,7 @@ This mod emulates digging times from MC. ## `mcl_autogroup.can_harvest(nodename, toolname, player)` -Return true if `nodename` can be dig with `toolname` by `player`. +Return true if `nodename` can be dug with `toolname` by `player`. * `nodename`: string, valid nodename * `toolname`: (optional) string, valid toolname