diff --git a/webui.py b/webui.py index 24c5f4a..e50e464 100644 --- a/webui.py +++ b/webui.py @@ -163,9 +163,9 @@ def set_ai_level(value, nid, ai_slots): "Master": 5, "Impossible": 6, } - ai_slots[:] = [ - (nation_id, ai_level) for nation_id, ai_level in ai_slots if nation_id != nid - ] + for ai in ai_slots: + if ai[0] == nid: + ai_slots.remove(ai) if value == "Human": return