Skip to content

feat: Save slots#692

Open
alex-y-z wants to merge 11 commits into
mainfrom
users/alex-y-z/save-slots
Open

feat: Save slots#692
alex-y-z wants to merge 11 commits into
mainfrom
users/alex-y-z/save-slots

Conversation

@alex-y-z
Copy link
Copy Markdown
Collaborator

PlayerDataStoreService wrapper for save slots.

Provides an interface for creating, manipulating, and observing slots such that consumers can seamlessly react to slot switching.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 12, 2026

Test Results

Package Status Try it
@quenty/permissionprovider ✅ Passed (2/2) (1.6s) Open | Play
@quenty/chatproviderservice ✅ Passed (3/3) (2.4s) Open | Play
@quenty/cmdrservice ✅ Passed (1.4s) Open | Play
@quenty/gameconfig ✅ Passed (2.1s) Open | Play
@quenty/gameproductservice ✅ Passed (2.1s) Open | Play
@quenty/secrets ✅ Passed (2/2) (2.0s) Open | Play
@quenty/settings ✅ Passed (5/5) (2.3s) Open | Play
@quenty/settings-inputkeymap ✅ Passed (1/1) (2.1s) Open | Play

8 tested, 8 passed, 0 failed in 22.5s · View logs

Deploy Results

Package Status Try it
@quenty/integration ✅ Deployed (v62) (1.6s) Open | Play

1 deployed, 1 passed, 0 failed in 2.4s · View logs

Comment thread src/saveslot/src/Server/Binders/HasSaveSlots.lua Outdated
Comment thread src/saveslot/src/Server/SaveSlotService.lua Outdated
Comment thread src/saveslot/src/Shared/HasSaveSlotsInterface.lua
Comment thread src/saveslot/src/Shared/HasSaveSlotsInterface.lua
Copy link
Copy Markdown
Owner

@Quenty Quenty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall. Left a ton of comments.

Comment thread src/saveslot/src/Client/Binders/HasSaveSlotsClient.lua Outdated
Gets the last active slot ID
]=]
function HasSaveSlotsClient.PromiseLastActiveSlotId(self: HasSaveSlotsClient): Promise.Promise<string?>
return self._remoting.PromiseLastActiveSlotId:PromiseInvokeServer()
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth some fancier cache management, potentially internally a Boolean attribute for loaded and an attribute for the slot id, so that we're effectively cached on the client instead of requesting server a lot.

This will happen on initial game load, potentially many systems may promise the slot id.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it would be cleaner for the client to wait for the slots to be replicated, then we can do most of the remote queries synchronously from the data model.

Comment thread src/saveslot/src/Client/Binders/HasSaveSlotsClient.lua Outdated
Comment thread src/saveslot/src/Server/Binders/HasSaveSlots.lua Outdated
local data = {
SlotId = slotId,
SlotIndex = slotIndex,
SlotName = (metadata and metadata.SlotName) or `Slot {slotIndex}`,
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should maybe rename to UnfilteredSlotName so we remember to filter the text.

Maybe not a big deal though.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to filter a string that will not be shown to anyone but the originating user?

slotId: string,
data: SaveSlotData.SaveSlotMetadata
): Promise.Promise<any>
if data.SlotId and (data.SlotId ~= slotId) then
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just use SaveSlotData:IsStrictData() call here to fully check and get a good error message.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this check would still be needed to prevent accidental override of the immutable slot ID.

Comment thread src/saveslot/src/Server/Binders/HasSaveSlots.lua Outdated
Comment thread src/saveslot/src/Server/Cmdr/SaveSlotCmdrService.lua Outdated
@alex-y-z alex-y-z deployed to integration May 29, 2026 04:47 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants