3d_armor
3d_armor copied to clipboard
[Feature]: Reduce duplicative code around craft recepies
In https://github.com/minetest-whynot/whynot-game/pull/170#discussion_r1372463656
It seems all code with
@section craft
has a lot of duplicative behavior shared with (virtually) all armor. The license isn't compatible, but I've seen that Instant Ores does this in a better way, by making a function for this. Edge cases would be best served the way this code is currently written, with abstractions for the most common cases.
(This issue is not blocking that pull request).
A few arguments for this:
- Less code is less bugs
- Less code is less work to maintain
- Less code is less code to update when changes happen.
- A lot of this code is actually documentation. It's nearly (if not exactly the same) across all of them, and could be unified to one place.
- Edge cases can still be done alongside the conventional function call.
- A lot of different armor mods outside of this modpack could make great use of this new API.
Problem:
I don't know where the function would go, or what it would and wouldn't cover.
Requirements
- [ ] Docs must still work https://github.com/minetest-mods/3d_armor/issues/118#issuecomment-1783761304