|Opened on:||Tuesday, April 23, 2013 - 20:14|
|Last modified:||Thursday, December 5, 2013 - 14:08|
Maybe I've overseen this,
but as far as I know there is no way to get information if a segment is locked (grey-coloured) via script.
(I didn't find such thin in Lua V2 function description)
We do have:
structure.IsMutable to get 1 boolean information, if a segment is mutable.
freeze.IsFrozen to get 2 boolean informations, if a segment's backbone and/or sidechain is frozen.
It ould be nice to get such information for locked puzzle-segments, too.
This would allow us to avoid that a script tries to do things with segments,
where no changes are allowed by the type of puzzle.
Maybe this could also prevent some script/game crashes.
I know that there is a workaround by:
1. get score
2. try to move a single segment
3. get score again
4. compare with first value.
5. If score didn't change, segment seems to be locked
But this takes a lot of time!