Add backer_name as filter to find_entities_filtered

Post Reply
User avatar
Sandman2003
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Sun Nov 30, 2014 5:02 am
Contact:

Add backer_name as filter to find_entities_filtered

Post by Sandman2003 »

The class LuaSurface has a method Find_entities_filtered - it would be useful to enable this to filter based on backer_name (obviously only where backer_name is applicable, so maybe the type has to already define an entity type that supports backer_name). This would reduce needing to deal with over sized datasets when for example looking for specific train stops (stations), or checking for their existence, etc

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Add backer_name as filter to find_entities_filtered

Post by Rseding91 »

This seems like the completely wrong way to go about finding a train stop by name.

What it sounds like you actually want is a way to get a train stop or stop(s) with a specific name.
If you want to get ahold of me I'm almost always on Discord.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Add backer_name as filter to find_entities_filtered

Post by Rseding91 »

I've added LuaGameScript::get_train_stops(), LuaSurface::get_train_stops(), and LuaForce::get_train_stops() for 0.17.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Sandman2003
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Sun Nov 30, 2014 5:02 am
Contact:

Re: Add backer_name as filter to find_entities_filtered

Post by Sandman2003 »

Yes I agree (with it is the wrong way), and thanks.

Post Reply

Return to “Implemented mod requests”