Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This is part of the process of extracting the script-facing API from PoseEditMode in order to make it usable for non-booster scripts.
Replaces #749
Implementation Notes
I did it like the previous PR, except I didn't implement get_folder/select_folder, since they are behind a "lock", and I didn't want to think yet of whether or not I want the extracted logic to inherit the lock.
However, while get_folder is locked, the calculation functions (such as
fold
) which also access the folder, aren't locked (even ondev
). Is this intended?Testing
I ran https://eternagame.org/scripts/13774466, and it passed.
The script checks that all of the extracted functions (expect folding with binding sites) work and return the same values.
This is an unrelated issue, but : For some reason, both on main/master (https://eternagame.org/puzzles/6096060/play) and on my branch, the first time I run it I get the following errors, and on future runs it passes. Reloading the page makes the issue appear again for a single execution.
Errors:
Successful run:
(In my branch I just copy pasted the script, since I didn't have it on eternadev.org, and changed
Lib.fold
->applet.fold
. I shouldn't have Lib in the terminal, right?)Related Issues
Enables eternagame/eternagame.org#378, #750