itsapi / pycraft

A Minecraft-inspired game for the terminal
GNU General Public License v2.0
197 stars 21 forks source link

Add save format checking #105

Closed geraintwhite closed 8 years ago

geraintwhite commented 8 years ago

Adds a format field to meta.json to make sure the save is compatible with the version of the game. Fixes #103

geraintwhite commented 8 years ago

Doesn't work properly because it updates the meta file with the defaults each time, and includes the error parameter. Also, load_meta is used for generating the saves list - so returning None caused that to break.

olls commented 8 years ago

So it only has problems with old saves which have been created before this code was added?

geraintwhite commented 8 years ago

In terms of the format field, yes. But the error field is also saved to file.

On Mon, 8 Feb 2016 23:13 Oliver Faircliff notifications@github.com wrote:

So it only has problems with old saves which have been created before this code was added?

— Reply to this email directly or view it on GitHub https://github.com/itsapi/pycraft/pull/105#issuecomment-181614642.

olls commented 8 years ago

Oh, I think we need a different way of sending the error through then.

geraintwhite commented 8 years ago

Yes, but we need to make sure it still works for saves list.