ModMessageReceived can't deserialize a SemanticVersion field
jltaylor-us opened this issue ยท 1 comments
When an object that has an ISemanticVersion
field is sent via Helper.Multiplayer.SendMessage
, and the receiver deserializes the object (via ModMessageReceivedEventArgs
' ReadAs
method), the ISemanticVersion
field is not set. This is surprising, because the same object can be written/read from the save game file correctly. (Although now that I think about it, it's not surprising at all since SemanticVersion
doesn't have setters for its fields. The inconsistency is what's surprising.)
I didn't chase through the code far enough to see where you might be able to insert the same JSON converters into the networking code that are in the data serialization code, so if that's difficult or impossible then consider this a request to update the docs / wiki for clarification of which object types are / are not supported in sending network messages vs. saving data.