mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-20 05:16:24 -04:00
make save_slot_written update current slot id
This commit is contained in:
@@ -372,6 +372,11 @@ void onSaveLoaded(ModContext*, uint32_t, void*) {
|
||||
loadAncientDocumentNum();
|
||||
}
|
||||
|
||||
void onSaveWritten(ModContext*, uint32_t, void*) {
|
||||
const std::string hash = randomizer_GetContext().mHash;
|
||||
svc_mng.save->set_blob(svc_mng.mod_ctx, kSeedHashBlobName, hash.data(), hash.size());
|
||||
}
|
||||
|
||||
ModResult initialize(const ServiceManager& services) {
|
||||
svc_mng = services;
|
||||
|
||||
@@ -379,7 +384,7 @@ ModResult initialize(const ServiceManager& services) {
|
||||
svc_mng.mod_ctx,
|
||||
onNewSave,
|
||||
onSaveLoaded,
|
||||
nullptr,
|
||||
onSaveWritten,
|
||||
nullptr,
|
||||
&s_save_observer);
|
||||
if (rt != MOD_OK) {
|
||||
|
||||
@@ -200,6 +200,7 @@ void save_slot_written(uint32_t slot, const void* slotData) {
|
||||
store.snapshotCrc = utils::crc32(slotData, kQuestLogSize);
|
||||
}
|
||||
flush_sidecar();
|
||||
s_currentSlot = static_cast<int32_t>(slot);
|
||||
notify(slot, &SaveObserverRecord::onWritten, "save-written");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user