Hi there,
Basically each turret is a composite-entity of a turret linked to a power sink behind the scenes. If the power sink isn't powered, the turret is inactive. There is a catch to this - the check whether the behind-the-scenes power sink is powered or not currently happens in the lua code of the mod, so in theory there is a performance hit (but most of the time should be minimal)
I wrote this a couple of years ago now more as a proof of concept - there might be newer API features to make it a bit cleaner and with less of a 'potential' performance impact, but I haven't looked into it in awhile. I'll have a look sometime.
Thanks
Jack