Page 1 of 1

LuaEntityPrototype.resource_patch_search_radius

Posted: Wed Apr 29, 2020 10:42 pm
by sonaxaton
I can't seem to find in-game access to https://wiki.factorio.com/Prototype/Res ... rch_radius. Am I missing something or is it just not exposed in-game?

Re: LuaEntityPrototype.resource_patch_search_radius

Posted: Thu Apr 30, 2020 5:32 am
by Rseding91
It's not exposed anywhere. What's the use-case for wanting to read a render-only value?

Re: LuaEntityPrototype.resource_patch_search_radius

Posted: Thu Apr 30, 2020 5:54 am
by boskid
Is it render-only value? It is used for computation of resource patch amount in case of a mining drill connected to circuit network.

Re: LuaEntityPrototype.resource_patch_search_radius

Posted: Thu Apr 30, 2020 6:33 am
by Rseding91
boskid wrote: Thu Apr 30, 2020 5:54 am Is it render-only value? It is used for computation of resource patch amount in case of a mining drill connected to circuit network.
No it's not.

Re: LuaEntityPrototype.resource_patch_search_radius

Posted: Thu Apr 30, 2020 12:38 pm
by sonaxaton
I need it for https://mods.factorio.com/mod/sonaxaton ... ap-markers to be able to detect contiguous resource patches properly.

Re: LuaEntityPrototype.resource_patch_search_radius

Posted: Sun Jul 19, 2020 8:33 pm
by sonaxaton
Any update on this?

I noticed that there are already some values in LuaEntityPrototype that are "render-only", like https://lua-api.factorio.com/latest/Lua ... .map_color.

As a larger request, what my mod (and potentially others) would really like access to is some concept of "resource patches", which I'm trying to use resource_patch_search_radius to determine myself at the moment. Clearly the game has some concept of these because it highlights them in the map view. Could that be exposed to mods somehow? I know they're not real entities in the game, but an API to find all contiguous resource patches in an area would be super useful.