gave translations a dedicated scripted type.
This is needed for implementing reliable serialization of custom translations. As long as they are merely ints they cannot be restored on loading a savegame because the serialization code does not know that these variables are special.
This commit is contained in:
parent
3781c43aec
commit
f0c9b1765e
19 changed files with 341 additions and 34 deletions
|
|
@ -1196,6 +1196,21 @@ FSerializer &Serialize(FSerializer &arc, const char *key, FTextureID &value, FTe
|
|||
return arc;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
FSerializer& Serialize(FSerializer& arc, const char* key, FTranslationID& value, FTranslationID* defval)
|
||||
{
|
||||
int v = value.index();
|
||||
int* defv = (int*)defval;
|
||||
Serialize(arc, key, v, defv);
|
||||
value = FTranslationID::fromInt(v);
|
||||
return arc;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// This never uses defval and instead uses 'null' as default
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue