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

Handle SimpleSpawner compatibility #290

Merged
merged 2 commits into from
Oct 28, 2024
Merged

Handle SimpleSpawner compatibility #290

merged 2 commits into from
Oct 28, 2024

Commits on Oct 25, 2024

  1. serialization: Handle renamed blocks and arguments

    If a block or its arguments has been renamed, loading a scene with the
    old block name will fail and the user will be required to replace the
    block. Handle renamed blocks and arguments by migrating the names to the
    new values in the serialization resources. In order for the setters to
    run in the editor, the classes need to be tool scripts.
    
    https://phabricator.endlessm.com/T35547
    dbnicholson committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    4793b69 View commit details
    Browse the repository at this point in the history
  2. SimpleSpawner: Add spawn_frequency migration

    Renaming the spawn_frequency properties and blocks will break any
    existing scene since those are serialized. Migrate the spawn_frequency
    property by providing it as an additional unstored property that simply
    wraps spawn_period. Migrate the block names and arguments using the
    serialization renaming support from the previous commit. A test using a
    scene created before the renaming is provided to verify the migration.
    
    While this does not handle the worst compatibility breakage, it can be
    used as a model for other migrations. Note that the migration stub in
    MainPanel is likely too late for any legitimate fixes. Any migration
    likely needs to happen when the scene is loaded and instantiated, which
    is before MainPanel gets a hold of the objects.
    
    https://phabricator.endlessm.com/T35547
    dbnicholson committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    6191c88 View commit details
    Browse the repository at this point in the history