Code: Select all
test_dict = {
"blueprint": {
"item": "blueprint",
"entities": [
{
"name": "wooden-chest",
"position": {"x": 0.5, "y": 0.5},
"entity_number": 2**64 + 1000
}
],
"version": 2**64 + 1000
}
}
It seems like these numbers are getting converted to a floating point number at some step, making them suffer from floating point precision error. If I set the value to 2^65, the value does error, but the returned value in the error varies from the input value by about a thousand:
Code: Select all
36893488147419103232 (2**65)
36893488147419104982.000000 (returned)
If this is a bug, it's impact is non-existent; no player is ever going to have a blueprint with 2^53 entities in it, and the Factorio major version would have to be absurdly high for version to suffer from precision loss. However, this very well seems like it could be a simple oversight where an input value is being coerced to the wrong datatype accidentally, making the tooltip which describes it's valid range strictly incorrect at the very least.