So I went down the rabbit hole of trying to figure out how ore generation works. For the sake of curiosity, I thought to peruse the autoplace specification object and here's what it looks like in runtime: https://pastebin.com/LCHRfJmG
Now that's some crazy layout. To access a property inside of that mess, I need to do something like:
Code: Select all
/c game.print(serpent.line(game.entity_prototypes["uranium-ore"].autoplace_specification.probability_expression.arguments[1].expression.arguments[1].arguments.basement_value.arguments[1].arguments[2].arguments[1].literal_value))
I believe the simple solution would be to preserve the information available at the data stage (the arguments passed to resource_autoplace_settings()) and make that accessible at runtime in a sane manner.
The alternative is that I may need to measure this empirically via generating a large area of a dummy surface and taking measurements.