Hi, after one year plus I am back working on my module and I have a few problems with the Restrict Commands trait. I am using version 3.0.17.
-
It seems to me that the “disable” restriction is buggy: after disabling a command it is not enabled again when restrict conditions are not matched anymore (e.g. CurrentMap, CurrentZone);
-
“hide” works instead, in that respect, but I can’t get it to parse things like $playerSide$, $PlayerSide$, $BasicName$ or, say, $TS$, where TS is a global property I set up at module level, in the restrict conditions.
Example of working restrict condition: CurrentMap != Allies
Example of not working restrict condition: CurrentMap != $playerSide$
(where player sides are Axis and Allies, say).
Example 2 working: CurrentBoard = Infantry Free Area
Example 2 not working: CurrentBoard = $BasicName$ Free Area
(where I have pieces like Infantry and Navy, say).
I should probably add that this restrict command is defined for a piece prototype. This might explain why the $TS$ thing is not parsed, since I change TS in the prototype itself with a set global property command (and I have read this is a bug in 3.0.17). However, why won’t $playerSide$, $BasicName$ etc work?
Thanks in advance for any help,
Stefano