[Genhis][2.0.65] Technology icons show both research_trigger and unit, but only research_trigger is used

Bugs which we just recently fixed in our development version and will reach you in the next release.
Subject314159
Burner Inserter
Burner Inserter
Posts: 14
Joined: Thu Oct 12, 2023 8:53 pm
Contact:

[Genhis][2.0.65] Technology icons show both research_trigger and unit, but only research_trigger is used

Post by Subject314159 »

When defining a TechnologyPrototype with both a research_trigger and a cost then the technology screen shows the icons from both parameters, but only the research_trigger is used to unlock the technology.

Used code:

Code: Select all

data:extend({{
    type = "technology",
    name = "foo-train",
    icon = "__base__/graphics/technology/railway.png",
    icon_size = 256,
    research_trigger = {
        type = "mine-entity",
        entity = "locomotive"
    },
    unit = {
        count = 1,
        time = 1,
        ingredients = {{"automation-science-pack", 1}}
    },
    effects = {{
        type = "unlock-recipe",
        recipe = "locomotive"
    }}
}})
Observed result:
Image
When mining a locomotive this technology is unlocked and the research cost is omitted. Therefore the icons from the research cost are redundant.

Expected result:
Image

Next to that, either Factorio should throw an error if both research_trigger and cost are defined, or update the API docs to state that cost does nothing if research_trigger is defined.
Genhis
Factorio Staff
Factorio Staff
Posts: 859
Joined: Wed Dec 24, 2014 8:19 am
Contact:

Re: [Genhis][2.0.65] Technology icons show both research_trigger and unit, but only research_trigger is used

Post by Genhis »

Thanks for the report, this is fixed for 2.0.67. For now I decided not to add the prototype check if both are present.
Post Reply

Return to “Resolved for the next release”