I didn’t realize that players made their own custom traits. Well you’re stuck with that API then. That’s unfortunate.
There’s a software design theory that says that programming structures should mirror user-interface structures. So if users think of a list of traits as a list, then they should be implemented as a list.
In that other thread, question about delete and order, I think a big part of the reason it took 20 posts to get the answer to, what I felt was a relatively straightforward question, is that there is a disconnect between how the user interacts with traits and how the java code implements them. If dispatching keystrokes to traits were implemented using a visitor pattern, then I bet instead of 20 posts, it would have only taken 2 posts to find the answer to my question, because all you’d need to do is read the answer straight off of the trait walker method. As it stands now, to get the answer, you need to go into each and every trait to see how they interact with each and every other trait. That’s nasty.
But you’re right. If there’s custom code out there that is using this (unintuitive) API, then we’re stuck with it. I know it makes perfect sense to the VASSAL engine coders. But to the average module designer, it’s baffling.
Ken