Open dcbroad3 opened 3 years ago
Potential design:
Swap array of modules for a tuple of string or array of strings:
type ModulePreference = string | string[];
type ModulePreferences = [ModulePreference, ModulePreference | undefined];
export interface Settings {
moduleRank: ModulePreferences;
}
A string module preference would represent 'fill with this module', where a string array represents 'use these modules in each slot'. Module preferences are a tuple where the first item is the preferred configuration, and the second item (optional) is a fallback that is always used if productivity is not allowed for the recipe. (Under the hood, this would probably always be used if any limitation is declared, not just productivity) In this fallback, only modules that do not have a limitation would be allowed.
This should likely be a dialog when editing modules in factory preferences, with two rows, the latter being optional representing the fallback.
Currently, factory settings allow picking preferences for all slots at once. It may be helpful to have the ability to set individual module slot preferences separately, for example to set to prod/speed for modules 1 & 2, and efficiency for modules 3 & 4.
Requested by Fireball770 in Discord