3
9
Fork
You've already forked farming
14

Don't assume every "default" has "dirt_with_dry_grass" #7

Closed
opened 2024年03月28日 12:14:10 +01:00 by rudzik8 · 1 comment

Hello.

I'm opening this issue because of line 26 in soil.lua:

minetest.override_item("default:dirt_with_dry_grass", {

You see, the default mod in Voxelgarden didn't have that node before (now it does, but that commit is still yet to be included in a stable release), and thus adding Farming Redo to a VG world resulted in a crash, as Minetest doesn't allow overriding non-existent items.

You could argue that this is more of a Voxelgarden issue than Farming Redo issue, but I'm pretty sure that there are more default implementations that might lack this node, as it doesn't generate naturally and is seemingly completely useless and an easy goal for removal. It would be nice if you put a check for whether "default:dirt_with_dry_grass" exists, and only attempt to override it if it does.

Hello. I'm opening this issue because of [line 26 in soil.lua](https://codeberg.org/tenplus1/farming/src/branch/master/soil.lua#L26): ```lua minetest.override_item("default:dirt_with_dry_grass", { ``` You see, the `default` mod in [Voxelgarden](https://codeberg.org/voxelgarden/voxelgarden) didn't have that node before ([now it does](https://codeberg.org/voxelgarden/voxelgarden/commit/6f1d41d1fa490af7f088a2a4c3d1d20130f75e34), but that commit is still yet to be included in a stable release), and thus adding Farming Redo to a VG world resulted in a crash, as Minetest doesn't allow overriding non-existent items. You could argue that this is more of a Voxelgarden issue than Farming Redo issue, but I'm pretty sure that there are more `default` implementations that might lack this node, as it doesn't generate naturally and is seemingly completely useless and an easy goal for removal. It would be nice if you put a check for whether `"default:dirt_with_dry_grass"` exists, and only attempt to override it if it does.

That's the whole point of being 'default' compatible is having the nodes available for use, even if it's just an alias. I have added a check for default:dirt_with_dry_grass to help with the VoxelGarden issue.

That's the whole point of being 'default' compatible is having the nodes available for use, even if it's just an alias. I have added a check for default:dirt_with_dry_grass to help with the VoxelGarden issue.
Sign in to join this conversation.
No Branch/Tag specified
master
No results found.
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tenplus1/farming#7
Reference in a new issue
tenplus1/farming
No description provided.
Delete branch "%!s()"

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?