Page 1 of 1

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

Posted: Thu Dec 12, 2024 4:07 pm
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 365 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 365 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

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

Posted: Fri Jan 17, 2025 1:34 pm
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.