eternaldensity / Sandcastle-Builder

xkcd: 1190: Time: The Game
Other
81 stars 66 forks source link

.Making is saved as an int, t1i NP# is a float #1405

Open EPSIL0N opened 8 years ago

EPSIL0N commented 8 years ago

Found an interesting bug the monument and mould tools save their Making value as an int but the t1i timeline is floating points.

I was wondering if it would be safe to change the save type to float or if I should simply multiply the numbers by ten or one hundred or something to move the decimal and make the value an integer.

pickten commented 8 years ago

I'd say to make it a float if only to be more consistent with the ways nps are stored.

EPSIL0N commented 8 years ago

Yeah, I've done that on my own local copy and it hasn't seemed to explode yet and I can't seem to find anything that would suggest that the code in persist will be upset as I think it will automatically float-ify old ints the same way it is int-ifying the floats that is causing the loss of the .1 part.

Just wanted to get others opinions.

eternaldensity commented 8 years ago

So long as floating point errors aren't creeping in... actually since it's using floats already then doing it with floats in the save should make it more consistent and prevent weirdness, I assume. So yeah, good idea.