Open goodroach opened 1 year ago
I think some sort of method to define a "gun" on a craft and a way to toggle director-ing of each gun would be beneficial. I think the hard part will be determining how to detect a "gun" and only direct if that gun is fired.
Actually, this doesn't actually require any "definition" of a gun. Because the plugin already directs guns a certain distance from the player, it will simply replace the player with named signs on the craft. Any cannon that fires within the range of the sign will be detected.
This is a quick drawing of what it would look like: Something I might want to test is to have a craft with a very small TNT director distance and see if it can direct properly. If this is possible, then my idea just might work.
I like that idea, perhaps we could even make it automatically detect a subcraft rotate turret/torpturret as a cannon node (probably a list of the subcraft rotate-able craft types to auto become a cannon node)?
I'd love to see a mock up of this!
The current issue with cannon directors is that cannon directors control all the guns on the ship. While this isn't a problem in smaller vessels, it is a problem for much larger vessels as they are unable to utilize any secondary armament as their usage takes attention from the main guns.
How to achieve it: Currently, cannon directors have a "range" at which they are able to influence the cannon projectiles vector. This is I believe set in the config as CannonDirectorDistance. When this feature is turned on, let signs with a name called "Cannon Node" with an appropriate name be used instead of a player. Any cannon that fires within the range of the sign (this range will be small) will be able to direct the cannon as long as the name under the "Cannon Director" sign is the same as the name under the "Cannon Node" sign.
I'm not entirely sure that this method is possible, and if it is please let me know if I can modify this to function better.