Hi, I develop a mod, adding quite a lot of scripts, and received a bug report regarding an incompatibility with Water Turret.
The problem relates to trees. Water turret removes all the elements of the resistance table of trees, normally all Factorio prototypes have a full resistances table, even if the contents indicate no resistances.
Looking at your code, it seems like you remove all the resistances and then re-add them, so maybe you don't end up re-adding them for trees.
Thanks.
https://mods.factorio.com/mod/True-Nukes/discussion/5febc840af3fd3e75666a91f