Skip to content

Expand Data Attachment Copy Handler to Capture Context #2483

@ChampionAsh5357

Description

@ChampionAsh5357

Currently, the IAttachmentCopyHandler allows holders to copy their attachments on player clone, living conversion, or chunk promotion; taking in the attachment to copy, the holder, and the registries. This is useful if the same copy handler can be used for every context, but sometimes, there may be differing behavior.

For example, let's say I have a data attachment on the player that keeps track of skill levels, and that on death, I want the skill experience to deplete slightly. The copy handler is non-viable in this instance, and I have to not copy on death, implement PlayerEvent.Clone myself, and then transfer the data. While this is reasonable, it would be nice if this could all be implemented in the builder itself given its already partial support.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew (or improvement to existing) feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions