clintbellanger / flare

Free Libre Action Roleplaying Engine
http://clintbellanger.net/rpg/
GNU General Public License v3.0
166 stars 41 forks source link

Don't use 0 for power indexes. Remove useless checks for input data. #921

Closed igorko closed 12 years ago

igorko commented 12 years ago

This commit breaks savegame compatiblity. Though you can fix them manually. (Guess how ;) )

clintbellanger commented 12 years ago

To clarify, it means if you previously had Shoot on your action bar it's no longer there?

igorko commented 12 years ago

Yes. Also change all -1 from your actionbar to 0, otherwise game will crash.

clintbellanger commented 12 years ago

When reading in the action bar from save file, can we just issue a stderr warning if it's an invalid value and set that slot to id=0? That'll be better than crashing.

igorko commented 12 years ago

I don't think we need that hack. We are in alpha stage. Just think about this like about "I have changed my savegame and now it crashes." This code will be just trash, which will never be used after migrating to new saves. If we would have full featured game, it would be good for compatiblity. But atm we even don't have it.

clintbellanger commented 12 years ago

We'd rather never have the game crash. If someone is hacking their save game and puts an invalid power ID, we want to issue a warning and keep loading the game.

igorko commented 12 years ago

Ok, I'll add check.