From b3650118d27b4c15f9b050276d822e647092185b Mon Sep 17 00:00:00 2001 From: Luke aka SwissalpS Date: Tue, 17 Sep 2024 15:48:36 +0200 Subject: [PATCH] player_info: switch if-else to avoid negation --- init.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index 4451621..b0173dd 100644 --- a/init.lua +++ b/init.lua @@ -316,14 +316,14 @@ function cc.player_info(player_name, params) local summary = S("@1 is in the following factions: @2.", player_name, table.concat(player_factions, ", ")) local owned_factions = factions.get_owned_factions(player_name) - if not owned_factions then - summary = summary .. "\n" .. S( - "@1 doesn't own any factions.", player_name) - else + if owned_factions then summary = summary .. "\n" .. S( "@1 is the owner of the following factions: @2.", player_name, table.concat(owned_factions, ", ") ) + else + summary = summary .. "\n" .. S( + "@1 doesn't own any factions.", player_name) end if minetest.get_player_privs(player_name)[factions.priv] then summary = summary .. "\n" .. S(