Sandcastle-Builder icon indicating copy to clipboard operation
Sandcastle-Builder copied to clipboard

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

Open EPSIL0N opened this issue 9 years ago • 3 comments

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.

EPSIL0N avatar Dec 22 '15 04:12 EPSIL0N

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

pickten avatar Dec 22 '15 23:12 pickten

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.

EPSIL0N avatar Dec 23 '15 01:12 EPSIL0N

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.

eternaldensity avatar Dec 23 '15 05:12 eternaldensity