[Request] ore patches merger
-
- Inserter
- Posts: 23
- Joined: Mon Apr 29, 2013 4:49 pm
- Contact:
[Request] ore patches merger
Basically I want to be able in game merger multiple infinite ore patches together of same type so that I have higher yield (hopefully non decaying) patches.
Re: [Request] ore patches merger
For every resource you are need to add resource_patch_search_radius like here:
So, you are need to make "data-final-fixes.lua" with this code:
And it's all.
Code: Select all
data.raw.resource["crude-oil"].resource_patch_search_radius = 12
Code: Select all
for resource_name, resource_prototype in pairs (data.raw.resource) do
resource_prototype.resource_patch_search_radius = 12 -- or another radius what you will
end
-
- Inserter
- Posts: 23
- Joined: Mon Apr 29, 2013 4:49 pm
- Contact:
Re: [Request] ore patches merger
Thanks help but found another solution to problem though looker into picker mod
How would from event access resource prototypes?
Code: Select all
local entities = event.entities
local list = {}
local listFirst = {}
for _,entity in ipairs(entities) do
if entity.type == "resource" then