Closed dk1a closed 1 month ago
Look great.
To make sure I understand correctly:
MaterialType
enum.materialID
to identify them (in recipes, orders etc...)Look great.
To make sure I understand correctly:
- We remove the hardcoded
MaterialType
enum.- Instead we register materials (at deploy or later) and use the
materialID
to identify them (in recipes, orders etc...)- When a player ships a user-created order we mint tokens of that material to the creator of the order.
Yep As opposed to enum, they will be easier to add and not limited to 255
great. feel free to proceed.
A general library for all material tokens I plan to continue in the next PR to make reviewing easier
Special cases like BUGS, which need to be hardcoded in some places, can use the init library's id, e.g.
PublicMaterials.BUGS
The idea is to addSeason1Materials
to the private repo with all the other mats, removing the enum in the process and replacingMaterialType
withMaterialId
everywhereI chose a nonstandard name for
PublicMaterials
due to it being an enum alternative, as well as an init lib, but feel free to ask for other names for anythingMaterialId
is meant to be equal to the token namespace for ease of identification (hence bytes14)t_BUG
- I mean to add little prefixes to minimize namespace conflicts, though maybe that's excessive