It seems like it only returns true and updates the UI when min and max are different to the value that was set previously.
If only min changes, then it returns false, but the value is set anyways without updating the UI
If only max changes, it returns false and doesn't update anything
To reproduce:
- start a new game
- /cheat to unlock logistic requests
- open Character gui, logistics tab
- In the console run the following commands:
Code: Select all
/c game.print(serpent.line(game.player.set_personal_logistic_slot(1, {name = "wooden-chest", min = 0, max = 1000})))
Only changing min
Code: Select all
/c game.print(serpent.line(game.player.set_personal_logistic_slot(1, {name = "wooden-chest", min = 10, max = 1000})))
- Close/Open the ui: numbers are updated
Only changing max
Code: Select all
/c game.print(serpent.line(game.player.set_personal_logistic_slot(1, {name = "wooden-chest", min = 10, max = 2000})))
Only changing min and max (since the last command didn't work max is still at 1k)
Code: Select all
/c game.print(serpent.line(game.player.set_personal_logistic_slot(1, {name = "wooden-chest", min = 15, max = 2000})))
Only changing min
Code: Select all
/c game.print(serpent.line(game.player.set_personal_logistic_slot(1, {name = "wooden-chest", min = 0, max = 2000})))
- Close/Open the ui: numbers are updated
Changing min and max
Code: Select all
/c game.print(serpent.line(game.player.set_personal_logistic_slot(1, {name = "wooden-chest", min = 10, max = 1000})))
Expected behavior: Just work

- Update the values even when only one of them changes, in that case return true and update the UI