关卡配置添加hard参数

main
zhouzhuo 2025-07-16 11:14:21 +08:00
parent 3e0a92dce0
commit 4c61e0a668
1 changed files with 14 additions and 2 deletions

View File

@ -253,7 +253,7 @@ def update_main_level_db(platform, mode):
continue continue
# 读取所有信息对应列数 # 读取所有信息对应列数
col_level, col_asset_id, col_asset_name, col_a_g, col_i_g, col_find_num, col_valid , col_game_play_type ,col_game_play_param, col_game_elements= -1, -1, -1, -1, -1, -1, -1,-1,-1,-1 col_level, col_asset_id, col_asset_name, col_a_g, col_i_g, col_find_num, col_valid , col_game_play_type ,col_game_play_param, col_game_elements,col_game_hard_type= -1, -1, -1, -1, -1, -1, -1,-1,-1,-1,-1
first_row_datas = google_sheet_file.row_values(1) first_row_datas = google_sheet_file.row_values(1)
for i, value in enumerate(first_row_datas): for i, value in enumerate(first_row_datas):
if value == "Level": if value == "Level":
@ -274,6 +274,8 @@ def update_main_level_db(platform, mode):
# col_game_play_type = i + 1 # col_game_play_type = i + 1
elif value == "GamePlayParam": elif value == "GamePlayParam":
col_game_play_param = i + 1 col_game_play_param = i + 1
elif value == "GameHardType":
col_game_hard_type = i + 1
# elif value == "GameElements": # elif value == "GameElements":
# col_game_elements = i + 1 # col_game_elements = i + 1
if col_level == -1 or col_asset_id == -1 or col_asset_name == -1 or col_a_g == -1 or col_i_g == -1 \ if col_level == -1 or col_asset_id == -1 or col_asset_name == -1 or col_a_g == -1 or col_i_g == -1 \
@ -317,6 +319,9 @@ def update_main_level_db(platform, mode):
if len(game_play_param) == 0: if len(game_play_param) == 0:
game_play_param = "" game_play_param = ""
# game_elements_param = row_datas[col_game_elements - 1] if col_game_elements > 0 else '' # game_elements_param = row_datas[col_game_elements - 1] if col_game_elements > 0 else ''
game_hard_type = row_datas[col_game_hard_type - 1]
if len(game_hard_type) == 0:
game_hard_type = "normal"
level_type = gameplay level_type = gameplay
level_map_name = "" level_map_name = ""
level_thum_name = "" level_thum_name = ""
@ -327,6 +332,7 @@ def update_main_level_db(platform, mode):
# one_level_data["GamePlayType"] = game_play_type # one_level_data["GamePlayType"] = game_play_type
one_level_data["GamePlayParam"] = game_play_param one_level_data["GamePlayParam"] = game_play_param
# one_level_data["GameElements"] = game_elements_param # one_level_data["GameElements"] = game_elements_param
one_level_data["GameHardType"] = game_hard_type
if gameplay not in levels_data_dic: if gameplay not in levels_data_dic:
levels_data_dic[gameplay] = [] levels_data_dic[gameplay] = []
levels_data_dic[gameplay].append(one_level_data) levels_data_dic[gameplay].append(one_level_data)
@ -405,7 +411,7 @@ def update_main_country_level_db(platform, mode, all_country_list):
print(f"{gameplay}玩法目前没有配置关卡表") print(f"{gameplay}玩法目前没有配置关卡表")
continue continue
# 读取所有信息对应列数 # 读取所有信息对应列数
col_level, col_asset_id, col_asset_name, col_a_g, col_i_g, col_find_num, col_valid, col_game_play_type, col_game_play_param, col_game_elements = -1, -1, -1, -1, -1, -1, -1, -1, -1,-1 col_level, col_asset_id, col_asset_name, col_a_g, col_i_g, col_find_num, col_valid, col_game_play_type, col_game_play_param, col_game_elements, col_game_hard_type= -1, -1, -1, -1, -1, -1, -1, -1, -1,-1,-1
first_row_datas = google_sheet_file.row_values(1) first_row_datas = google_sheet_file.row_values(1)
for i, value in enumerate(first_row_datas): for i, value in enumerate(first_row_datas):
if value == "Level": if value == "Level":
@ -428,6 +434,8 @@ def update_main_country_level_db(platform, mode, all_country_list):
col_game_play_param = i + 1 col_game_play_param = i + 1
# elif value == "GameElements": # elif value == "GameElements":
# col_game_elements = i + 1 # col_game_elements = i + 1
elif value == "GameHardType":
col_game_hard_type = i + 1
if col_level == -1 or col_asset_id == -1 or col_asset_name == -1 or col_a_g == -1 or col_i_g == -1 \ if col_level == -1 or col_asset_id == -1 or col_asset_name == -1 or col_a_g == -1 or col_i_g == -1 \
or col_find_num == -1 or col_valid == -1: or col_find_num == -1 or col_valid == -1:
config.notification_helper.append_msg(f"{gameplay}玩法目前配置关卡表格式不正确") config.notification_helper.append_msg(f"{gameplay}玩法目前配置关卡表格式不正确")
@ -469,6 +477,9 @@ def update_main_country_level_db(platform, mode, all_country_list):
if len(game_play_param) == 0: if len(game_play_param) == 0:
game_play_param = "" game_play_param = ""
# game_elements_param = row_datas[col_game_elements - 1] if col_game_elements > 0 else '' # game_elements_param = row_datas[col_game_elements - 1] if col_game_elements > 0 else ''
game_hard_type = row_datas[col_game_hard_type - 1]
if len(game_hard_type) == 0:
game_hard_type = "normal"
level_type = gameplay level_type = gameplay
level_map_name = "" level_map_name = ""
level_thum_name = "" level_thum_name = ""
@ -479,6 +490,7 @@ def update_main_country_level_db(platform, mode, all_country_list):
# one_level_data["GamePlayType"] = game_play_type # one_level_data["GamePlayType"] = game_play_type
one_level_data["GamePlayParam"] = game_play_param one_level_data["GamePlayParam"] = game_play_param
# one_level_data["GameElements"] = game_elements_param # one_level_data["GameElements"] = game_elements_param
one_level_data["GameHardType"] = game_hard_type
if gameplay not in levels_data_dic: if gameplay not in levels_data_dic:
levels_data_dic[gameplay] = [] levels_data_dic[gameplay] = []
levels_data_dic[gameplay].append(one_level_data) levels_data_dic[gameplay].append(one_level_data)