From 4a12c79c5ceb2e11345db6f352d389c41f574dfd Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Tue, 30 Jul 2024 18:53:28 +0100 Subject: [PATCH] Saveload: Add SaveLoadStructHandler handler for post table header save --- src/sl/saveload.cpp | 1 + src/sl/saveload_types.h | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/sl/saveload.cpp b/src/sl/saveload.cpp index 8395dbec25..cd1addecc4 100644 --- a/src/sl/saveload.cpp +++ b/src/sl/saveload.cpp @@ -2440,6 +2440,7 @@ SaveLoadTableData SlTableHeader(const NamedSaveLoadTable &slt, TableHeaderSpecia std::unique_ptr handler = sld.struct_handler_factory(); sld.struct_handler = handler.get(); sld.struct_handler->table_data = SlTableHeader(sld.struct_handler->GetDescription()); + sld.struct_handler->SavedTableDescription(); saveloads.struct_handlers.push_back(std::move(handler)); } } diff --git a/src/sl/saveload_types.h b/src/sl/saveload_types.h index 56e2fb4a65..a7c83ad5e5 100644 --- a/src/sl/saveload_types.h +++ b/src/sl/saveload_types.h @@ -273,6 +273,11 @@ public: * Called immediately after table_data is populated during header load. */ virtual void LoadedTableDescription() {}; + + /** + * Called immediately after table_data is populated during header save. + */ + virtual void SavedTableDescription() {}; };