Page 1 of 1

Add backer_name as filter to find_entities_filtered

Posted: Wed Jul 11, 2018 5:47 am
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

Re: Add backer_name as filter to find_entities_filtered

Posted: Tue Oct 02, 2018 9:55 pm
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.

Re: Add backer_name as filter to find_entities_filtered

Posted: Wed Oct 03, 2018 1:39 am
by Rseding91
I've added LuaGameScript::get_train_stops(), LuaSurface::get_train_stops(), and LuaForce::get_train_stops() for 0.17.

Re: Add backer_name as filter to find_entities_filtered

Posted: Mon Nov 12, 2018 5:38 am
by Sandman2003
Yes I agree (with it is the wrong way), and thanks.