3 Commits

Author SHA1 Message Date
Dan Albert
c80e5b259f Allow save compat to exist for two versions.
We want to clean up eventually, but allowing it to exist in both develop
and the release branch makes cherry picks easier.
2023-05-25 22:35:50 -07:00
Dan Albert
8c2e25339f More Python 3.10 compat. 2021-11-21 11:30:39 -08:00
Dan Albert
cd558daf5a Add decorator for tracking save compat.
Used to decorate functions or methods that have save compat code for a
given major version.

```
@has_save_compat_for(5)
def foo() -> None:
    ...
```

This function will raise an error at startup if it is decorated as
having save compat for a version other than the current major version of
the game. A new major version is the definition of a save compat break,
so keeping around the old compat code serves no purpose other than
hiding initialization bugs. The compat code and the decorator should be
removed in the branch raising the error.
2021-07-12 13:44:49 -07:00