Hi Paul-- ah, I didn't see that! That IS interesting, and, I think, demonstrates that there are actually two problems here. Those contacts on the "PBEM" side should belong to "PBEM", even though they are detected and reported by "USN." Note that if you get the underlying enemy unit and print its .ascontact field, you'll notice that it exists as TWO contacts: one on the "USN" side (the detected contact) and one on the "PBEM" side (the reported contact). So changing their posture on the "PBEM" side shouldn't affect the posture on the "USN" side, because they're two separate contact objects.
To summarize the issues I'm reporting:
1) (the original issue) In Lua, changing posture toward contacts that have been reported from a friendly side is NOT reflected in the CMO UI -- the contact remains the same color on the map as it was when first reported. Note that you can still change the contact color by changing posture manually from the right-click menu UI, but if you do the same thing with Lua, it has no effect, although it should be equivalent.
2) (the issue you found) In Lua, changing side A's posture toward contacts that have been reported to side A by a friendly side B changes B's posture toward that contact, but not A's. I would argue that it should be the other way around. Note that this ONLY happens in Lua. If you change the posture manually from the right-click menu UI, you will only change A's posture, and B's posture will be unaffected, which is the way it 'should' work.
(To answer your other question, this WAS related to some PBEM work, but I've stripped out all of that to demo this issue. In my use case, being placed on the PBEM side is how a player controlling the USN side is prevented from giving new orders during a limited order phase, but can still see what's happening -- but this contact issue would apply to any situation in which one side is receiving reported contacts from another friendly side.)
< Message edited by musurca -- 3/23/2021 6:46:33 PM >