Open Lazerbeak12345 opened 1 year ago
Proposals/PR's welcome :+1:
Early draft API proposal:
A few new functions, place on the armor
table and exact names are TBD
armor.register_chestplate_recepie("diamond", armor.materials.diamond)
)armor.register_standard_recepies("diamond", armor.materials.diamond
)For exceptions like the two wooden shields, using only the abstractions above would be a bad idea. They should use the current API for recipe exceptions.
The registration function for shield crafting should be owned by the shields
mod. The sheilds mod could perhaps override the "standard recipes" function to also register a shield. Alternatively, a data-oriented approach could be taken, and the "standard recipes" function could determine what functions to call via a list of function references stored in an accessible place.
Recipe names will be the most difficult part if the API is to work for 3rd party armor mods.
It seems all code with @section craft has a lot of duplicative behavior shared with (virtually) all armor.
uh, before i forget: make sure to don't mess up the docs if possible: https://minetest-mods.github.io/3d_armor/reference/topics/helmets.html
In https://github.com/minetest-whynot/whynot-game/pull/170#discussion_r1372463656
(This issue is not blocking that pull request).
A few arguments for this:
Problem:
I don't know where the function would go, or what it would and wouldn't cover.
Requirements