Razenpok / BreakInfinity.cs

Double replacement for numbers that go over 1e308
MIT License
212 stars 33 forks source link

Add [Serializable] attribute #5

Closed Patashu closed 5 years ago

Patashu commented 5 years ago

I don't think you need to do anything else, since it should serialize fine by default

Razenpok commented 5 years ago

Not really, I would need to change Mantissa and Exponent from properties to fields, but I get your point.

Patashu commented 5 years ago

Having a guy in AD NG+3 #coding channel who's trying to get their save data to serialize, so I figure having it serialize by default would eliminate at least one hurdle

Razenpok commented 5 years ago

Ye, but without custom editor it would still be a hassle to edit. Shouldn't be big of a trouble, I'll take a look this weekend.

Razenpok commented 5 years ago

hussle

lol

cryptogrounds commented 5 years ago

To add onto Patashu ^ I'm trying to save BigDoubles to a json save via FileStream, but since BigDoubles aren't serializeable, they won't save nor load. Sample code: https://pastebin.com/5fVjYpWN

cryptogrounds commented 5 years ago

Fixed Version of breakinfinity.cs: https://pastebin.com/FM2W3VnZ