1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-03 00:46:55 +02:00

Fixed serialization of PlayerColor in json

This commit is contained in:
Ivan Savenko
2023-09-04 22:21:57 +03:00
parent 86a7f5f5cd
commit 12c4f8d18c
4 changed files with 8 additions and 12 deletions

View File

@ -238,7 +238,7 @@ PlayerColor InterfaceObjectConfigurable::readPlayerColor(const JsonNode & config
{
logGlobal->debug("Reading PlayerColor");
if(!config.isNull() && config.isString())
return PlayerColor(vstd::find_pos(GameConstants::PLAYER_COLOR_NAMES, config.String()));
return PlayerColor::decode(config.String());
logGlobal->debug("Unknown PlayerColor attribute");
return PlayerColor::CANNOT_DETERMINE;