Page 1 of 1

(Resolved) Selection tools and neutral entities

Posted: Mon Oct 21, 2024 9:44 pm
by 0n0w1c
Selection tool (Big Pink Eraser mod) with the the select defined as:

Code: Select all

        select = {
            border_color = constants.pink,
            cursor_box_type = "not-allowed",
            mode = { "deconstruct", "any-entity", "items" },
            entity_filter_mode = "blacklist",
            entity_type_filters = constants.excluded_types_list
        },
        alt_select = {
            border_color = constants.pink,
            cursor_box_type = "not-allowed",
            mode = { "deconstruct", "any-entity", "items" },
            entity_filter_mode = "blacklist",
            entity_type_filters = constants.excluded_types_list
        }
And the filter is:

Code: Select all

    constants.excluded_types_list = { "character", "cliff", "decorative", "fish", "resource", "simple-entity", "tile", "tree" }
This is how the find is defined:

Code: Select all

    local entities = surface.find_entities_filtered({
        area = event.area,
        force = constants.allowed_forces
    })

constants.allowed_forces = { "neutral", "player" }
When the selection tool is used, neutral entities (ex. crash site entities) are selected, however they do not appear as selected.
Bug or my ignorance?

Re: Selection tools and neutral entities

Posted: Mon Oct 21, 2024 10:09 pm
by 0n0w1c
Note to the moderator: I think this is more of a technical modding question than a game play question.

Re: Selection tools and neutral entities

Posted: Tue Oct 22, 2024 12:38 am
by 0n0w1c
Resolved by modifying:

Code: Select all

mode = { "deconstruct", "any-entity", "items" },
To be:

Code: Select all

mode = { "any-entity", "items" },