-
Notifications
You must be signed in to change notification settings - Fork 160
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
Script API: in FillSaveGameList() accept a range of slots #2289
Script API: in FillSaveGameList() accept a range of slots #2289
Conversation
bbf4894
to
f562338
Compare
... because what if the game only uses autosaves?
This is related to #816 (I think) |
It is related, but the #816 was about solving this when running already existing games without rescripting them. This pr only lets game authors to show more in their games. There may have to be a separate change to let override this limit in existing games. From my comment in that issue:
I might actually add the config option which hacks this number for testing / running old games, which will likely be enough to close #816. |
Not sure if we need another hack for changing old things, if it's working as is, it's fine, better to look into the future - less options are less surface for bugs. |
I am speaking of running old games with the backwards compatible engine. Ags 4 does not have to have this. |
I am actually going to suspend this, so converted to draft for the time being. While the change to FillSaveGameList itself is really trivial, the consequence is that people may use any arbitrary range of saves.
See commit: 8e07fcd If I allow to list any arbitrary range of saves in the listbox, then this behavior must also be either adjusted or removed. EDIT: frankly, reading DeleteSaveSlot description again, makes me doubt if it's much useful at all, since it does not shift all the slots down, but only takes 1 topmost one and moves it to the gap. And that does not guarantee filling empty slots appearing after manual save file deletion. *I know that saves may also be manipulated using a File api, and probably some do that; but I am not certain if that's a good thing, it's more of a hack, since "save slot" is a special item in script api, having their own dedicated functions. So maybe it's not wise to rely on raw File commands. |
I might remake this PR for ags4 instead, and later see if that is safe to backport or anything for some tiny 3.6 update. EDIT: ags4 pr: #2293 |
Implemented in ags4 by #2293. This may be later backported to ags3 branch if really wanted. |
I don't like adding "last minute" things to an upcoming release, but this request seemed easy enough to try.
Historically FillSaveGameList has a hardcoded range of 0 to 99 slots, and for some reason also additionally limits total shown slots to 50 items. This change lets user to tell which range of slots to fill, and removes item count limit, because it makes no sense anymore.
Backwards compatibility
Old compiled games will be using same old range (0-99) and 50 items limit.