Closed EarendelGames closed 1 year ago
Adding this to prototypes/phase-3/space-collision.lua makes the offshore pump vanish upon spaceship launch. I'm out of my league on making these kind of changes to data phase though or if there is any better way of handling it.
for _, prototype in pairs(data.raw["offshore-pump"]) do
prototype.collision_mask = collision_mask_util_extended.get_mask(prototype)
collision_mask_util_extended.add_layer(prototype.collision_mask, spaceship_collision_layer)
data_util.collision_description(prototype)
end
@BurninSun's fix works because we specifically search for spaceship-colliding entities during clone. By default offshore pumps are only space-colliding.
I think this exploit only works with offshore pumps because of their special property, where instead of deleting themselves when their tiles are changed, they turn into a "water well pump". I tried the same trick with an industrial furnace and it was deleted as soon as the spaceship floor was placed.
Because of this I think explicitly adding spaceship-collision to all offshore pumps like @BurninSun suggested makes sense, instead of also checking for space-colliding entities, which will never happen except for offshore pumps.
Though, remove data_util.collision_description(prototype)
since the description is already correct and it doubles it up.
I went ahead and added that in bugfixes
.
The Eternal Drifter:
If this can't be fixed with collision masks then the last resort is to remove offshore pumps from the spaceship surface after launch.