Ooo do you mind if I eyeball your code? I might slap one of those fine new items on my Caducious.
Examine away, but you won't find any special scripting; the engine that makes the turrets work is built natively into Oolite itself.
Player ship turrets are the same as NPC turrets, they just follow the player's lead.
Running Oolite buttery smooth & rock stable w/ tons of eyecandy oxps on:
ASUS Prime X370-A
Ryzen 5 1500X
16GB DDR4 3200MHZ
128GB NVMe M.2 SSD (Boot drive)
1TB Hybrid HDD (For software and games)
EVGA GTX-1070 SC
1080P Samsung large screen monitor