[2.0.23] choose-elem-button doesn't show comparator or "any quality"

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
Sharparam
Inserter
Inserter
Posts: 34
Joined: Sat Mar 25, 2023 11:21 pm
Contact:

[2.0.23] choose-elem-button doesn't show comparator or "any quality"

Post by Sharparam »

When setting the elem_value on a choose-elem-button to something that has the comparator field set, it won't show the comparator symbol (e.g. ">") on the button.

Similar issue when using a value that has neither comparator nor quality set (which means a filter for "any quality"), this doesn't show anything at all on the button, making it look like a normal quality value.

Example of what the base game UI shows in a constant combinator section when having signals that have a comparator or "any quality" set:
base_game.png
base_game.png (31.99 KiB) Viewed 363 times
But when trying to do the same with choose-elem-button, it's bugged:
choose-elem-button.png
choose-elem-button.png (30.82 KiB) Viewed 363 times
The object assigned to the left button's elem_value is:

Code: Select all

{
  comparator = ">",
  name = "iron-chest",
  quality = "uncommon",
  type = "item"
}
and to the right button's elem_value:

Code: Select all

{
  name = "wooden-chest",
  type = "item"
}
The scenario can be reproduced by:
  1. Open the player inventory.
  2. Add a trash filter for "iron chest with higher than uncommon quality"
  3. Add a trash filter for "wooden chest of any quality"
  4. Give the section a group so it can be added to a constant combinator
  5. Construct a constant combinator
  6. Set the section in it to use the group defined earlier
  7. Observe how the buttons display properly
  8. Try to set the same filters on custom choose-elem-buttons (or just set the above described elem_value objects directly)
  9. Observe how the buttons do not show the information, misleading the player into thinking they have values they do not
Attachments
factorio-current.log
Log file
(12.65 KiB) Downloaded 36 times
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 4033
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [2.0.23] choose-elem-button doesn't show comparator or "any quality"

Post by boskid »

I am not seeing elem_value to be documented as supporting `comparator` which makes this Not a bug. Moving to modding interface requests.
Post Reply

Return to “Modding interface requests”