Page 1 of 1

Linked chest : Changing link_id in GUI is also changing in intermediate steps.

Posted: Thu Jul 29, 2021 11:24 am
by hreintke
I have a linked chest, link-id has top checkbox selected, contents is copper plates
Copper_linked.PNG
Copper_linked.PNG (62.77 KiB) Viewed 2644 times
A second linked chest has checkbox two selected, contents is rocket fuel.
Rocket_link.PNG
Rocket_link.PNG (86.91 KiB) Viewed 2644 times
Then I create a third linked chest, which as link_id should get both top and second checkbox selected.
New_linked.PNG
New_linked.PNG (29.18 KiB) Viewed 2644 times


When setting the link_id for the third (need to tick two), it first gets the first link_id and content.
It is also fully operational -> inserters take items out of the chest.
Only after the second click it has the correct link_id.

In the intermediate situation, the wrong content is transferred.

- How can I update the link_id in "one go"

- If that is not possible, can I "remove" the middle part of the gui and create gui in a mod to facilitate that ?

Re: Linked chest : Changing link_id in GUI is also changing in intermediate steps.

Posted: Thu Jul 29, 2021 12:41 pm
by DaveMcW

Code: Select all

/c game.player.selected.link_id = tonumber("00000000000000000000000000000011", 2)
Each 1 represents a checked box. Each 0 represents an empty box. The 2 at the end should never change, it indicates that you are working in binary.

Re: Linked chest : Changing link_id in GUI is also changing in intermediate steps.

Posted: Fri Jul 30, 2021 2:52 pm
by hreintke
Yes, I know the lua way to do it.

BTW there is no need to use binary : entity.link_id = value; value being between 0 and 255 inclusive.

Made a small mod with gui to change the values and visualize the linked chests.

Re: Linked chest : Changing link_id in GUI is also changing in intermediate steps.

Posted: Mon Oct 18, 2021 10:03 pm
by Job
hreintke wrote:
Fri Jul 30, 2021 2:52 pm
Made a small mod with gui to change the values and visualize the linked chests.
Which mod is that? I could not find it while searching.

Re: Linked chest : Changing link_id in GUI is also changing in intermediate steps.

Posted: Tue Oct 19, 2021 12:06 am
by mrvn
Create a linked chest somewhere out of the way, configure it and then copy&paste the config or blueprint the chest?

Maybe factorio could borrow an idea from Minecraft: Locked chests. When you open a locked chest then things can't be added or removed from the chest by automation until you close it again.

Re: Linked chest : Changing link_id in GUI is also changing in intermediate steps.

Posted: Tue Oct 19, 2021 10:57 pm
by Job
mrvn wrote:
Tue Oct 19, 2021 12:06 am
Create a linked chest somewhere out of the way, configure it and then copy&paste the config or blueprint the chest?
I had tried these methods, but if hreintke has a gui (that is shareable), that could be a great quality of life enhancement.