Graendal Posted August 30, 2022 Share Posted August 30, 2022 From the scripts/sector/background/respawnresourceasteroids.lua: function RespawnResourceAsteroids.respawnRichAsteroids() local sector = Sector() local richAsteroids = sector:getNumEntitiesByComponent(ComponentType.MineableMaterial) local numAsteroids = sector:getNumEntitiesByType(EntityType.Asteroid) if numAsteroids == 0 then return end if richAsteroids / numAsteroids > self.respawningThreshold then return end ... end 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) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now