With get_quick_bar_slot you get the name of the item, its quality and as table field comparator as ComparatorString the type of quality comparison of a quickbar slot.
With set_quick_bar_slot you can set the item and its quality for a quickbar slot, but not the type of quality comparison, i.e. the comparator field (ComparatorString).
In my opinion, this is inconsistent.
So how can I set the comparator field?
[V2.0.22] How can you set the comparator with set_quick_bar_slot?
[V2.0.22] How can you set the comparator with set_quick_bar_slot?
My Mods: Picklocks Fusion Power | Picklocks Inserter | Picklocks Lithium Polymer Accumulator | Picklocks rocket silo stats | Picklocks Set Inventory Filters | Picklocks QuickBar Import/Export | Picklocks Nauvis Cliff-Explosives
Re: [V2.0.22] How can you set the comparator with set_quick_bar_slot?
You're right, that's a missing feature. This belongs in Modding Interface Requests.
It's easy to justify, because the devs intend for most "set" functions to accept the results of a "get" function. I just tested in 2.0.22 and this code:
will execute just fine, and matching the behavior in the documentation, erase the quality comparison the player configured for that slot.
It's easy to justify, because the devs intend for most "set" functions to accept the results of a "get" function. I just tested in 2.0.22 and this code:
Code: Select all
/c game.player.set_quick_bar_slot(1, game.player.get_quick_bar_slot(1))
My mods: Multiple Unit Train Control, Smart Artillery Wagons
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Re: [V2.0.22] How can you set the comparator with set_quick_bar_slot?
Thank you for the confirmation. I did a similar test with the same result.
@Moderators: So if this is a modding interface request, please move it accordingly.
@Moderators: So if this is a modding interface request, please move it accordingly.
My Mods: Picklocks Fusion Power | Picklocks Inserter | Picklocks Lithium Polymer Accumulator | Picklocks rocket silo stats | Picklocks Set Inventory Filters | Picklocks QuickBar Import/Export | Picklocks Nauvis Cliff-Explosives