Correct me if I'm wrong, but it looks like the line
local richAsteroids = sector:getNumEntitiesByComponent(ComponentType.MineableMaterial)
includes wreckages in the total number of rich asteroids because wreckages also have the component type of 'MineableMaterial'. I'm thinking the fix is as easy as:
local richAsteroids = sector:getNumEntitiesByComponent(ComponentType.MineableMaterial)- sector:getNumEntitiesByType(EntityType.Wreckage)
Remaining mineable asteroids calculated incorrectly for respawn mechanic
in Bugs
Posted
From the scripts/sector/background/respawnresourceasteroids.lua:
Correct me if I'm wrong, but it looks like the line
includes wreckages in the total number of rich asteroids because wreckages also have the component type of 'MineableMaterial'. I'm thinking the fix is as easy as: