Compare commits

...

5 Commits

Author SHA1 Message Date
Tiger db110e479f Merge branch 'develop' into 'master'
更新引擎版本

See merge request paper-chemis-community/game!6
2026-04-02 09:16:17 +08:00
Tiger 46d5c98b4e feat: 优化项目结构,更新引擎版本 2026-04-02 09:15:43 +08:00
Tiger 2fbc3c80cf feat: 修复bug 2026-04-01 13:29:48 +08:00
Tiger 4b1664f9e9 Merge branch 'develop' into 'master'
修复本地化bug

See merge request paper-chemis-community/game!5
2026-04-01 13:09:04 +08:00
Tiger 40b2476e63 feat: 修复本地化bug 2026-04-01 12:32:04 +08:00
13 changed files with 17 additions and 22 deletions
+6 -6
View File
@@ -19,11 +19,11 @@ game/
- translation/
- trans.csv
- scenes/
- menus/
- main_menu.tscn
- game.tscn
- settings.tscn
- prefabs/
- game/
- game.tscn
- card.tscn
- scripts/
- autoload/
@@ -48,12 +48,12 @@ game/
## 最佳实践
本项目目前正在使用 Godot 4.6.1 进行开发。开发用语言为 GDScript。
本项目目前正在使用 Godot 4.6.2 进行开发。开发用语言为 GDScript。
你的开发应当遵循 Godot 引擎提供的[最佳实践](https://docs.godotengine.org/zh-cn/4.x/tutorials/best_practices/)及[GDScript 编写风格指南](https://docs.godotengine.org/zh-cn/4.x/tutorials/scripting/gdscript/gdscript_styleguide.html)。但下面提到的除外:
`autoload` 目录下的单例脚本使用大驼峰式命名,其余脚本均应使用小蛇形式命名。所有节点均应使用大驼峰式命名。
- `autoload` 目录下的单例脚本使用大驼峰式命名,其余脚本均应使用小蛇形式命名。所有节点均应使用大驼峰式命名。
除连接了信号或 HTTPRequest、MultiplayerAPI 的函数外,任何函数都不应该以下划线(`_`)开头。
- 除连接了信号或 HTTPRequest、MultiplayerAPI 的函数外,任何函数都不应该以下划线(`_`)开头。
函数之间只需间隔一行,无需间隔两行。
- 函数之间只需间隔一行,无需间隔两行。
+1 -1
View File
@@ -29,6 +29,6 @@ SETTINGS_TIP_REQUESTERROR,Tip: Download failed. Failed to create a request,提
SETTINGS_TIP_LOADING,Tip: Loading Resources. do not close the settings page,提示:正在加载资源,请勿关闭设置页面
SETTINGS_TIP_LOADED,Tip: Finish Loading,提示:完成加载
SETTINGS_TIP_NOLOCALSOURCE,Tip: No local data or no selection,提示:无本地数据或未选择,无法加载
GAMEUI_URNULL,Roome Running: You are XXX XXXX,啊啊啊啊啊:啊啊啊啊
GAMEUI_URNULL,Room Running: You are XXX XXXX,啊啊啊啊啊:啊啊啊啊
GAMEUI_URHOST,Room Running: You are the Host,房间运行中:您是房主
GAMEUI_URGUEST,Room Running: You are a Guest,房间运行中:您是房客
1 keys en zh-cn
29 SETTINGS_TIP_LOADING Tip: Loading Resources. do not close the settings page 提示:正在加载资源,请勿关闭设置页面
30 SETTINGS_TIP_LOADED Tip: Finish Loading 提示:完成加载
31 SETTINGS_TIP_NOLOCALSOURCE Tip: No local data or no selection 提示:无本地数据或未选择,无法加载
32 GAMEUI_URNULL Roome Running: You are XXX XXXX Room Running: You are XXX XXXX 啊啊啊啊啊:啊啊啊啊
33 GAMEUI_URHOST Room Running: You are the Host 房间运行中:您是房主
34 GAMEUI_URGUEST Room Running: You are a Guest 房间运行中:您是房客
Binary file not shown.
+2 -1
View File
@@ -9,5 +9,6 @@ func _ready():
current_scene = root.get_child(root.get_child_count() - 1)
func goto_scene(path: String):
current_scene = path
get_tree().change_scene_to_file("res://scenes/%s.tscn" % [path])
var root = get_tree().root
current_scene = root.get_child(root.get_child_count() - 1)
+1 -1
View File
@@ -1,6 +1,6 @@
extends Node2D
var CardScene = preload("res://prefabs/game/card.tscn")
var CardScene = preload("res://scenes/game/card.tscn")
var card_list: Array
+1 -1
View File
@@ -5,7 +5,7 @@ func _on_create_game_button_pressed() -> void:
if 2 <= player_num and player_num <= 4:
MultiGame.create_server(int(player_num))
$".".hide()
SceneManager.goto_scene("game")
SceneManager.goto_scene("game/game")
else:
$Warn.show()
+1 -1
View File
@@ -5,4 +5,4 @@ func _on_join_game_button_pressed() -> void:
var ip: String = $JoinGameEdit.text
MultiGame.create_client(ip)
$".".hide()
SceneManager.goto_scene("game")
SceneManager.goto_scene("game/game")
+1 -1
View File
@@ -8,7 +8,7 @@ func _on_start_game_pressed() -> void:
$CreateGameUI.show()
func _on_setting_button_pressed() -> void:
SceneManager.goto_scene("settings")
SceneManager.goto_scene("menus/settings")
func _on_quit_game_pressed() -> void:
get_tree().quit()
+1 -7
View File
@@ -9,12 +9,6 @@ func init_text() -> void:
$IPBeginSetting/LineEdit.text = GameManager.ip_begin
$UsernameSetting/LineEdit.text = GameManager.username
$LoadSource/ChooseSource.select(GameManager.source)
var language = "automatic"
if language == "automatic":
var preferred_language = OS.get_locale_language()
TranslationServer.set_locale(preferred_language)
else:
TranslationServer.set_locale(language)
func init_sources() -> void:
DownloadManager.get_sources()
@@ -31,7 +25,7 @@ func _on_save_button_pressed() -> void:
func _on_cancel_button_pressed() -> void:
SceneManager.goto_scene("main_menu")
SceneManager.goto_scene("menus/main_menu")
func _on_download_button_pressed() -> void: