[Request] ore patches merger

This is the place to request new mods or give ideas about what could be done.
omagaalpha
Inserter
Inserter
Posts: 23
Joined: Mon Apr 29, 2013 4:49 pm
Contact:

[Request] ore patches merger

Post 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.
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: [Request] ore patches merger

Post 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.
omagaalpha
Inserter
Inserter
Posts: 23
Joined: Mon Apr 29, 2013 4:49 pm
Contact:

Re: [Request] ore patches merger

Post 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?
Post Reply

Return to “Ideas and Requests For Mods”