RFE 1949 Add 'Stack Normally' to 'Does Not Stack' trait

I have a nice working version for this RFE - Yaaay!!! :slight_smile: but there is one issue I can not figure out how to resolve - Booh!! :cry: .

To be backward compatible the trait should default to “Does Not Stack” so that all modules already using the trait behave as originally intended, however I am only able to get the revised trait to default to “Stack Normally”.

If I reverse the applicable variable default NO STACK from false to true and the corresponding relevant section of mySetType to false then the stacking part of the trait no longer works!

Brent or someone, could you take a look and tell me how to reverse it - I’m stumped! It is in my tmccarron32 branch, VASSAL.counters.Immobilized

Would like to wrap this enhancement up so I can tackle another - I have my eye on a couple I may be able to do with some help and pointers like this one

Hi Tim,

My first inclination in a situation like this is to leave the old trait as
is, and define a new one with the revised functionality. Mark the old trait
as deprecated if desired. Is there a reason against that approach here?

Pieter

You can still bring the code together by deriving the putting the new code in class TraitX and making Trait a shell that simply extends TraitX and in its constructor resets to the old default.

Hi Pieter,

As I recall, when we discussed this RFE, one of us didn’t think it would be a good idea to remake and have essentially 2 identical traits (barring the small change) in the editor - it might confuse designers and it was thought the trait list was already a long mess that needed sorting out - not added to, so I was just going by that ancient train of thought which may be faulty on my part :smiley: