OpenFodder / openfodder

Open Fodder: An open source port of Cannon Fodder
http://openfodder.com
GNU General Public License v3.0
457 stars 42 forks source link

Saving twice with the same name leads to 2 separate save files #86

Open tremby opened 6 months ago

tremby commented 6 months ago

Describe the bug If I save with the same name a second time, I get 2 separate save files with the same name.

To Reproduce Steps to reproduce the behavior:

  1. Save game as "abc"
  2. Save game again as "abc"
  3. Go to "load"
  4. See multiple files called "abc"

Expected behavior Either an error ("file already exists" or something, maybe with the option to cancel or overwrite), or just silently overwriting the same file.

Screenshots

Desktop (please complete the following information):

Additional context If it's expected that there can be many saves with the same name, having the date/time on them would be helpful.

segrax commented 6 months ago

Not really sure if this should be classified as a bug or not, as its deliberate and comes from adding support for CF1/2/Demos, but probably also unexpected in the same campaign to have multiple saves with the same name. Adding date/time isn't really feasible due to limitations in screen space

Guess some code that loops all save games and looks for existing saves with the entered name is probably whats needed here