For version 0.15.7.
I spliced the v0.15.7 vanilla turretfactory.lua with your your version, made some edits. Created one laser turret and it worked but I recommend backup before use. As stated, credits to original author.
Also, HF's "exotic rarity turret's" line included (see post above, code now at line 426)
/M
turretfactory.zip