In-line expressions in global properties

Well, my idea was that any Global Calculated Properties would be “global” just in the sense it is not specific to the given counter. It would only reference global properties.

For example, to let people individually choose language specific images (see other thread) I need layers to follow something like $playerSide$_language. Once you have actually updated the layer trait to accept in-line expressions (see this thread) I could do that easily, but at the moment I need to add to every single piece/prototype the same Calculated Property, such as Language with value GetProperty(playerSide+“_language”), and have layers follow that instead.

It would be much easier, I think, to add that CP just once at module level, instead. Extend this simple example to cases where a lot of pieces/prototypes need to use a much more complex in-line expression/CP (but one still only using global properties)… Any re-working of the in-line expression/CP would need to be copied over all over the module (pieces and prototypes), with much scope for error, instead of just one single edit trickling done nice and easy.

I have never really done any OOP, so please forgive me my approximate language/understanding of it… but I guess that the Global Calculated Properties could just be the exact same lines of code already there for “normal” CP’s, but placed at top level… inheritable from every other class, couldn’t they?

I understand, so that does it then, no problem. I guess a workaround for me is to simply add the common CP’s to a new “library” type prototype shared by every single piece in my module (still scope for error if I forget to add it to some piece somewhere, though).