This is something I've finished yesterday. This code allows us to control items based on ship classes so we don't have to use uncertain power checks or big cargo size requirements for items anymore. It allows balancing specific items in a simple, flawless way.
I've also added more code to allow detection of multiple items. What we want to do here is prevent specific combos from being possible. In the picture above, my test was to make it impossible to undock if you have a MK1 disruptor and a liberty gb forward gun mounted at the same time. From the moment you unmount one of the two, you'll be able undock.
You might wonder why that check isn't performed while clicking the mount button. The reason is that it's buggy as hell and people would later complain about things suddenly being unmounted.