SpacePlatform.find_asteroid_chunks_filtered add radius option

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
gangerM
Burner Inserter
Burner Inserter
Posts: 18
Joined: Thu Nov 28, 2024 5:32 pm
Contact:

SpacePlatform.find_asteroid_chunks_filtered add radius option

Post by gangerM »

Hello,

I am trying to find asteroids on a space platform and read that there was a position option, but read over it the "radius" field does not exist, causing some confusion in usage. Similar functions for searching do have the radius option ("find_entities_filtered"). Expected usage;

Code: Select all

local AsteroidChunkList = SpacePlatform.find_asteroid_chunks_filtered({
                position = RadarEntity.position,
                radius = Distance
 })
For now I replaced it with an area search like this;

Code: Select all

local XPos = RadarEntity.position.x
local YPos = RadarEntity.position.y
local AsteroidChunkList = SpacePlatform.find_asteroid_chunks_filtered({
     area = {{XPos-Distance, YPos-Distance}, {XPos+Distance, XPos+Distance}}
})
I think not the highest priority as the area search works, if someone also has the same issue hopefully this post helps them as well.
Post Reply

Return to “Modding interface requests”