This adds a generic feature_toggle mechanism to the game. Code that wants to offer two different ways of doing something can add an entry to feature_toggles[] (in decl.c), and create a preprocessor macro for its array index in decl.h. Then the code can test it using if (feature_toggle(FEATURE_NAME)) ..do_this.. else ..do_that.. The player can toggle the alternate code path on using OPTIONS=feature_toggle:feature_name_1 feature_name_2 ... This seems better than creating brand new options for controlling features (ala prayconfirm, which could switch to this single option feature_toggle mechanism as well) My first use of it is to allow toggling of the selectors on the loot menu, which I'm hesitant to just change back because now people are actively using the new selectors and the complaints would be really loud if the interface were to just switch back after they adjusted. The default behaviour is the new behaviour "iob", but with an OPTIONS=feature_toggle:loot_menu_selectors in your config file, it will revert to using "abc" as it did in 3.3.1. I'll add a Guidebook page of "features/behaviour that can be toggled" later. The toggles can only be done in defaults.nh, and are not saved with the game.
12 KiB
12 KiB