What did you do?
Installed the Cargo Bay Inserters mod
What happened?
Cargo Bays are not taking Damage from Asteroids.
What did you expect to happen instead? It might be obvious to you, but do it anyway!
Cargo Bays would still take damage from Asteroids. Or the damage would redirect to the Platform Hub.
Does it happen always, once, or sometimes?
With the mod "Cargo Bay Inserters" enabled. I have reviewed the code for this mod and there is nothing that suggests that this is intended behavior. The Mod does appear to attempt to handle "deathrattle" events, but since one is never triggered it is hard to Debug...... If this is somehow intentional or a Bug in the Mod, then I apologize for opening a spurious Bug Report.
Thank you for reading!
[2.0.45] Proxy-container entities are not taking Damage from Asteroids
[2.0.45] Proxy-container entities are not taking Damage from Asteroids
- Attachments
-
- PlatformDamage.zip
- (902.25 KiB) Downloaded 12 times
Re: [2.0.45] Proxy-container entities are not taking Damage from Asteroids
Hi, this issue is completely due to the mod and should have been send to that mod's author (me) instead of the forum, this should be moved to not a bug.
Now let me explain what is happening:
When an asteroid collides with a space platform tile the "heuristic entity search" goes through all the entities who's collision boxes encroach on that tile, the order of which seems completely unpredictable or at the very least undefined.
The proxy container gets a subtle `deconstructible = false` applied to it in the control stage, and if the order in which the asteroid tries to damage the entities comes across the proxy first it'll absorb all damage, it does not care about any sort of collision mask whatsoever.
The simple solution would be for me to decrease the collision box to not be around the edges of the cargo bay so the asteroid will only hit normal entities first, but that would also interfere with inserters, i'll have to modify the mod so the proxy can be damaged and revive itself the next tick so practically all damage -1 will end up hitting the cargo bay as it should.
Now let me explain what is happening:
When an asteroid collides with a space platform tile the "heuristic entity search" goes through all the entities who's collision boxes encroach on that tile, the order of which seems completely unpredictable or at the very least undefined.
The proxy container gets a subtle `deconstructible = false` applied to it in the control stage, and if the order in which the asteroid tries to damage the entities comes across the proxy first it'll absorb all damage, it does not care about any sort of collision mask whatsoever.
The simple solution would be for me to decrease the collision box to not be around the edges of the cargo bay so the asteroid will only hit normal entities first, but that would also interfere with inserters, i'll have to modify the mod so the proxy can be damaged and revive itself the next tick so practically all damage -1 will end up hitting the cargo bay as it should.
Re: [2.0.45] Proxy-container entities are not taking Damage from Asteroids
Proxy container rejects damage because it is marked as `destructible=false`. https://lua-api.factorio.com/latest/cla ... structible
I think the most reasonable solution here would be for this mod to restore the "destructible" flag and listen for on_entity_damaged events where all the damage would be forwarded away from the proxy container and applied to the cargo bay.
I think the most reasonable solution here would be for this mod to restore the "destructible" flag and listen for on_entity_damaged events where all the damage would be forwarded away from the proxy container and applied to the cargo bay.
Re: [2.0.45] Proxy-container entities are not taking Damage from Asteroids
A-ha! I did not spot the “deconstructible” / destructible flag in my read-through of the code. I did not try to reproduce the Issue with a raw proxy-container primitive purely for the Bug Report, since I did not fully understand what was going on to begin with.Quezler wrote: Thu Apr 17, 2025 9:20 amThe proxy container gets a subtle `deconstructible = false` applied to it in the control stage, and if the order in which the asteroid tries to damage the entities comes across the proxy first it'll absorb all damage, it does not care about any sort of collision mask whatsoever.