3
9
Fork
You've already forked farming
14

cucina_vegana doesn't register plants through the farming API when this mod is used #34

Closed
opened 2025年07月13日 17:44:32 +02:00 by camelia · 5 comments

Hi! First of all thanks for this incredible mod!

I believe that when this mod is loaded, it overwrites plants that were previously registered using the farming.register_plant function.

The problem is that some mods, such as cucina_vegana, use this API. I believe that this mod specifically is loaded before the farming mod, and that, once the farming redo mod is loaded, it overwrites previously registered plants.

This causes behavior reported in: camelia/farmtools#6.

However, I have no easy fix for this, since the farming.registered_plants is not available through the Lua API here. I think this could be fixed if there was a way to load this mod before any other one, but I'm still new to Luanti modding and I don't know if such an option exists.

Hi! First of all thanks for this incredible mod! I believe that when this mod is loaded, it overwrites plants that were previously registered using the `farming.register_plant` function. The problem is that some mods, such as [`cucina_vegana`](https://github.com/acmgit/cucina_vegana), use this API. I believe that this mod specifically is loaded before the farming mod, and that, once the farming redo mod is loaded, it overwrites previously registered plants. This causes behavior reported in: https://codeberg.org/camelia/farmtools/issues/6. However, I have no easy fix for this, since the `farming.registered_plants` is not available through the Lua API here. I think this could be fixed if there was a way to load this mod before any other one, but I'm still new to Luanti modding and I don't know if such an option exists.
Author
Copy link

hold on, maybe this is not the cause at all 🤔
maybe the problem comes from the cucina_vegana mod, and not this one. I'm troubleshooting and will let you know once I figure out the cause.

hold on, maybe this is not the cause at all 🤔 maybe the problem comes from the cucina_vegana mod, and not this one. I'm troubleshooting and will let you know once I figure out the cause.
Author
Copy link

okay, well my bad, it looks like the problem comes from the cucina_vegana mod and not this one. it seems that farming.register_plant is not called when the farming mod is redo, but that it is called when the farming mod is the default one.

sorry for the inconvenience, I will investigate and report to the correct repository.

okay, well my bad, it looks like the problem comes from the cucina_vegana mod and not this one. it seems that `farming.register_plant` is not called when the farming mod is redo, but that it is called when the farming mod is the default one. sorry for the inconvenience, I will investigate and report to the correct repository.

The cucina_vegana mod only has to use the default registered crops since Farming redo has a compatible API, I dont really know why the are registered differently.

The cucina_vegana mod only has to use the default registered crops since Farming redo has a compatible API, I dont really know why the are registered differently.

I've forked cucina_vegana to run on 5.x clients only and removed the need for _redo files if you wish to try it out.

https://codeberg.org/tenplus1/cucina_vegana

I've forked cucina_vegana to run on 5.x clients only and removed the need for _redo files if you wish to try it out. https://codeberg.org/tenplus1/cucina_vegana
Author
Copy link

Thank you very much! I can confirm that the mod I'm developing works as expected when using your fork :)

Thank you very much! I can confirm that the mod I'm developing works as expected when using your fork :)
camelia changed title from (削除) plants previously registered by mods using the farming API are overwritten when the mod is loaded (削除ここまで) to cucina_vegana doesn't register plants through the farming API when this mod is used 2025年07月14日 14:35:09 +02:00
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#34
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?