From: Holger Schemel Date: Sat, 25 May 2019 11:42:42 +0000 (+0200) Subject: added new option "create_user_levelset" (setup file only) X-Git-Tag: 4.1.4.0~35 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=b2fbe97bd09c91e5efb580b35b910a3709015421;p=rocksndiamonds.git added new option "create_user_levelset" (setup file only) Setting this option to "false" (in a global program setup file) prevents the creation of a new, empty user level set at the first start of the program. This option was specifically created for the R'n'D special edition "R'n'D jue II", which comes with pre-defined user level sets. --- diff --git a/src/files.c b/src/files.c index 16b21791..27aa3abe 100644 --- a/src/files.c +++ b/src/files.c @@ -8951,6 +8951,10 @@ static struct TokenInfo internal_setup_tokens[] = TYPE_BOOLEAN, &setup.internal.show_scaling_in_title, "show_scaling_in_title" }, + { + TYPE_BOOLEAN, + &setup.internal.create_user_levelset, "create_user_levelset" + }, { TYPE_BOOLEAN, &setup.internal.menu_game, "menu_game" @@ -9324,6 +9328,7 @@ static void setSetupInfoToDefaults(struct SetupInfo *si) si->internal.default_level_series = getStringCopy(UNDEFINED_LEVELSET); si->internal.choose_from_top_leveldir = FALSE; si->internal.show_scaling_in_title = TRUE; + si->internal.create_user_levelset = TRUE; si->internal.default_window_width = WIN_XSIZE_DEFAULT; si->internal.default_window_height = WIN_YSIZE_DEFAULT; diff --git a/src/libgame/setup.c b/src/libgame/setup.c index 5cdaa874..7f080d9c 100644 --- a/src/libgame/setup.c +++ b/src/libgame/setup.c @@ -1093,7 +1093,8 @@ void InitUserLevelDirectory(char *level_subdir) createDirectory(getUserLevelDir(NULL), "main user level", PERMS_PRIVATE); createDirectory(getUserLevelDir(level_subdir), "user level", PERMS_PRIVATE); - SaveUserLevelInfo(); + if (setup.internal.create_user_levelset) + SaveUserLevelInfo(); } } diff --git a/src/libgame/system.h b/src/libgame/system.h index d07e0e1d..185fdc5a 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -1326,6 +1326,7 @@ struct SetupInternalInfo boolean choose_from_top_leveldir; boolean show_scaling_in_title; + boolean create_user_levelset; boolean menu_game; boolean menu_editor;