Skip to content

Userdata components#1012

Open
miyucomics wants to merge 9 commits intoFallingColors:mainfrom
miyucomics:component-userdata
Open

Userdata components#1012
miyucomics wants to merge 9 commits intoFallingColors:mainfrom
miyucomics:component-userdata

Conversation

@miyucomics
Copy link
Contributor

Makes the userData NBT compound tag inside CastingImages into a typed component system. Components are deserialized once along with the rest of the image—referring to its component type to determine how to deserialize—and they are serialized once along with the rest of the image.

This would prevent a large deal of unneeded serialization and deserialization for the ravenmind and features in addons that may take a long time to serialize and deserialize by only doing them once and working on a copy in memory. There has been reported massive slowdowns with the ravenmind in hexes that need to iterate often, and from my testing, this seems to have fixed it.

Also adds the concept of a transient component, which disappears when the 'cast' it is created in—from start to when the continuation queue empties at the end of queueAndExecuteIotas right before the casting environment postCast callback—ends. This fixes unintuitive behavior such as the +1 tax for impulses on the single entity persisting for the entire duration of a spell circle or staff cast, which can stick around arbitrarily long. Now, the jump between slates and right after a pattern is drawn, transient components are cleared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 📋 Backlog

Development

Successfully merging this pull request may close these issues.

1 participant