I would like to be able to get the currently displayed switch state and mode (natural mode or target mode) from the EternaScript booster API.
Here are some mock-ups with the information I would like to be able to get in booster scripts encircled in bright green (the total number of switch states is already available via get_targets().length):
Why?
Sometimes I wish to use information about which state and/or mode the player is currently looking at in my booster scripts in order to output the relevant information for the current view or operate with the corresponding secondary structure. But as far as I can tell the current API does not provide that information.
Thanks for the suggestion, moving this to the feature suggestions category.
EternaScript definitely isn’t well developed for UI-related extensions. In general this seems reasonable, at least in the current setup - something like current_structure_mode(): 'natural' | 'target' and current_state(): number | 'PIP'.
I do have some vague concerns about what might happen if we ever make UI updates that break the assumption that we only have two modes, that PIP can only split between states, that PIP always shows all states, etc. This is probably unlikely to happen without larger changes anyways, but flagging as a potential consideration.