mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Fixed missing translation strings on loading campaign save
- campaign header now contains text container and stores campaign texts - map header now contains text container instead of inheriting it - moved text container registration logic to a wraper class - fixed registration of copied text containers (from copied map header)
This commit is contained in:
@@ -192,7 +192,7 @@ struct DLL_LINKAGE TriggeredEvent
|
||||
};
|
||||
|
||||
/// The map header holds information about loss/victory condition,map format, version, players, height, width,...
|
||||
class DLL_LINKAGE CMapHeader: public TextLocalizationContainer
|
||||
class DLL_LINKAGE CMapHeader
|
||||
{
|
||||
void setupEvents();
|
||||
public:
|
||||
@@ -240,13 +240,14 @@ public:
|
||||
|
||||
/// translations for map to be transferred over network
|
||||
JsonNode translations;
|
||||
TextContainerRegistrable texts;
|
||||
|
||||
void registerMapStrings();
|
||||
|
||||
template <typename Handler>
|
||||
void serialize(Handler & h, const int Version)
|
||||
{
|
||||
h & static_cast<TextLocalizationContainer&>(*this);
|
||||
h & texts;
|
||||
h & version;
|
||||
h & mods;
|
||||
h & name;
|
||||
|
||||
Reference in New Issue
Block a user