I must have been high while writing that.
This commit is contained in:
8
webui.py
8
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]))
|
||||
|
||||
Reference in New Issue
Block a user