Yes. Different behaviour too if you wanted to do anything with the wml table.Code:
$ unit.__cfg == unit.__cfgfalse
Personally I think it would be better if it were something likeI don't really get your confusion or how you drew any of these conclusions. Every time you accessunit.__cfg
, the game serializes that unit to WML and returns the result. If you access__cfg
twice in a row, you'll end up with two identical but independent WML tables. If you access__cfg
, make some change to the unit directly, and access__cfg
again, the first WML table reflects the state of the unit before the change and the second WML table reflects the state of the unit after the change.
.cfg()
instead of .__cfg
. Magical properties are always confusing.It doesn't? (Did you see theThe second version doesn't serialize anything.
.__cfg
at the end of the first line?)Statistics: Posted by gnombat — Today, 6:05 pm