完善宠物系统

This commit is contained in:
2025-07-26 22:41:15 +08:00
parent 02a7e29e52
commit 048600e95d
135 changed files with 10204 additions and 5859 deletions

View File

@@ -95,8 +95,9 @@ func _add_message_to_history(data: Dictionary):
# 如果有玩家昵称,优先显示昵称
var display_name = player_name if player_name != "" else username
# 格式化时间
var datetime = Time.get_datetime_dict_from_unix_time(timestamp)
# 格式化时间 - 确保timestamp是整数类型
var timestamp_int = int(timestamp) if typeof(timestamp) == TYPE_STRING else timestamp
var datetime = Time.get_datetime_dict_from_unix_time(timestamp_int)
var time_str = "%04d%02d%02d%02d:%02d:%02d" % [datetime.year, datetime.month, datetime.day, datetime.hour, datetime.minute, datetime.second]
# 创建消息记录