Allow custom tools to get selected tiles and entities

Things that already exist in the current mod API
Post Reply
d3x0r
Filter Inserter
Filter Inserter
Posts: 316
Joined: Sun Jun 04, 2017 8:56 am
Contact:

Allow custom tools to get selected tiles and entities

Post by d3x0r »

Reported originally as a bug because blueprint appears to do the same thing, until you get into the edit screen and can check 'tiles' selection...

viewtopic.php?f=23&t=51197


with a custom select tool even with selection_mode = {"buildable-type","items-to-place","tiles","blueprint"},

I'm not getting tiles and entities; unless the tiles happen to be ghost tiles.

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

Re: Allow custom tools to get selected tiles and entities

Post by Rseding91 »

You can use the "always_include_tiles" prototype flag to as the name suggests: always include tiles.
If you want to get ahold of me I'm almost always on Discord.

d3x0r
Filter Inserter
Filter Inserter
Posts: 316
Joined: Sun Jun 04, 2017 8:56 am
Contact:

Re: Allow custom tools to get selected tiles and entities

Post by d3x0r »

Rseding91 wrote:You can use the "always_include_tiles" prototype flag to as the name suggests: always include tiles.
no such flag...
Mods to disable:Failed to load mods: Error while loading item prototype "upgrade-builder2" (selection-tool): Unknown selection tool flag: always_include_tiles

https://wiki.factorio.com/Prototype/SelectionTool

any-tile includes ground tiles which I don't really want... would be harmless other than it looks bad on selection

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

Re: Allow custom tools to get selected tiles and entities

Post by Rseding91 »

d3x0r wrote:
Rseding91 wrote:You can use the "always_include_tiles" prototype flag to as the name suggests: always include tiles.
no such flag...
Mods to disable:Failed to load mods: Error while loading item prototype "upgrade-builder2" (selection-tool): Unknown selection tool flag: always_include_tiles

https://wiki.factorio.com/Prototype/SelectionTool

any-tile includes ground tiles which I don't really want... would be harmless other than it looks bad on selection
It's not a selection tool flag. It's a property:

Code: Select all

{
type="...",
name="...",
always_include_tiles = true
}
If you want to get ahold of me I'm almost always on Discord.

d3x0r
Filter Inserter
Filter Inserter
Posts: 316
Joined: Sun Jun 04, 2017 8:56 am
Contact:

Re: Allow custom tools to get selected tiles and entities

Post by d3x0r »

Thank you :) Works beautifully.

Post Reply

Return to “Already exists”