Selection tool mode/filter for selecting only ghost entities
Posted: Thu Feb 27, 2020 4:42 am
Hi, I'm trying to make a custom selection-tool that only selects ghost entities, but it doesn't seem to be possible. There doesn't seem to be any sort of "ghost-entity" selection mode, so instead I tried using the "any-entity" selection mode combined with an entity type of "entity-ghost" in the entity type filters for my prototype. Unfortunately, this didn't work - the tool wouldn't select anything (and I did confirm it was in 'whitelist' mode!)
After experimenting some more, it seems to me like when the entity is a ghost entity, the selection-tool entity type filter matches against the ghost_type instead of the regular type, does this sound correct? Matching against the ghost_type makes sense for blueprint-like tools, but it doesn't work so well for what I'm trying to do...
I can think of two ways the API could be changed to solve my problem:
After experimenting some more, it seems to me like when the entity is a ghost entity, the selection-tool entity type filter matches against the ghost_type instead of the regular type, does this sound correct? Matching against the ghost_type makes sense for blueprint-like tools, but it doesn't work so well for what I'm trying to do...
I can think of two ways the API could be changed to solve my problem:
- Make the selection-tool entity type filter match against both the regular type and the ghost_type when considering ghost entities (i.e. make it so "entity-ghost" actually works as an entity type filter)
- Add a "ghost-entity" selection mode that I could use in place of "any-entity". I think this solution makes more sense, because the new selection mode could be further combined with an entity type filter if desired, e.g. to make a selection tool that selects only Roboport ghost entities.