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
23 hours ago
0.13 - 2.0
61.7K
Manufacturing

i [Implemented] Option to exclude crafting categories?

5 years ago

Would it be possible to allow other mods to specify crafting categories as irreversible. Something like rf.irreversible_crafting_categories = {} in your data.lua

Then other mods can add a category that they know would cause errors or should not be reversible. Like:
if rf and rf.irreversible_crafting_categories then table.insert(rf.irreversible_crafting_categories, "se-space-particle-accelerator") end

5 years ago

It would definitely be possible to add such a table for other mods to fill, since I do already have a function that could take such an input.

Is there any particular reason why you would request something like this? Unless you just wanted more control over mod interactions between yours and other's mods?

5 years ago

I just launched the Space Exploration mod but there is a conflict because I have a lot of unreliable recipes dealing with data (e.g.30% to be successful). That translates into ingredients with 0 amounts, throwing an error. I was going to make a post about that, but actually most of the recipes in that category shouldn't be reversible because the resources are lost in the data generation. It would make sense for me to just exclude the category.

5 years ago
(updated 5 years ago)

Alright, got it. Just added this functionality to v6.0.5; you can add to the list of unrecyclables via :

table.insert(rf.norecycle_items, "example-recipe")
table.insert(rf.norecycle_categories, "example-category")
5 years ago

That's great, thanks.

5 years ago
(updated 5 years ago)

Sorry to bump an old topic, but is "space-radiation" another one of those categories which should be non-recyclable?

My new update of reverse factory seems to error out with a certain "radiation-data" item, the recipe of which includes probabilities (which as you say, translate into ingredients with 0 amounts), and is in the "space-radiation" category.

Just wondering if I should attempt a fix from my side, or if this category was supposed to be on the list of non-recyclables.

EDIT: Never mind, I decided to fix it from my side; reverse factory will no longer attempt to reverse recipes with a defined probability. You probably won't need to define the categories anymore with this change, but it wouldn't hurt to keep them on the list (stops attempting to reverse recipe earlier than having to check for probability)

5 years ago

Thanks. I'll exclude space-radiation for the next version anyway.

5 years ago

Yeah, I found there were actually a few other categories that were causing the probability error, but I forgot to write them down after I implemented the probability-exclusion logic.

Definitely would be better idea to add in those categories, since the logic might change in the future, to allow the recycling of certain probability-based recipes.

New response