Reverse Factory

by Kryzeth

Reverse Factory machine will recycle (uncraft) nearly any item placed inside. Supports the recycling of most, if not all, modded items. Fully featured integration with Bobs Mods, Industrial Revolution, and Fantario (independently, not simultaneously)

Content
14 days ago
0.13 - 2.0
63.3K
Manufacturing

b [Fixed] SE+K2 support

2 years ago

Hey, great mod, but it seems that right now it does not support K2+SE combination correctly. I've tried reversing some items, and the reverse recipes aren't correct with this combination. E.g. all inserter reverse recipes are true to the standalone K2, not the overly-complex recipes from K2+SE. Tech cards are also not considered correctly, like blue tech returning 1 engine + 3 adv.circuit + 2 sulfur /per 3 tech cards, which obviously does not correspond to the K2/K2+SE tech card recipe.

Somewhy SE postprocess has reverse factory mod as a hidden optional prerequisite, so its final-fixes will always run after your final-fixes, so there seems to be not much that can be done about. But I suggest you to encapsulate your final-fixes in a function, and run it by default, but make an option that some other mod would run it in its own data-final-fixes. Probably a mod that would blasphemously set SE postprocessing as a prerequisite lol.

2 years ago

I mean, in your mod:
data.lua

function ReverseFactory.FinalFixes()
  -- do stuff...
end
ReverseFactory.finalFixesPrevented = false
function ReverseFactory.preventFinalFixes():
  ReverseFactory.finalFixesPrevented = true
end

data-final-fixes.lua:

if not ReverseFactory.finalFixesPrevented then
  ReverseFactory.FinalFixes()
end

and in some other's mod:
data.lua:

if mods["reverse-factory"]:
  ReverseFactory.preventFinalFixes()
end

data-final-fixes.lua:

if mods["reverse-factory"]:
  ReverseFactory.FinalFixes()
end
2 years ago

JFYI I've done this approach and it fixed reverse recipes for me. Not the ideal solution, but it works, at least...

2 years ago
(updated 2 years ago)

Hello, this is very late, but many thanks for the idea! I've noticed it before, but didn't have the time to implement in a way that I liked until now; I have released a post-processing mod of my own, which blasphemously uses SE postprocessing as a required dependency lol.

As far as I could tell, Space Exploration (postprocessing) doesn't actually require Reverse Factory to run first, as it currently doesn't reference my mod in any way, but I imagine that it must have been for some other reason. But testing with a few different loadouts, including SE and K2, and everything seemed to work properly?

The only thing my new postprocessing mod does, is create the reverse recipes, as it usually would, but delaying until after SE has finished modifying things. Finally can mark this one as Solved!

New response