Idofront
Idofront copied to clipboard
feat(items): SerializableItemStack extension system
We're starting to want support for serializing items generated by other plugins. An extension system would help us keep the main module clean while letting us or other authors add custom steps.
We can use polymorphic serialization to let people add their own subclasses that describe extra steps to make the item, the end result in config would look something like
type: STONE
extra:
- !<geary_prefab> "some:prefab"
Where the list of extras is processed once we convert to ItemStack.
Targetting just yaml, it should be possible to allow extending by decoding yaml nodes fairly easily, would be nice to have an api for this still though.