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:
@ -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;
|
||||
|
Reference in New Issue
Block a user