Page 1 of 1

[0.17.50] "Undiscovered" technologies can be researched

Posted: Sun Jun 23, 2019 10:10 pm
by Muppet9010
If I disable an infinite technology which has the "visible_when_disabled" property as true it appears in the list as I'd expect, however it can still be researched if clicked when in normal gameplay mode (non editor). The technology is listed as "undiscovered" and has no background color implying it is different to the "Available" technologies with their green backgrounds.
Capture.PNG
Capture.PNG (60.62 KiB) Viewed 2263 times
The API spec doesn't state the showing a disabled technology will reverse the disabling effect and allow for its research. Hence why I believe this is a bug
https://lua-api.factorio.com/latest/Lua ... y.enabled

I hit this as I have a technology set to be visible_when_disabled = true, as I enable/disable it via script based on ingame events and I want it to be seen on the tech tree before its unlocked so the progression is visible.

Full technology prototype code:

Code: Select all

{
            type = "technology",
            name = "wills_spaceship_repair-order_decryption-1",
            icon_size = 128,
            icon = Constants.AssetModName .. "/graphics/spacex/technology/ftl.png",
            prerequisites = {"wills_spaceship_repair-dry_dock-1"},
            unit = {
                count_formula = "1000",
                ingredients = {
                    {"automation-science-pack", 1},
                    {"logistic-science-pack", 1},
                    {"military-science-pack", 1},
                    {"chemical-science-pack", 1},
                    {"production-science-pack", 1},
                    {"utility-science-pack", 1},
                    {"space-science-pack", 1}
                },
                time = 60
            },
            effects = {
                {
                    type = "nothing",
                    effect_description = {"technology-effect.wills_spaceship_repair-order_decryption"}
                }
            },
            enabled = false,
            visible_when_disabled = true,
            upgrade = true,
            max_level = "infinite",
            order = "zzz"
        }

Re: [0.17.50] "Undiscovered" technologies can be researched

Posted: Thu Jun 27, 2019 5:33 pm
by Rseding91
Thanks for the report. It's now fixed for the next version of 0.17.