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
10 hours ago
0.13 - 2.0
62.6K
Manufacturing

b [Fixed?] Potential scripting timebomb

26 days ago

You have this:
script.on_init(function()
global = {}
end)

and

script.on_configuration_changed(function()
global = {}
end)

Which could be a time-bomb in the mod. Why are you not using the built in "storage" system???
Adding globals like you do can lead to multiplayer desyncs and should be avoided.

26 days ago
(updated 26 days ago)

At the time of the initial 2.0 update, I hadn't realized that the persistent "global" table had been changed to "storage", and I did that in attempts to fix the errors. Of course, any potential decync issues can always be avoided by simply disabling the auto push ingredients feature, though I know that's not an ideal solution. I believe that feature still has a description along the lines of "untested in multiplayer, may cause desyncs", which should be enough of a disclaimer to disable it in multiplayer

I will try to fix this when I can, but it's not at the top of my list of priorities atm (since it doesn't inherently cause any crashing in single-player, and I have other mods with more pressing concerns) Quietly moving this up to the top of the priority list...

26 days ago

Oh great, so i do not need to look into the code to find why https://forums.factorio.com/118200 happened.

26 days ago

Thank you @boskid for the investigation!
Glad we got it sorted out! Will disable the option now to prevent my server from imploding.

26 days ago

Can confirm this mod causes a desync with the auto-push option as I just triggered one easily with an inserter on my server.

26 days ago
(updated 26 days ago)

Potentially fixed in v9.0.9? I changed all the references from global table to storage table, and tried playing around a bit on a test map, using Editor Extensions and an offline copy of the game joining my Steam copy, with AAI loaders constantly pulling items out of the output slot with a partial recipe, just like in the forums example; also tried saving and reloading the game, and continuing the same process, and didn't get any desyncs.

As a single player, it's not easy for me to test multiplayer features, but it might be working now?

26 days ago

For development purposes to check if there are desyncs you can always use /toggle-heavy-mode, when enabled it will slow the game significantly but this is because in heavy mode, the game is saved and loaded multiple times each tick and update is performed as if it was done by server and by a client to see if they both agree on the new game state. If heavy-mode is not throwing any desyncs then usually MP should be fine.

New response