mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-11 13:10:45 +00:00
Saveload: Add SaveLoadStructHandler handler for post table header save
This commit is contained in:
parent
f724853985
commit
4a12c79c5c
@ -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));
|
||||
}
|
||||
}
|
||||
|
@ -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() {};
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user