1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-01-05 22:53:39 +02:00

Don't run cleanup on every death.

This commit is contained in:
Russel Delainey 2019-06-04 15:28:08 -06:00
parent c07b5a39e0
commit c501c9ca85
2 changed files with 7 additions and 1 deletions

View File

@ -394,7 +394,8 @@ global.config = {
biter_corpse_util = {
enabled = true,
radius = 3, -- radius to search around dying entities
corpse_threshold = 10 -- number of corpses allowed on surface, inside radius
corpse_threshold = 10, -- number of corpses allowed on surface inside radius
cleanup_chance_percent = 10 -- 100 means check on every biter death, 50 means every second death, etc.
}
}

View File

@ -22,6 +22,11 @@ local function biter_died(event)
return
end
-- Only a chance of cleanup
if biter_utils_conf.cleanup_chance_percent < random(100) then
return
end
local surface = entity.surface
local filter = {