поправлен цикл
This commit is contained in:
parent
8b3aaa3f6a
commit
5f52b7f364
163
hlna.py
163
hlna.py
@ -229,59 +229,60 @@ def config_nummap():
|
||||
|
||||
|
||||
def config_maps(i):
|
||||
"""Проверка на выбор карты из списка"""
|
||||
amount_map = check_int("""Выберите карту из списка указав номер
|
||||
1. The Island
|
||||
2. The Center
|
||||
3. Scorched Earth
|
||||
4. Ragnarok
|
||||
5. Aberration
|
||||
6. Extinction
|
||||
7. Valguero
|
||||
8. Genesis: Part 1
|
||||
9. Crystal Isles
|
||||
10. Genesis: Part 2
|
||||
11. Lost Island
|
||||
12. Fjordur
|
||||
: """)
|
||||
if amount_map == 0: # 0 возвращает check_int когда, ничего не было введено
|
||||
amount_map = i + 1
|
||||
if 0 < amount_map <= 12:
|
||||
# тут должно быть прерывание цикла из config_ark
|
||||
while True:
|
||||
"""Проверка на выбор карты из списка"""
|
||||
amount_map = check_int("""Выберите карту из списка указав номер
|
||||
1. The Island
|
||||
2. The Center
|
||||
3. Scorched Earth
|
||||
4. Ragnarok
|
||||
5. Aberration
|
||||
6. Extinction
|
||||
7. Valguero
|
||||
8. Genesis: Part 1
|
||||
9. Crystal Isles
|
||||
10. Genesis: Part 2
|
||||
11. Lost Island
|
||||
12. Fjordur
|
||||
: """)
|
||||
if amount_map == 0: # 0 возвращает check_int когда, ничего не было введено
|
||||
amount_map = i + 1
|
||||
if 0 < amount_map <= 12:
|
||||
break
|
||||
|
||||
if list_config:
|
||||
port_s, query_p, rcon_p = ports_array()
|
||||
else:
|
||||
port_s = query_p = rcon_p = []
|
||||
if list_config:
|
||||
port_s, query_p, rcon_p = ports_array()
|
||||
else:
|
||||
port_s = query_p = rcon_p = []
|
||||
|
||||
if amount_map == 1:
|
||||
map_s = "TheIsland"
|
||||
elif amount_map == 2:
|
||||
map_s = "TheCenter"
|
||||
elif amount_map == 3:
|
||||
map_s = "ScorchedEarth_P"
|
||||
elif amount_map == 4:
|
||||
map_s = "Ragnarok"
|
||||
elif amount_map == 5:
|
||||
map_s = "Aberration_P"
|
||||
elif amount_map == 6:
|
||||
map_s = "Extinction"
|
||||
elif amount_map == 7:
|
||||
map_s = "Valguero_P"
|
||||
elif amount_map == 8:
|
||||
map_s = "Genesis"
|
||||
elif amount_map == 9:
|
||||
map_s = "CrystalIsles"
|
||||
elif amount_map == 10:
|
||||
map_s = "Gen2"
|
||||
elif amount_map == 11:
|
||||
map_s = "LostIsland"
|
||||
elif amount_map == 12:
|
||||
map_s = "Fjordur"
|
||||
else:
|
||||
# Если вдруг каким-то боком проверка не отработает и не будет нужной цифры
|
||||
map_s = 'TheIsland'
|
||||
return map_s, port_s, query_p, rcon_p
|
||||
if amount_map == 1:
|
||||
map_s = "TheIsland"
|
||||
elif amount_map == 2:
|
||||
map_s = "TheCenter"
|
||||
elif amount_map == 3:
|
||||
map_s = "ScorchedEarth_P"
|
||||
elif amount_map == 4:
|
||||
map_s = "Ragnarok"
|
||||
elif amount_map == 5:
|
||||
map_s = "Aberration_P"
|
||||
elif amount_map == 6:
|
||||
map_s = "Extinction"
|
||||
elif amount_map == 7:
|
||||
map_s = "Valguero_P"
|
||||
elif amount_map == 8:
|
||||
map_s = "Genesis"
|
||||
elif amount_map == 9:
|
||||
map_s = "CrystalIsles"
|
||||
elif amount_map == 10:
|
||||
map_s = "Gen2"
|
||||
elif amount_map == 11:
|
||||
map_s = "LostIsland"
|
||||
elif amount_map == 12:
|
||||
map_s = "Fjordur"
|
||||
else:
|
||||
# Если вдруг каким-то боком проверка не отработает и не будет нужной цифры
|
||||
map_s = 'TheIsland'
|
||||
return map_s, port_s, query_p, rcon_p
|
||||
|
||||
|
||||
def config_nameserver(map_s):
|
||||
@ -324,46 +325,46 @@ def config_ark(list_config=list_config):
|
||||
count_maps = config_nummap()
|
||||
print_line(count_maps)
|
||||
for i in range(count_maps):
|
||||
while True:
|
||||
map_s, port_s, query_p, rcon_p = config_maps(i)
|
||||
print_line(map_s, port_s, query_p, rcon_p)
|
||||
list_config = config_nameserver(map_s)
|
||||
|
||||
map_s, port_s, query_p, rcon_p = config_maps(i)
|
||||
print_line(map_s, port_s, query_p, rcon_p)
|
||||
list_config = config_nameserver(map_s)
|
||||
|
||||
|
||||
port = check_int("Укажите порт сервера: ")
|
||||
port_server = ports(port, port_s, True)
|
||||
port = check_int("Укажите порт сервера: ")
|
||||
port_server = ports(port, port_s, True)
|
||||
|
||||
port = check_int("Укажите query порт сервера: ")
|
||||
query_port = ports(port, query_p, False)
|
||||
port = check_int("Укажите query порт сервера: ")
|
||||
query_port = ports(port, query_p, False)
|
||||
|
||||
port = check_int("Укажите порт сервера: ")
|
||||
rcon_port = ports(port, rcon_p, True)
|
||||
rcon_enabled = True
|
||||
port = check_int("Укажите порт сервера: ")
|
||||
rcon_port = ports(port, rcon_p, True)
|
||||
rcon_enabled = True
|
||||
|
||||
password_server = input("Укажите пароль Сервера: \n")
|
||||
adminpassword_server = 123
|
||||
max_players = check_int("Укажите максимальное количество игроков: \n")
|
||||
if max_players == 0:
|
||||
max_players = 70
|
||||
password_server = input("Укажите пароль Сервера: \n")
|
||||
adminpassword_server = 123
|
||||
max_players = check_int("Укажите максимальное количество игроков: \n")
|
||||
if max_players == 0:
|
||||
max_players = 70
|
||||
|
||||
print("Передавать сервер в глобальный список серверов steam?")
|
||||
listen_server_amount = check_int("""\n
|
||||
print("Передавать сервер в глобальный список серверов steam?")
|
||||
listen_server_amount = check_int("""\n
|
||||
1. Да
|
||||
2. Нет
|
||||
:""")
|
||||
if listen_server_amount == 1:
|
||||
listen_server = True
|
||||
elif listen_server_amount == 2:
|
||||
listen_server = False
|
||||
else:
|
||||
listen_server = True
|
||||
if listen_server_amount == 1:
|
||||
listen_server = True
|
||||
elif listen_server_amount == 2:
|
||||
listen_server = False
|
||||
else:
|
||||
listen_server = True
|
||||
|
||||
print_line(cluster_server, map_s, list_config[-1], port_server, query_port,
|
||||
rcon_enabled, rcon_port, adminpassword_server, password_server, max_players,
|
||||
cluster_id, cluster_dir_override, listen_server)
|
||||
yaml_create("ARK", "", cluster_server, map_s, list_config[-1], port_server, query_port,
|
||||
rcon_enabled, rcon_port, adminpassword_server, password_server, max_players,
|
||||
cluster_id, cluster_dir_override, listen_server)
|
||||
print_line(cluster_server, map_s, list_config[-1], port_server, query_port,
|
||||
rcon_enabled, rcon_port, adminpassword_server, password_server, max_players,
|
||||
cluster_id, cluster_dir_override, listen_server)
|
||||
yaml_create("ARK", "", cluster_server, map_s, list_config[-1], port_server, query_port,
|
||||
rcon_enabled, rcon_port, adminpassword_server, password_server, max_players,
|
||||
cluster_id, cluster_dir_override, listen_server)
|
||||
|
||||
|
||||
def config_7daystodie():
|
||||
|
Loading…
Reference in New Issue
Block a user