Adamo Nuclear

by ElAdamo

Always number one. Always Nuka Cola!

Content
3 years ago
0.17 - 1.0
24
Manufacturing

g Can I use this mod with Krastorio 2 mod?

4 years ago
(updated 4 years ago)

I want to use this mod with Krastorio 2 or Space Exploration mod. Is it compatible with these mods?

4 years ago
(updated 4 years ago)

.

4 years ago

It shouldn't crash. I tested it. Not sure that all features will work, but knock yourself out, and let me know if you find any issues.

3 years ago
(updated 3 years ago)

The issue with Krastorio2 is that it uses stock Uranium-238 for its science packs and this mods adds "depleted uranium" as separate item, so there is no way to create science packs. Alternatively just "if there is krastorio2 on mod list, add recipe to convert depleted uranium into u238" would be enough of a workaround to just make it work.

3 years ago
(updated 3 years ago)

I did write that into my code, a long time ago...

if settings.startup["adamo-nuclear-recipe-trolling"].value then
    for _,recipe in pairs(data.raw.recipe) do
        if recipe_uses(recipe,"uranium-238") then
            replace_recipe_io(
                recipe,
                "uranium-238",
                "adamo-nuclear-DU-oxide"
            )
        end
        if recipe_uses(recipe,"uranium-235") then
            replace_recipe_io(
                recipe,
                "uranium-235",
                "adamo-nuclear-HEU-oxide"
            )
        end
    end
end

Just double check for me: the recipe trolling setting in this mod is turned on for you, right?

Maybe he's creating more recipes in a later data phase... I'll move this to the very end of the final phase, I guess. It becomes something of a race issue, but I think that should be OK.

3 years ago
(updated 3 years ago)

Yes, the setting is turned on.

I've tested few things and 2 changes appear to be needed:

  • moving the recipe trolling to data-final-fixes.lua
  • adding "? Krastorio2" in dependencies to make this mod load after Krastorio2

Krastorio2 appears to also be doing the recipe stuff in the data-final-fixes.lua so that's probably a reason why those changes are needed.

It also fixes other bug, HEU fuel cell value stays at 50GJ (Krastorio2 value) if Krastorio2 is loaded second.

There is also one other HEU fuel cell bug altho it is not Krastorio2 related, recipe accepts productivity modules which means you can get more HEU hex than you put into it from the cycle as you get 1.4 fuel cell per 10 HEU hex

3 years ago

Yes, I think you're right that this is a data race issue. I think I probably tried to put it at the end before and found a broken race condition. But I will try it again over the weekend and release if it seems to work.

3 years ago

To clarify I just moved the recipe trolling snippet in that file, added dependency, and left rest of stuff untouched. From what I've tested it looks like it works fine, even tried with Space exploration added

3 years ago

Thanks for confirming that for me. I'll apply the change to the mod here as well.

New response