Finding "any" entity on a position

lyravega
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Mon Jan 06, 2014 4:41 pm
Contact:

Finding "any" entity on a position

Post by lyravega »

Finding "any entity" on a specific position is rather hard. Either need a new function, something like "find_any_entity(position)" or need to overload "find_entity(entityName, position)" to also work without passing any entity names. Currently, need to use more complex functions, like "find_entities(...)" or "find_entities_filtered(...)", and both requires an area. In order to check a 1x1 "dot", an easier solution would be better & preferred.
Rseding91
Factorio Staff
Factorio Staff
Posts: 16148
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Finding "any" entity on a position

Post by Rseding91 »

I can make the entity part of "find_entity" optional - would that work for what you're after?
If you want to get ahold of me I'm almost always on Discord.
lyravega
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Mon Jan 06, 2014 4:41 pm
Contact:

Re: Finding "any" entity on a position

Post by lyravega »

Yup yup, avoiding area whenever possible would definitely be much more useful!
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: Finding "any" entity on a position

Post by prg »

You can just use find_entities({position, position}) for now.
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
Post Reply

Return to “Implemented mod requests”