Skip to content

entity_placement_restriction.lua banning all entities not in always allowed list. #875

@R-Nukem

Description

@R-Nukem

Expected behavior
There are two tables that are accessed by the module.

local allowed_entities = {}
local banned_entities = {}

Optionally the callback function can be defined to ban/allow certain entities depending on the logic of the function.

The table of allowed_entities are always allowed to be placed.
The table of banned_entities are never allowed to be placed, and are destroyed.

Describe the bug
When not using a callback function adding any entities to either table will result in banning all entities not in the allowed_entities table. So if we allow 'pipe' that will be the only entity we can place.

Steps to reproduce
Steps to reproduce the behavior:

  1. Set up map_selection.lua to play the dino_island map from earlier in the year
  2. Start Dino Island
  3. Buy and place a normal inserter, note the behavior
  4. Buy and place a burner inserter, note that the behavior is the same as 4 despite being an item we should be able to place.

Map
Working on another map using the module, but the behavior is easily shown on dino_island.lua

Additional context
As far as I can tell there have been no changes to dino_island or entity_placement_restriction.lua since the Dino Island map has been played. Likely something changed in one of the experimental 17.x patches.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions