diff --git a/mods/CORE/_mcl_autogroup/API.md b/mods/CORE/_mcl_autogroup/API.md deleted file mode 100644 index 36945ee3c..000000000 --- a/mods/CORE/_mcl_autogroup/API.md +++ /dev/null @@ -1,9 +0,0 @@ -### Functions - -`mcl_autogroup.group_compatibility(groups, node_def)` - -Adds VoxeLibre-equivalent groups to `node_def.groups`. - -Arguments: -* `groups` - A list of groups to add compatiblity groups for. Normally this is a copy of `node_def.groups`. -* `node_def` - The node defintion to update groups for. diff --git a/mods/CORE/mcl_autogroup/API.md b/mods/CORE/mcl_autogroup/API.md index f95516882..d851b0f90 100644 --- a/mods/CORE/mcl_autogroup/API.md +++ b/mods/CORE/mcl_autogroup/API.md @@ -1,28 +1,34 @@ -# mcl_autogroup +# `mcl_autogroup` This mod emulates digging times from MC. -## mcl_autogroup.can_harvest(nodename, toolname, player) +## `mcl_autogroup.can_harvest(nodename, toolname, player)` Return true if `nodename` can be dig with `toolname` by . + * nodename: string, valid nodename * toolname: (optional) string, valid toolname * player: (optinal) ObjectRef, valid player -## mcl_autogroup.get_groupcaps(toolname, efficiency) +## `mcl_autogroup.get_groupcaps(toolname, efficiency)` This function is used to calculate diggroups for tools. WARNING: This function can only be called after mod initialization. * toolname: string, name of the tool being enchanted (like "mcl_tools:diamond_pickaxe") * efficiency: (optional) integer, the efficiency level the tool is enchanted with (default 0) -## mcl_autogroup.get_wear(toolname, diggroup) +## `mcl_autogroup.get_wear(toolname, diggroup)` Return the max wear of `toolname` with `diggroup` WARNING: This function can only be called after mod initialization. * toolname: string, name of the tool used * diggroup: string, the name of the diggroup the tool is used on -## mcl_autogroup.register_diggroup(group, def) +## `mcl_autogroup.register_diggroup(group, def)` * group: string, name of the group to register as a digging group * def: (optional) table, table with information about the diggroup (defaults to {} if unspecified) * level: (optional) string, if specified it is an array containing the names of the different digging levels the digging group supports -## mcl_autogroup.registered_diggroups +## `mcl_autogroup.registered_diggroups` List of registered diggroups, indexed by name. + +## `mcl_autogroup.group_compatibility(groups, node_def)` +Adds VoxeLibre-equivalent groups to `node_def.groups`. +* `groups` - A list of groups to add compatiblity groups for. Normally this is a copy of `node_def.groups`. +* `node_def` - The node defintion to update groups for.