Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove PlayerAction type handlers #11

Merged
merged 4 commits into from
Aug 10, 2019

Conversation

eviltak
Copy link
Member

@eviltak eviltak commented Jul 30, 2019

The changes in MovingBlocks/Terasology#3535 have made the existing type handlers of PlayerAction and its implementations obsolete. This PR removes those TypeHandlers since their functionality is already present in the new serialization system.

This does lead to a slight change in format of their serialization, however. The type of all PlayerActions must be specified in a class field, not a type field as was before. Moreover, when being used outside the Dialogs module, the type specified must contain the Dialogs module name in its URI.

As an example, a usage of ChangeDialogAction in the LightAndShadow module would change from

{
    "type": "ChangeDialogAction",
    "prefab": "somePrefab"
}

to

{
    "class": "Dialogs:ChangeDialogAction",
    "prefab": "somePrefab"
}

A PlayerActionSerializationTest test class has also been added containing tests asserting the format in which PlayerActions are serialized.

Should only be merged after the engine PR has been merged.

Resolves #8.

@Cervator Cervator merged commit 8608402 into Terasology:master Aug 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fixes for new Terasology serialization system (engine PR 3535)
2 participants