From 83e41d07fa1e219da55c26efe4fbe4ca4045362a Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Wed, 11 Jan 2023 17:19:24 -0800 Subject: modules/compose: omit experimental and hermetic modules This only omits the modules from the random layers Note the texture_values list is enumerated in compose_setup, so there's no corresponding change needed there. It might make sense to change that to a runtime-discovered list though, I think that was done in the pre-flags era. --- src/modules/compose/compose.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/modules/compose') diff --git a/src/modules/compose/compose.c b/src/modules/compose/compose.c index 92f6fd2..f3a1442 100644 --- a/src/modules/compose/compose.c +++ b/src/modules/compose/compose.c @@ -178,12 +178,18 @@ static char * compose_random_layers_setting(unsigned seed) til_get_modules(&modules, &n_modules); for (size_t i = 0; i < n_modules; i++) { + if ((modules[i]->flags & (TIL_MODULE_HERMETIC | TIL_MODULE_EXPERIMENTAL))) + continue; + if (modules[i]->flags & TIL_MODULE_OVERLAYABLE) n_overlayable++; } base_idx = rand_r(&seed) % (n_modules - n_overlayable); for (size_t i = 0, j = 0; !layers && i < n_modules; i++) { + if ((modules[i]->flags & (TIL_MODULE_HERMETIC | TIL_MODULE_EXPERIMENTAL))) + continue; + if (modules[i]->flags & TIL_MODULE_OVERLAYABLE) continue; @@ -201,6 +207,9 @@ static char * compose_random_layers_setting(unsigned seed) size_t rand_idx = rand_r(&seed) % n_overlayable; for (size_t i = 0, j = 0; i < n_modules; i++) { + if ((modules[i]->flags & (TIL_MODULE_HERMETIC | TIL_MODULE_EXPERIMENTAL))) + continue; + if (!(modules[i]->flags & TIL_MODULE_OVERLAYABLE)) continue; -- cgit v1.2.3