@quenty/saveslot 2.7.1 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/package.json +4 -4
- package/src/Client/SaveSlotServiceClient.lua +1 -0
- package/src/Server/Binders/HasSaveSlots.ExportImport.spec.lua +1 -1
- package/src/Server/Binders/HasSaveSlots.SharedStore.spec.lua +37 -0
- package/src/Server/Binders/HasSaveSlots.TransferableEphemeral.spec.lua +92 -12
- package/src/Server/Binders/HasSaveSlots.lua +169 -1010
- package/src/Server/Binders/HasSaveSlots.spec.lua +10 -10
- package/src/Server/Cmdr/SaveSlotCmdrService.lua +565 -318
- package/src/Server/Cmdr/SaveSlotCmdrService.spec.lua +420 -0
- package/src/Server/HasSaveSlotsDataStore.lua +1658 -0
- package/src/Server/OfflineSaveSlots.lua +170 -0
- package/src/Server/OfflineSaveSlots.spec.lua +174 -0
- package/src/Server/SaveSlotService.lua +64 -2
- package/src/Shared/Cmdr/SaveSlotCmdrUtils.lua +206 -2
- package/src/Shared/Cmdr/SaveSlotCmdrUtils.spec.lua +68 -1
- package/src/Shared/SaveSlotExportUtils.lua +65 -1
- package/src/Shared/SaveSlotExportUtils.spec.lua +36 -0
|
@@ -434,7 +434,7 @@ describe("HasSaveSlots against a fake player (healthy datastore)", function()
|
|
|
434
434
|
end)
|
|
435
435
|
|
|
436
436
|
it("deleting the last-active slot clears the continue pointer", function()
|
|
437
|
-
-- Repro for the `delete
|
|
437
|
+
-- Repro for the `saveslot-delete *` bug: deleting the (deselected) active slot left
|
|
438
438
|
-- LastActiveSlotId dangling, so the menu kept offering "Continue" for a slot that was gone.
|
|
439
439
|
local context = setup()
|
|
440
440
|
|
|
@@ -766,7 +766,7 @@ describe("HasSaveSlots against a fake player (healthy datastore)", function()
|
|
|
766
766
|
end
|
|
767
767
|
local _, slotId = createPromise:Yield()
|
|
768
768
|
|
|
769
|
-
local tracker: any = context.hasSaveSlots
|
|
769
|
+
local tracker: any = context.hasSaveSlots:GetSlotsDataStore()
|
|
770
770
|
tracker:_getSlotStore(slotId):Store("Coins", 500)
|
|
771
771
|
|
|
772
772
|
local duplicatePromise = context.hasSaveSlots:PromiseDuplicateSlot(slotId)
|
|
@@ -811,7 +811,7 @@ describe("HasSaveSlots against a fake player (healthy datastore)", function()
|
|
|
811
811
|
end
|
|
812
812
|
local _, slotId = createPromise:Yield()
|
|
813
813
|
|
|
814
|
-
local tracker: any = context.hasSaveSlots
|
|
814
|
+
local tracker: any = context.hasSaveSlots:GetSlotsDataStore()
|
|
815
815
|
tracker:_getSlotStore(slotId):Store("Coins", 750)
|
|
816
816
|
|
|
817
817
|
local duplicatePromise = context.hasSaveSlots:PromiseDuplicateSlot(slotId)
|
|
@@ -882,7 +882,7 @@ describe("HasSaveSlots against a fake player (healthy datastore)", function()
|
|
|
882
882
|
end
|
|
883
883
|
selectPromise:Yield()
|
|
884
884
|
|
|
885
|
-
local tracker: any = context.hasSaveSlots
|
|
885
|
+
local tracker: any = context.hasSaveSlots:GetSlotsDataStore()
|
|
886
886
|
tracker:_getSlotStore(slotId):Store("Coins", 500)
|
|
887
887
|
|
|
888
888
|
local resetPromise = context.hasSaveSlots:PromiseResetActiveSlot()
|
|
@@ -944,7 +944,7 @@ describe("HasSaveSlots against a fake player (healthy datastore)", function()
|
|
|
944
944
|
end
|
|
945
945
|
selectPromise:Yield()
|
|
946
946
|
|
|
947
|
-
local tracker: any = context.hasSaveSlots
|
|
947
|
+
local tracker: any = context.hasSaveSlots:GetSlotsDataStore()
|
|
948
948
|
tracker:_getSlotStore(slotId):Store("Coins", 750)
|
|
949
949
|
|
|
950
950
|
local resetPromise = context.hasSaveSlots:PromiseResetActiveSlot()
|
|
@@ -1016,7 +1016,7 @@ describe("HasSaveSlots against a fake player (healthy datastore)", function()
|
|
|
1016
1016
|
end
|
|
1017
1017
|
local _, targetSlotId = targetPromise:Yield()
|
|
1018
1018
|
|
|
1019
|
-
local tracker: any = context.hasSaveSlots
|
|
1019
|
+
local tracker: any = context.hasSaveSlots:GetSlotsDataStore()
|
|
1020
1020
|
tracker:_getSlotStore(targetSlotId):Store("Coins", 500)
|
|
1021
1021
|
|
|
1022
1022
|
local resetPromise = context.hasSaveSlots:PromiseResetSlot(targetSlotId)
|
|
@@ -1215,7 +1215,7 @@ describe("HasSaveSlots playtime tracking", function()
|
|
|
1215
1215
|
|
|
1216
1216
|
-- Rewind the live session's clock so a flush observes ~120s elapsed without waiting on it. The
|
|
1217
1217
|
-- flush adds now - lastFlush, so the total is >= 120 (real time may nudge it a second higher).
|
|
1218
|
-
local tracker: any = context.hasSaveSlots
|
|
1218
|
+
local tracker: any = context.hasSaveSlots:GetSlotsDataStore()
|
|
1219
1219
|
tracker._playSessionStart = os.time() - 120
|
|
1220
1220
|
tracker._playSessionLastFlush = os.time() - 120
|
|
1221
1221
|
tracker:_flushPlaytime()
|
|
@@ -1230,7 +1230,7 @@ describe("HasSaveSlots playtime tracking", function()
|
|
|
1230
1230
|
it("does not accrue time before any slot is selected", function()
|
|
1231
1231
|
local context = setup()
|
|
1232
1232
|
|
|
1233
|
-
local tracker: any = context.hasSaveSlots
|
|
1233
|
+
local tracker: any = context.hasSaveSlots:GetSlotsDataStore()
|
|
1234
1234
|
tracker:_flushPlaytime()
|
|
1235
1235
|
|
|
1236
1236
|
local createPromise = context.hasSaveSlots:PromiseCreateSlot(1)
|
|
@@ -1251,7 +1251,7 @@ describe("HasSaveSlots playtime tracking", function()
|
|
|
1251
1251
|
|
|
1252
1252
|
local slotId = createAndSelect(context, 1)
|
|
1253
1253
|
|
|
1254
|
-
local tracker: any = context.hasSaveSlots
|
|
1254
|
+
local tracker: any = context.hasSaveSlots:GetSlotsDataStore()
|
|
1255
1255
|
tracker._playSessionStart = os.time() - 120
|
|
1256
1256
|
tracker._playSessionLastFlush = os.time() - 120
|
|
1257
1257
|
tracker:_flushPlaytime()
|
|
@@ -1280,7 +1280,7 @@ describe("HasSaveSlots playtime tracking", function()
|
|
|
1280
1280
|
local slotId = createAndSelect(context, 1)
|
|
1281
1281
|
|
|
1282
1282
|
-- Rewind the live session's clock so the duplicate observes ~120s that no flush has written yet.
|
|
1283
|
-
local tracker: any = context.hasSaveSlots
|
|
1283
|
+
local tracker: any = context.hasSaveSlots:GetSlotsDataStore()
|
|
1284
1284
|
tracker._playSessionStart = os.time() - 120
|
|
1285
1285
|
tracker._playSessionLastFlush = os.time() - 120
|
|
1286
1286
|
|