Skip to content

namespace clash with built-in farming mod in 0.4.16 #28

@mikyra

Description

@mikyra

Unfortunately the mod doesn't follow conventions placing its data and functions not in a table corresponding to the module name (aka farming_plus), but in the table farming.

Leading to a clash with the built-in farming mod shipped with 4.016.

Well, to be percise there is even two clashes.
One with the field farming.registered_plants that gets happily reset to {} by the farming_plus mod.
Not a big deal as the built-in farming mod never makes use of it.

Worse is the clash with the function farming.place_seed() as this one is really needed by the built-in farming mod, but happily gets overwritten by the version shipped with farming_plus.
As an effect neither wheat nor cotton will grow if farming_plus is used.

IMHO data and functions of the mod should really, really live in the namespace (aka table) farming_plus to A) fix the current issue B) prevent future problems like this one.

To verify the named function really is the culprit I ran a quick 'sed -i s/place_seed/FIXME_place_seed/g' over the lua files of the mod.
Wheat is growing again after that operation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions