Page 1 of 1

Request for Selection Tool Entity Filter

Posted: Tue Jul 18, 2017 10:01 pm
by trappi_stone
Deconstruction planner allows me to filter entities through whitelist and blacklist in the game. It would be nice to allow filtering for the selection-tool in the API where I can specify the entity types and names to prevent the cursor box from selecting them.

An example code might look something like the following:

Code: Select all

data:extend(
  {
    {
      ...
      type = "selection-tool",
      blacklist = {"iron-plate", "tree"},
      whitelist = {"resource"}
      ...
  }
)

Re: Request for Selection Tool Entity Filter

Posted: Sun Nov 19, 2017 1:09 am
by Tergiver
Better yet, let us specify a filter function that takes an entity and returns a color value, including nil. That way we can determine which entities show up as selected and in what color(s).

Re: Request for Selection Tool Entity Filter

Posted: Tue Nov 27, 2018 9:12 pm
by Bilka
The original request was added for 0.17.