Closed S-S-X closed 3 years ago
I think this is it and if wanted can be merged, should contain everything needed for usable API.
Bugs? Maybe. Did not tests everything. Registration function signature is done like minetest.register_node(nodename, data), other changes are mostly moving some hardcoded things from one place to another.
I could add itemdef.fieldname = data.fieldname or whatever_default_thing
but those can also be added later without breaking anything.
Not that many changes really, tests adds most of it. Excluding tests there's
3 files changed, 48 insertions(+), 42 deletions(-)
and 2 added lines are assertions guarding registration function.
Basic interface for #231
API is not complete but more like starting point, allows registering chests from outside and allows extending API without breaking compatibility. Few very simple automated tests included: