Closed dimaman2001 closed 9 years ago
Solution:
Set EnumMember attributes to the Enum
public enum BonusType
{
/// <summary>
/// Material Efficency Bonus
/// </summary>
[EnumMember(Value = "ME")]
ME,
/// <summary>
/// Production Efficiency Bonus
/// </summary>
[EnumMember(Value = "TE")]
TE
}
Add the JsonConverter and use the JsonProperty attributes to the property:
[JsonProperty("bonusType")]
[JsonConverter(typeof(StringEnumConverter))]
public BonusType Type { get; set; }
Feel free to fix what you can and issue a pull request. Else I'll have a look at it tomorrow if I get time.
The Worker Bonus value is always set to ME even if the worker is providing a TE bonus