Fix indestructable blocks provided by mods #4285
No reviewers
Labels
No Label
#P1 CRITICAL
#P2: HIGH
#P3: elevated
#P4 priority: medium
#P6: low
#Review
annoying
API
bug
code quality
combat
commands
compatibility
configurability
contribution inside
controls
core feature
creative mode
delayed for engine release
documentation
duplicate
enhancement
environment
feature request
gameplay
graphics
ground content conflict
GUI/HUD
help wanted
incomplete feature
invalid / won't fix
items
looking for contributor
mapgen
meta
mineclone2+
Minecraft >= 1.13
Minecraft >= 1.17
missing feature
mobile
mobs
mod support
model needed
multiplayer
Needs adoption
needs discussion
needs engine change
needs more information
needs research
nodes
non-mob entities
performance
player
possible close
redstone
release notes
schematics
Skyblock
sounds
Testing / Retest
tools
translation
unconfirmed
mcl5
mcla
Media missing
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: VoxeLibre/VoxeLibre#4285
Loading…
Reference in New Issue
No description provided.
Delete Branch "teknomunk/MineClone2:fix-indestructable-blocks"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #4225
Adds default group of handy=1 to all blocks that don't have any registered diggable group registered unless the block is marked with a group of indestructible ~= 0 and translate MineTest Game groups to VoxeLibre groups where possible.
Testing
a. https://content.luanti.org/packages/GreenXenith/mesecons_wireless/
63fe4eca33
tod68787ea04
LGTM. Needs more actual mod tests.
Works, but a known MTG diggroup was missed.
@ -315,0 +316,4 @@
["choppy"] = "axey",
["oddly_breakable_by_hand"] = "handy",
["cracky"] = "pickaxey",
["crumbly"] = "shovely",
http://api.minetest.net/groups/#known-damage-and-digging-time-defining-groups
Suggestion:
Done.
Issue found
d68787ea04
to15701d44b2
15701d44b2
to025a96cfbe
@ -315,0 +320,4 @@
["snappy"] = "shearsy",
}
function mcl_autogroup.mod_compatibility(groups, ndef)
I think this function should be called
group_compatibility
, because that's exactly what it implements.Also, it should be documented in
CORE/mcl_autogroup/API.md
.Done.
@ -359,6 +396,7 @@ local function overwrite()
})
end
end
minetest.log("verbose","Total registered blocks: "..tostring(count))
Total registered nodes.
Also, doing
tostring
here shouldn't be necessary, Lua does that automatically on concatenation.Using
tostring()
is habit, and makes sure that regardless of what is in the variable it won't crash. I'll still change it here.@ -729,3 +729,3 @@
tiles = {"mcl_core_bedrock.png"},
stack_max = 64,
groups = {creative_breakable=1, building_block=1, material_stone=1},
groups = {creative_breakable=1, building_block=1, material_stone=1, indestructable=1},
I suppose this group is to be applied to all nodes that already have
creative_breakable=1
. Why just bedrock and not barriers and others?In any case, I don't think this change is welcome in terms of mod compatibility.
unbreakable=1
:db8459d07c/init.lua (L38)
indestructible=1
:13fd95be3b/init.lua (L42)
(notice the i instead of a)
unbreakable=1
:5f5d2aa3b2/init.lua (L23)
unbreakable=1
:b9cf7fb5fb/settings.lua (L97)
unbreakable=1
:b9e69b70c4/init.lua (L30)
unbreakable=1
:ca57fe7762/init.lua (L42)
I think it's obvious that
unbreakable
group wins here. We might just follow the standard.Somehow, barriers work properly with this too. I was surprised.
I've made it so that
unbeakable=1
andindestructable=1
behave the same way.The right English word for this is indestructible, with i.
1d076a57e1
to207a9da66f
5cbd3768f0
to7420c38dcc
@ -315,0 +325,4 @@
for name,_ in pairs(groups) do
local new_group = GROUP_MAP[name]
if new_group then
groups[new_group] = 1
Shouldn't it take the previous group value from the other group?
@ -315,0 +326,4 @@
local new_group = GROUP_MAP[name]
if new_group then
groups[new_group] = 1
node_def.groups[new_group] = 1
Here you're updating both
groups
andnode_def
. For consistency, only one should be used. Perhaps only one parameter should be taken by the function?Had to add
ndef.groups = newgroups
after adding the compatibility groups to make this work correctly.@ -315,0 +334,4 @@
end
if not grouped then
groups.handy = 1
Here you're updating only
groups
@ -7,2 +4,2 @@
* toolname: (optional) string, valid toolname
* player: (optinal) ObjectRef, valid player
## `mcl_autogroup.can_harvest(nodename, toolname, player)`
Return true if `nodename` can be dig with `toolname` by `player`.
dig -> dug while we're at it?
Also solve the merge conflicts
7420c38dcc
to3ce4eca9c0
Done. Working on fixing the remainder of the issues.
e2c917c9e7
tocc8c62211a
c0d2d73814
to1494d4a1bb
1494d4a1bb
to89f8fdc8cb
89f8fdc8cb
to59e7611eda
59e7611eda
to9146c0257f
Sooo, wanna test this to help out, but do you guys have any easy examples of "Mods that don't use VoxeLibre groups"? 👼
The mod that led me to making this in the first place is https://content.luanti.org/packages/GreenXenith/mesecons_wireless/
I can't use this mod, it says I'm missing "default" as a dependency.
Ah, that's right. I had to edit the mod to get it to work. I'll find more mods to test this with.