Page 1 of 1

[Request] ore patches merger

Posted: Thu Dec 21, 2017 7:11 pm
by omagaalpha
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

Posted: Thu Dec 21, 2017 8:51 pm
by darkfrei
For every resource you are need to add resource_patch_search_radius like here:

Code: Select all

data.raw.resource["crude-oil"].resource_patch_search_radius = 12
So, you are need to make "data-final-fixes.lua" with this code:

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
And it's all.

Re: [Request] ore patches merger

Posted: Thu Dec 21, 2017 9:57 pm
by omagaalpha
Thanks help but found another solution to problem though looker into picker mod

Code: Select all

  local entities = event.entities
        local list = {}
        local listFirst = {}
		
        for _,entity in ipairs(entities) do
            if entity.type == "resource" then
How would from event access resource prototypes?