「view this page in B3 βῆτα server」

Revisions №266

branch: interactive/develop 「№266」
Commited by: Rocco Moretti
GitHub commit link: 「751ec866266c2b30」 「№5081」
Difference from previous tested commit:  code diff
Commit date: 2021-06-03 19:03:23

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.

...