Skip to content

Pipes unplaceable with Space Exploration (no tomwub): placeholder collides with its own variant → refund + find_entities_filtered error #62

Description

@MaksArh

What kind of issue is this?

  • Compatibility
  • Locale (names, descriptions, unknown keys)
  • Graphical
  • Crash
  • Other

What is the problem?

Environment

  • Factorio 2.0.77 (Space Age)
  • parallel-piping 1.0.20, perel 1.1.9
  • space-exploration 0.7.57 (+ postprocess/scripts)
  • the-one-mod-with-underground-bits NOT installed

Symptom
Placing any pipe just plays the build smoke: no entity is placed, the item is not
consumed, and a red script error is thrown from surface.find_entities_filtered.
With tomwub installed the same pack works fine.

Root cause
SE re-applies collision masks to every pipe in its data-final-fixes pass
(prototypes/phase-3/space-collision.lua, required from SE data-final-fixes.lua).
Because parallel-piping sorts before space-exploration, SE runs after PP and
re-adds the space_tile and vehicle collision layers to BOTH the placeholder base
pipe AND the generated *-pp-NN variants.

PP relies on the placeholder having only { out_of_map } so the variant can be built
on the same tile. After SE's pass they share layers, so in on_built:

can_place = surface.can_place_entity{ name = variations[base][0], position = entity.position, ... }

returns false (the still-present placeholder collides with the variant). Verified in-game:

  • pipe: {layers = {out_of_map, space_tile, vehicle}}
  • pipe-pp-00: {layers = {is_lower_object, item, meltable, object, space_tile, vehicle, water_tile}}
  • can_place(pipe-pp-00) on empty ground = true, but false on the tile where the placeholder sits.

PP then takes the "cannot place → refund item" branch, which additionally crashes because it
passes a collision-mask layer table where find_entities_filtered expects layer name(s):

-- control.lua (refund branch)
local params = { position = ..., force = ...,
  collision_mask = prototypes.entity[variations[base][variation]].collision_mask.layers } -- table, not layer id(s)
... surface.find_entities_filtered(params) -- throws

Workaround (confirmed)
A tiny mod loading after SE that resets each PP placeholder pipe's collision back to
{ layers = { out_of_map = true } } fixes it completely; variants are left untouched.

Steps to reproduce

No response

Additional context

No response

Log file

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions