Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fuel with "burnt_result" are not returning stacked "burnt_result" #25

Open
billbo99 opened this issue Oct 29, 2020 · 2 comments
Open

Fuel with "burnt_result" are not returning stacked "burnt_result" #25

billbo99 opened this issue Oct 29, 2020 · 2 comments

Comments

@billbo99
Copy link
Contributor

billbo99 commented Oct 29, 2020

The Original fuel item

["charged-antimatter-fuel-cell"] = {
      burnt_result = "empty-antimatter-fuel-cell",
      fuel_category = "antimatter-fuel",
      fuel_value = "300GJ",
      icon = "__Krastorio2__/graphics/icons/items/charged-antimatter-fuel-cell.png",
      icon_mipmaps = 4,
      icon_size = 64,
      name = "charged-antimatter-fuel-cell",
      order = "r[uranium-processing]-b2[antimatter-fuel-cell]-a2[charged-antimatter-fuel-cell]",
      stack_size = 10,
      subgroup = "intermediate-product",
      type = "item"
    }

The STACKED fuel item should have

burnt_result = "deadlock-stack-empty-antimatter-fuel-cell"

["deadlock-stack-charged-antimatter-fuel-cell"] = {
      allow_decomposition = false,
      flags = {},
      fuel_category = "antimatter-fuel",
      fuel_value = "1500GJ",
      icons = {
        {
          icon = "__deadlock-beltboxes-loaders__/graphics/icons/square/blank.png",
          icon_size = 32,
          scale = 1
        },
        {
          icon = "__Krastorio2__/graphics/icons/items/charged-antimatter-fuel-cell.png",
          icon_mipmaps = 4,
          icon_size = 64,
          scale = 0.425,
          shift = {
            0,
            3
          }
        },
        {
          icon = "__Krastorio2__/graphics/icons/items/charged-antimatter-fuel-cell.png",
          icon_mipmaps = 4,
          icon_size = 64,
          scale = 0.425,
          shift = {
            0,
            0
          }
        },
        {
          icon = "__Krastorio2__/graphics/icons/items/charged-antimatter-fuel-cell.png",
          icon_mipmaps = 4,
          icon_size = 64,
          scale = 0.425,
          shift = {
            0,
            -3
          }
        }
      },
      localised_name = {
        "item-name.deadlock-stacking-stack",
        {
          "item-name.charged-antimatter-fuel-cell"
        },
        5
      },
      name = "deadlock-stack-charged-antimatter-fuel-cell",
      order = "117",
      stack_size = 10,
      subgroup = "stacks-intermediate-products",
      type = "item"
    }
@shanemadden
Copy link
Owner

Tricky - we could check for whether deadlock-stack-X exists where X is the burnt_result, but that depends on the integration mod creating the burnt-stuff stack first, which is fiddly. I suppose we could just assume that it'll always get created, but if an integration mod doesn't do that it'll crash the data stage - might be a breaking change with some existing ones, but probably the better route.

@Deadlock989
Copy link
Contributor

I think this would be better handled with another optional parameter in add_stack. Ideally add_stack should be taking a table as a parameter like add_tier does but changing that now would be annoying.

That said, burnt_results are so rarely used in mods, I don't think it's unreasonable for a third party mod to manually set that up themselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants