Merge pull request #5081 from RosettaCommons/roccomoretti/interactive_tool_activation_merge
[Foldit] Harmonize action/tool display between intro and regular puzzle setups.
(This should be internal restructuring only -- there ideally shouldn't be any user-facing changes, aside from some slight button reorganization due to better consistency.)
Right now the intro puzzles can control which actions/tools/widgets are being displayed, but there's no way to control that on a per-puzzle basis for regular puzzles. This PR attempts to allow such control in regular puzzles by moving the canonical location of this data from the IntroPuzzleData object to the SessionConfig object. The Puzzle object acts as a control nexus, transforming the data currently extracted from the intro puzzle setups into the new form, as well as centralizing puzzle-type default handling.
The main approach here is to remove the hud_setup, tool_setup and selection_tool settings from the intro puzzle files. Instead, we now can control those settings from within the .puzzle_setup file. The bulk of it is controlled by the actions settings. For convenience, I put in a facility to be able to set actions/<actionname> on each line, with explicit disable/enable settings. For those things which aren't really actions, I have gui/<settingname> settings instead. These are then stored long-term in the SessionConfig object, and can be accessed accordingly. (Existing places have been transitioned to use the SessionConfig object, rather than going through the Intro object. I've also transitioned some of the other puzzle_settup settings to go through the action framework instead.) All of this framework works with non-Intro-like puzzles (e.g. the ones from the server.)
To keep the puzzle setup file from being excessively long in the standard case, I've also added a puzzle_setup option to the puzzle_setup file. This looks in the database for a corresponding file, and loads those values as defaults. (This is written such that it should work with all settings in puzzle_setup, not just the action and gui settings.) You can chain these settings, and the most recent version should override anything earlier. I've populated that directory with defaults for various intro and dojo puzzles -- we can theoretically add additional such defaults for other (non intro-like) puzzles.
Merge pull request #5413 from RosettaCommons/joshmiller/lang-icon
[Foldit] Swap locale icons with translate icon
Release notes:
- Removed country flags from language selection
Merge pull request #5380 from RosettaCommons/joshmiller/dojo-hotfix
[Foldit] Hotfix to prevent crash when Dojo server unavailable
Release notes:
- Fixed a bug causing Foldit to crash when playing offline or the Dojo server is unavailable
Merge pull request #5334 from RosettaCommons/joshmiller/expose-filters
[Foldit] Add Lua function to expose filter data + LayerScoreFilter example
Release notes:
- Added a Lua function filter.GetData(string name) which takes an Objective name and returns a table of data about it; defaults to an empty table if no additional information is available. All supported Objectives contain a "version" key and a "documentation" key in the returned table which describes the rest of the table of data provided. Currently, these Objectives are supported: Core Exists, BUNS, Hydrogen Bond Network, and Secondary Structure.
Merge pull request #5378 from RosettaCommons/joshmiller/japanese
[Foldit] Add Japanese and ensure correct font usage
Release notes:
- Added a preliminary Japanese translation courtesy of player Nicm25
- Fixed a bug causing tooltips and other text with adjustable size to not be translated
Merge pull request #5356 from RosettaCommons/joshmiller/dojo-tracks
[Foldit] Dojo updates week of 4/19/21
**Release notes:**
- Removed tracks from Dojo mode
- Fixed a bug in Dojo mode causing some actions (especially the Rama map) to cost more stamina than intended
- Made fixes and balance changes to some Dojo levels
- The main menu now displays your Dojo rank and highest Dojo run score.