From e62173f0d73ba575738b04300f5408b2dfdc3188 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Thu, 30 Sep 2021 00:54:25 +0200 Subject: [PATCH] swapped condition logic to improve code readability --- src/screens.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/screens.c b/src/screens.c index 0cb8a2b0..fb6b4e76 100644 --- a/src/screens.c +++ b/src/screens.c @@ -4356,12 +4356,17 @@ static void setTypeNameValues(char *name, struct TextPosInfo *pos, // temporarily change active user to edited user user.nr = type_name_nr; - // load setup of edited user (unless creating user with current setup) - if (!create_user || - !Request("Use current setup values for the new player?", REQ_ASK)) - LoadSetup(); - else + if (create_user && + Request("Use current setup values for the new player?", REQ_ASK)) + { + // use current setup values for new user, but create new player UUID setup.player_uuid = getStringCopy(getUUID()); + } + else + { + // load setup for existing user (or start with defaults for new user) + LoadSetup(); + } } char *setup_filename = getSetupFilename(); -- 2.34.1