Page 1 of 1

[1.1.2] Walls with a hidden entity in the same tile prevent placement with other walls.

Posted: Mon Nov 30, 2020 4:28 pm
by MasterBuilder
I asked on the modding discord and Honktown helped me narrow it down. The cause is most likely the change in 1.1 for "Fixed that players could be stuck in walls when building them."

So the mod in question is Solar Walls. I'm updating it to 1.1 and I believe there's a bug will walls that prevents this from working.

Essentially, if a wall has a hidden entity on the same tile, it won't let me place walls in the neighboring tiles:
wall-in-the-way.png
wall-in-the-way.png (116.72 KiB) Viewed 1292 times
If I use shift to ghost/plan the wall in advance, I have no trouble building them in a row:
works-as-ghosts.png
works-as-ghosts.png (226.04 KiB) Viewed 1292 times
But once built, it's impossible to go beyond the planned section:
chain-fail.png
chain-fail.png (116.96 KiB) Viewed 1292 times
- The solar panel entity is marked as hidden & has a collision of: `{{-0.29, -0.29}, {0.29, 0.29}}`.
- The wall entity is practically the same as the vanilla wall, collision of `{{-0.29, -0.29}, {0.29, 0.29}}` and such.
- I tried changing `visual_merge_group` to no appreciable difference.
- It blocks regular walls from being placed next to it too. (But works when ghosting it first.)
- If I disable the events placing the hidden panel the issue goes away. (Since there's no hidden entity anymore.)

This all worked perfectly in 0.18/1.0.
If this isn't a bug, then I have no idea what changes I need to make to the mod to get it working for 1.1.
I looked through the prototype definition on the wiki and didn't see anything relevant I could change for this. Same with the list of modding changes. I really don't know what I can do about it other than this bug report.

Attached is a version of the mod updated to 1.1.
Reproduction is simple. Just try to place two solar walls [next to each other] by hand.

Re: [1.1.2] Walls with a hidden entity in the same tile prevent placement with other walls.

Posted: Mon Nov 30, 2020 6:21 pm
by Klonan
The wall is colliding with the solar panel,
You should clear the solar panel collision mask:
`collision_mask = {},`

Otherwise this is working as intended, blocking the placement if it would collide in this way

Re: [1.1.2] Walls with a hidden entity in the same tile prevent placement with other walls.

Posted: Mon Nov 30, 2020 8:09 pm
by MasterBuilder
Thanks. You're completely right. Works perfectly when changed.