When your enemies attack your base, your destroyed machines drop the material to re-build.
Mods introducing new content into the game.
Play it your way.
https://pastebin.com/yR4QXJQY I don't know whose mistake I'll create 2 topics https://mods.factorio.com/mod/WideChests/discussion/5dc9350a626cd3000ba22c7c
https://pastebin.com/BaSFZ9Qr Seems it's yours
+ .-.