From d6a56f50843256321bd1833511788bb7e460a9fd Mon Sep 17 00:00:00 2001 From: Carl Date: Tue, 2 Jun 2026 17:23:29 +0200 Subject: [PATCH] I must have been high while writing that. --- webui.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/webui.py b/webui.py index 887174d..24c5f4a 100644 --- a/webui.py +++ b/webui.py @@ -153,7 +153,7 @@ def create_ai_table(era, table_container, ai_slots): ) -def set_ai_level(value, nation_id, ai_slots): +def set_ai_level(value, nid, ai_slots): level_map = { "Closed": 0, "Easy": 1, @@ -164,11 +164,9 @@ def set_ai_level(value, nation_id, ai_slots): "Impossible": 6, } ai_slots[:] = [ - (nation_id, ai_level) - for nation_id, ai_level in ai_slots - if nation_id != nation_id + (nation_id, ai_level) for nation_id, ai_level in ai_slots if nation_id != nid ] if value == "Human": return - ai_slots.append((nation_id, level_map[value])) + ai_slots.append((nid, level_map[value]))