Page 1 of 1
[Twinsen][1.1.0] manipulating logistic requests by script seems not to update the GUI correctly if GUI is open
Posted: Tue Nov 24, 2020 10:43 pm
by Daeruun
Hi there,
first things first:
Thanks for all the love you guys give this game, it's once more an amazing update!
I'm just updating some mod due to changes in logistic-modding.
During testing of my fix I noticed that the player-GUI seems not to get updated correctly if I add a Logistic Request that should lead to extension of the number of slots.
The extension is done once the GUI is closed and updated or a slot in the last existing row is manually configured.
Steps to reproduce:
1. Open the character-logistic-tab (F1)
2. Have no logistic slots set. There should now be 4 rows of 10 (empty) slots.
3. Add a request for 50 wooden chests to the 35th slot using
Code: Select all
/c game.player.character.set_personal_logistic_slot(35,{name="wooden-chest",min=50})
4. See something like this:

- slot 35 added by script when panel visible and no slots were configured
- Screenshot 2020-11-24 232246.jpg (40.3 KiB) Viewed 4046 times
sidenote: adding a (single) request to the first slot of that row does not extend the slots either if no other slot in that row is configured:

- slot 30 added manually when no other slot is set
- Screenshot 2020-11-24 232602.jpg (38.59 KiB) Viewed 4046 times
[edit] changed title as this seems not to be limited to set_personal_logistic_slot()
Re: [1.1.0] adding logistic requests by set_personal_logistic_slot() seems not to update the GUI correctly if GUI is ope
Posted: Tue Nov 24, 2020 11:00 pm
by Daeruun
Oh, just noticed:
if you add a slot further down (by script), it will not be visible until the GUI is closed and re-opened or visible slot is manipulated manually.
Someting similar happens when deleting slots by sript:
Code: Select all
/c local slots = game.player.character.request_slot_count; game.player.print (slots) for i=1, slots do game.player.character.clear_personal_logistic_slot(i) end
that gives me 73 set slots:

- 73 set slots
- Screenshot 2020-11-24 235705.jpg (56.13 KiB) Viewed 4037 times
the result of the rest of the script looks like this:

- leftover after execution of the above script
- Screenshot 2020-11-24 235758.jpg (36.17 KiB) Viewed 4037 times
closing and opening the GUI refreshes everything and no slots are set
Re: [1.1.0] adding logistic requests by set_personal_logistic_slot() seems not to update the GUI correctly if GUI is ope
Posted: Tue Nov 24, 2020 11:02 pm
by Choumiko
Daeruun wrote: Tue Nov 24, 2020 10:43 pm
sidenote: adding a (single) request to the first slot of that row does not extend the slots either if no other slot in that row is configured:
That is also the case when you do it manually via the gui. So far i assumed it is intentional (for whatever reason)
Regarding to set_personal_logistic_slot:
-Open the gui, logistic tab
Code: Select all
/c game.player.character.set_personal_logistic_slot(45,{name="wooden-chest",min=50})
gui is not updated, close and open, slot is set
Code: Select all
/c game.player.character.clear_personal_logistic_slot(45)
gui is not updated, close and open, slot is cleared.
Re: [1.1.0] adding logistic requests by set_personal_logistic_slot() seems not to update the GUI correctly if GUI is ope
Posted: Tue Nov 24, 2020 11:13 pm
by Daeruun
Choumiko wrote: Tue Nov 24, 2020 11:02 pm
Daeruun wrote: Tue Nov 24, 2020 10:43 pm
sidenote: adding a (single) request to the first slot of that row does not extend the slots either if no other slot in that row is configured:
That is also the case when you do it manually via the gui. So far i assumed it is intentional (for whatever reason)
Sorry, I missed to add that this was done manually.
Choumiko wrote: Tue Nov 24, 2020 11:02 pm
Regarding to set_personal_logistic_slot:
-Open the gui, logistic tab
Code: Select all
/c game.player.character.set_personal_logistic_slot(45,{name="wooden-chest",min=50})
gui is not updated, close and open, slot is set
Code: Select all
/c game.player.character.clear_personal_logistic_slot(45)
gui is not updated, close and open, slot is cleared.
That sums it up quit well.

Re: [Twinsen][1.1.0] manipulating logistic requests by script seems not to update the GUI correctly if GUI is open
Posted: Wed Nov 25, 2020 12:42 pm
by Twinsen
Should be fixed in Version: 1.1.2
Thanks for the report.
Re: [Twinsen][1.1.0] manipulating logistic requests by script seems not to update the GUI correctly if GUI is open
Posted: Wed Nov 25, 2020 6:30 pm
by Choumiko
Twinsen wrote: Wed Nov 25, 2020 12:42 pm
Should be fixed in Version: 1.1.2
I was just messing around with spidertron logistics and on 1.1 it's the same behavior:
get in a spidertron, open the gui, switch to logistics tab
Code: Select all
/c game.player.vehicle.set_vehicle_logistic_slot(45,{name="wooden-chest",min=50})
no gui update, close, open
Code: Select all
/c game.player.vehicle.clear_vehicle_logistic_slot(45)
no gui update, close, open
Wonder if it got fixed with the player fix, although i guess not since it's a different function/gui ?
Re: [Twinsen][1.1.0] manipulating logistic requests by script seems not to update the GUI correctly if GUI is open
Posted: Thu Nov 26, 2020 12:50 pm
by Twinsen
Choumiko wrote: Wed Nov 25, 2020 6:30 pm
Twinsen wrote: Wed Nov 25, 2020 12:42 pm
Should be fixed in Version: 1.1.2
I was just messing around with spidertron logistics and on 1.1 it's the same behavior:
Damn, you confused me.
Version: 1.1.2 has not released yet. I made the fix just as 1.1.1 was released.