Dev version of SWS attached (Note - not the same as the 1.2.4 from this bug report.
You can see in the screenshot that the water tile and spidertron leg's share the "layer-13" collision mask, so the spidertron leg should not be able to land on the water, but it does.
If I add water-tile or player-layer to the spidertron leg collision mask then it correctly stops the leg from landing on the water. You can adjust the spidertron leg collision mask in data-final-fixes.lua:26.
I've had no problems with entity collisions, it is just tiles.
[1.1.41] Spidertron legs don't collide with tiles using custom collision layers
[1.1.41] Spidertron legs don't collide with tiles using custom collision layers
- Attachments
-
- Collision mask tests bug report.zip
- (572.61 KiB) Downloaded 203 times
-
- SpidertronWeaponSwitcher_1.2.4.zip
- (41.3 KiB) Downloaded 191 times
My mods
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
Re: [1.1.41] Spidertron legs don't collide with tiles using custom collision layers
In 1.1, entity collision mask contain at least one of "water-tile", "ground-tile", "resource-layer", "player-layer", "item-layer", "doodad-layer" in order to be considered for tile collision check.
I think it should be changed, but I am not brave enough to change it in 1.1
I think it should be changed, but I am not brave enough to change it in 1.1
Re: [1.1.41] Spidertron legs don't collide with tiles using custom collision layers
As posila mentioned, tile collisions were not checked when none of those 6 layers were in the collision mask.
Fix for this is to have an aggregate value computed from all the tile prototypes so whenever a collision layer is used in one of the tile's collision mask, every entity that also has that layer will now start checking collisions with tiles.
This fix has a huge chance of breaking some mods that depend on this broken behavior, even a base game offshore-pump was kind of abusing this logic to be placeable on water-shallow. I still believe it is better to have this bug fixed than keeping the bug for the mod compatibility reasons so the fix is complete and will be included in 1.1.42.
Fix for this is to have an aggregate value computed from all the tile prototypes so whenever a collision layer is used in one of the tile's collision mask, every entity that also has that layer will now start checking collisions with tiles.
This fix has a huge chance of breaking some mods that depend on this broken behavior, even a base game offshore-pump was kind of abusing this logic to be placeable on water-shallow. I still believe it is better to have this bug fixed than keeping the bug for the mod compatibility reasons so the fix is complete and will be included in 1.1.42.