Page 1 of 1

A strange problem, can you help me solve it?

Posted: Wed Apr 27, 2022 5:42 am
by sdgmlj
I wrote a script to automatically place the buildings in the blueprint (no robot is required), but after automatically adding the plug-in, the icon of "item demand" still exists. Is there any way to delete this icon?

Re: A strange problem, can you help me solve it?

Posted: Wed Apr 27, 2022 10:58 am
by robot256
That's called an 'item-request-proxy' entity. It has the same coordinates as the machine, so you can find it with:

Code: Select all

local proxies = target.surface.find_entities_filtered{
            name = "item-request-proxy",
            position = target.position
          }
Where target is the assembler LuaEntity object.

Re: A strange problem, can you help me solve it?

Posted: Wed Apr 27, 2022 1:39 pm
by sdgmlj
robot256 wrote: Wed Apr 27, 2022 10:58 am That's called an 'item-request-proxy' entity. It has the same coordinates as the machine, so you can find it with:

Code: Select all

local proxies = target.surface.find_entities_filtered{
            name = "item-request-proxy",
            position = target.position
          }
Where target is the assembler LuaEntity object.
Thank you. I'll study it