Factorissimo


Adds factory buildings you can walk into and build parts of your factory inside. This mod will not be updated for Factorio 0.15! Get Factorissimo2 instead, it's much better.

7 years ago
0.13.0 - 0.14
45

b Items are fully repaired when moved from inside to outside or vice versa

8 years ago

Ran into this while using the miniaturization mod and confirmed that it happens manually as well.
To reproduce: take any damaged object (for my test, I threw a grenade at a furnace then mined it) and drop it on a belt that moves outside the factory.
Expected behavior: object retains damage information
Observed behavior: object's damage is entirely healed

The miniaturization mod exploits damage information to save the type of item that is miniaturized (what an idea! ;) ), so moving into or out of a factory makes the package null and causes a hard crash when you try to unpack it. As an interesting note, you can exploit this to repair other things after, say, a biter assault.

I poked around in your mod's lua files and see that you're using the built-in insert_at API function to literally instantiate a new item of the same type on the output, then remove a same-typed one on the input if it was successful. It looks like anything that would preserve damage value would use up significantly more CPU than you are, but you're a more clever man than me with more experience modding so I'll let you think about it.

As for the miniaturization mod, I think one fix would be to have unique packages for each packed object, but that's not very compatible and of course doubles the number of object types (packed vs loose).