批量修改钱币
This commit is contained in:
@@ -163,7 +163,7 @@ func _on_water_button_pressed():
|
||||
|
||||
# 如果是访问模式,需要检查自己的原始金钱数据
|
||||
if main_game.is_visiting_mode:
|
||||
my_money = main_game.original_player_data.get("money", 0)
|
||||
my_money = main_game.original_player_data.get("钱币", 0)
|
||||
|
||||
if my_money < water_cost:
|
||||
var action_text = "帮助浇水" if main_game.is_visiting_mode else "浇水"
|
||||
@@ -227,7 +227,7 @@ func _on_fertilize_button_pressed():
|
||||
|
||||
# 如果是访问模式,需要检查自己的原始金钱数据
|
||||
if main_game.is_visiting_mode:
|
||||
my_money = main_game.original_player_data.get("money", 0)
|
||||
my_money = main_game.original_player_data.get("钱币", 0)
|
||||
|
||||
if my_money < fertilize_cost:
|
||||
var action_text = "帮助施肥" if main_game.is_visiting_mode else "施肥"
|
||||
|
||||
@@ -170,8 +170,8 @@ func handle_claim_online_gift_response(data: Dictionary):
|
||||
reward_text += seed["名称"] + "x" + str(seed["数量"]) + " "
|
||||
|
||||
# 兼容老格式
|
||||
if rewards.has("money"):
|
||||
reward_text += "金币+" + str(rewards["money"]) + " "
|
||||
if rewards.has("钱币"):
|
||||
reward_text += "金币+" + str(rewards["钱币"]) + " "
|
||||
if rewards.has("经验值"):
|
||||
reward_text += "经验+" + str(rewards["经验值"]) + " "
|
||||
if rewards.has("seeds"):
|
||||
|
||||
@@ -209,8 +209,8 @@ func handle_buy_scare_crow_response(success: bool, message: String, updated_data
|
||||
Toast.show(message, Color.GREEN)
|
||||
|
||||
# 更新玩家数据
|
||||
if updated_data.has("money"):
|
||||
main_game.money = updated_data["money"]
|
||||
if updated_data.has("钱币"):
|
||||
main_game.money = updated_data["钱币"]
|
||||
if updated_data.has("稻草人配置"):
|
||||
player_scare_crow_config = updated_data["稻草人配置"]
|
||||
|
||||
@@ -230,8 +230,8 @@ func handle_modify_scare_crow_config_response(success: bool, message: String, up
|
||||
Toast.show(message, Color.GREEN)
|
||||
|
||||
# 更新玩家数据
|
||||
if updated_data.has("money"):
|
||||
main_game.money = updated_data["money"]
|
||||
if updated_data.has("钱币"):
|
||||
main_game.money = updated_data["钱币"]
|
||||
if updated_data.has("稻草人配置"):
|
||||
player_scare_crow_config = updated_data["稻草人配置"]
|
||||
|
||||
|
||||
@@ -233,8 +233,8 @@ func handle_wisdom_tree_operation_response(success: bool, message: String, opera
|
||||
main_game.login_data["智慧树配置"] = wisdom_tree_config
|
||||
|
||||
# 更新玩家数据
|
||||
if updated_data.has("money"):
|
||||
main_game.money = updated_data["money"]
|
||||
if updated_data.has("钱币"):
|
||||
main_game.money = updated_data["钱币"]
|
||||
main_game._update_ui()
|
||||
|
||||
# 更新智慧树设置面板UI
|
||||
@@ -289,8 +289,8 @@ func handle_wisdom_tree_operation_response(success: bool, message: String, opera
|
||||
func handle_wisdom_tree_message_response(success: bool, message: String, updated_data: Dictionary = {}):
|
||||
if success:
|
||||
# 更新玩家金钱
|
||||
if updated_data.has("money"):
|
||||
main_game.money = updated_data["money"]
|
||||
if updated_data.has("钱币"):
|
||||
main_game.money = updated_data["钱币"]
|
||||
main_game._update_ui()
|
||||
|
||||
Toast.show("消息发送成功!", Color.GREEN)
|
||||
|
||||
Reference in New Issue
Block a user