Saveload: Add SaveLoadStructHandler handler for post table header save

This commit is contained in:
Jonathan G Rennison 2024-07-30 18:53:28 +01:00
parent f724853985
commit 4a12c79c5c
2 changed files with 6 additions and 0 deletions

View File

@ -2440,6 +2440,7 @@ SaveLoadTableData SlTableHeader(const NamedSaveLoadTable &slt, TableHeaderSpecia
std::unique_ptr<SaveLoadStructHandler> 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));
}
}

View File

@ -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() {};
};