Page 1 of 1

[2.0.34] Technology level not visualized when max_level=integer

Posted: Sun Feb 16, 2025 9:29 pm
by startupgaming
When setting TechnologyPrototype::max_level to an integer, while it does behave correctly in limiting the technology level to the given number and turning it green at such level, it doesn't show the level on the technology image as other infinite technologies.
I'd have expected it to show something along the lines of [3] 1-30 in the situation shown below
immagine.png
immagine.png (147.57 KiB) Viewed 101 times

Code: Select all

{
    type = "technology",
    name = "thruster-efficiency",
    icons = util.technology_icon_constant_movement_speed("__space-age__/graphics/technology/space-platform-thruster.png"),
    icon_size = 256,
    effects = {
      {
        type = "nothing",
        use_icon_overlay_constant = false,
        icons = {
          {
            icon = "__space-age__/graphics/icons/thruster.png",
            icon_size = 64,
          },
          {
            icon = "__core__/graphics/icons/technology/effect-constant/effect-constant-movement-speed.png",
            icon_size = 64,
            scale = 0.5,
            --shift = {25, 25},
            floating = true
          }
        },
        effect_description = { "modifier-description.thruster-efficiency", tostring(0.1) }
      }
    },
    prerequisites = { "promethium-science-pack" },
    unit =
    {
      count_formula = "2^L*1000",
      ingredients =
      {
        { "automation-science-pack", 1 },
        { "logistic-science-pack", 1 },
        { "chemical-science-pack", 1 },
        { "utility-science-pack", 1 },
        { "space-science-pack", 1 },
        { "promethium-science-pack", 1 }
      },
      time = 60
    },
    max_level = 30,
    upgrade = true
  }