|
|
@@ -0,0 +1,200 @@
|
|
|
+主题同步,相关文档:
|
|
|
+https://nxjy5tl8k2.sg.larksuite.com/wiki/WStZwS9PGiEnwYkQ76GuUql4smf
|
|
|
+https://nxjy5tl8k2.sg.larksuite.com/wiki/XSa3w3LEwis9I3k8yyxu1eqAsSo
|
|
|
+
|
|
|
+对应的主题路径:
|
|
|
+
|
|
|
+![[Pasted image 20251015135627.png]]
|
|
|
+
|
|
|
+相关提交:
|
|
|
+
|
|
|
+![[Pasted image 20251015140148.png]]
|
|
|
+
|
|
|
+相关表现:
|
|
|
+
|
|
|
+![[Pasted image 20251015140402.png]]
|
|
|
+
|
|
|
+![[Pasted image 20251015140511.png]]
|
|
|
+
|
|
|
+一开始的时候,会没法加载出主题
|
|
|
+
|
|
|
+![[Pasted image 20251017164511.png]]
|
|
|
+
|
|
|
+主题相关的加载配置,是这个
|
|
|
+
|
|
|
+![[Pasted image 20251017164542.png]]
|
|
|
+
|
|
|
+加上这个相关的配置,就可以了
|
|
|
+
|
|
|
+![[Pasted image 20251017164704.png]]
|
|
|
+
|
|
|
+lua的入口,是`Main.lua`这里,如果要加lua断点的话,是可以在这里加的
|
|
|
+
|
|
|
+![[Pasted image 20251020090038.png]]
|
|
|
+
|
|
|
+进游戏的话,会有这个空指针报错,但是可以忽略不管的:
|
|
|
+
|
|
|
+![[Pasted image 20251020090140.png]]
|
|
|
+
|
|
|
+![[Pasted image 20251020090337.png]]
|
|
|
+
|
|
|
+
|
|
|
+主题配置,相关路径:
|
|
|
+
|
|
|
+![[Pasted image 20251017165421.png]]
|
|
|
+
|
|
|
+服务端推送的,主题列表,是在大厅这里的逻辑
|
|
|
+
|
|
|
+![[Pasted image 20251017180740.png]]
|
|
|
+
|
|
|
+![[Pasted image 20251017180853.png]]
|
|
|
+
|
|
|
+需要先基于原工程,导出一个package包,再在新工程import导入;
|
|
|
+
|
|
|
+![[Pasted image 20251021091845.png]]
|
|
|
+
|
|
|
+前面4个,都点一下吧
|
|
|
+
|
|
|
+![[Pasted image 20251020181043.png]]
|
|
|
+
|
|
|
+批量替换一下文本,目前替换的有`ToolUtil` → `UITools` 和 `ZSlotKing/MiniGame` → `Slots`
|
|
|
+
|
|
|
+批量替换的python脚本是
|
|
|
+
|
|
|
+``` py
|
|
|
+import os
|
|
|
+
|
|
|
+# 目标路径
|
|
|
+root_dir = r"C:\Users\admin\Downloads\code\svn\GameTrunk_BR_Slots\Assets\Slots\Themes\74\Lua"
|
|
|
+
|
|
|
+# 要替换的字符串
|
|
|
+old_text = "ToolUtil"
|
|
|
+new_text = "UITools"
|
|
|
+
|
|
|
+# 要处理的文件扩展名(可按需添加)
|
|
|
+valid_exts = {".lua", ".txt", ".json", ".xml", ".cfg"}
|
|
|
+
|
|
|
+count_files = 0
|
|
|
+count_replacements = 0
|
|
|
+
|
|
|
+for dirpath, dirnames, filenames in os.walk(root_dir):
|
|
|
+ for filename in filenames:
|
|
|
+ _, ext = os.path.splitext(filename)
|
|
|
+ if ext.lower() not in valid_exts:
|
|
|
+ continue
|
|
|
+
|
|
|
+ file_path = os.path.join(dirpath, filename)
|
|
|
+ try:
|
|
|
+ with open(file_path, "r", encoding="utf-8") as f:
|
|
|
+ content = f.read()
|
|
|
+ except UnicodeDecodeError:
|
|
|
+ try:
|
|
|
+ with open(file_path, "r", encoding="gbk") as f:
|
|
|
+ content = f.read()
|
|
|
+ except Exception as e:
|
|
|
+ print(f"[跳过] 无法读取文件:{file_path} ({e})")
|
|
|
+ continue
|
|
|
+
|
|
|
+ if old_text not in content:
|
|
|
+ continue
|
|
|
+
|
|
|
+ new_content = content.replace(old_text, new_text)
|
|
|
+
|
|
|
+ with open(file_path, "w", encoding="utf-8") as f:
|
|
|
+ f.write(new_content)
|
|
|
+
|
|
|
+ replaced_count = content.count(old_text)
|
|
|
+ count_files += 1
|
|
|
+ count_replacements += replaced_count
|
|
|
+ print(f"[修改] {file_path} ({replaced_count} 处替换)")
|
|
|
+
|
|
|
+print(f"\n✅ 替换完成!共修改 {count_files} 个文件,替换 {count_replacements} 处。")
|
|
|
+```
|
|
|
+
|
|
|
+接口变更是这个:
|
|
|
+
|
|
|
+![[Pasted image 20251021091621.png]]
|
|
|
+
|
|
|
+本地的配置表新增:
|
|
|
+
|
|
|
+![[Pasted image 20251021091746.png]]
|
|
|
+
|
|
|
+如果正常加载,会有这样的实体,和对应的表现:
|
|
|
+
|
|
|
+![[Pasted image 20251022154535.png]]
|
|
|
+
|
|
|
+这是新增金币相关的gm
|
|
|
+
|
|
|
+```
|
|
|
+$silver 10000
|
|
|
+```
|
|
|
+
|
|
|
+另外,还有这些资源,需要确认,是否需要弄进来
|
|
|
+
|
|
|
+![[Pasted image 20251021092057.png]]
|
|
|
+
|
|
|
+先注释这个,音频播放相关的报错:
|
|
|
+
|
|
|
+![[Pasted image 20251021094235.png]]
|
|
|
+
|
|
|
+丢失的材质还原:
|
|
|
+
|
|
|
+![[Pasted image 20251021095141.png]]
|
|
|
+
|
|
|
+![[Pasted image 20251021095157.png]]
|
|
|
+
|
|
|
+这些相关的,也会出现,材质丢失的情况
|
|
|
+
|
|
|
+![[Pasted image 20251021104307.png]]
|
|
|
+
|
|
|
+这个报错,也要解决一下,是属于通用的方法类
|
|
|
+
|
|
|
+![[Pasted image 20251021135320.png]]
|
|
|
+
|
|
|
+这个是之前没有使用mapbuilder刷过脚本缺失的,也刷一下就好
|
|
|
+
|
|
|
+![[Pasted image 20251021140005.png]]
|
|
|
+
|
|
|
+缩放问题,需要跟进处理一下,这个的缩放,有不少有问题
|
|
|
+
|
|
|
+![[Pasted image 20251021143833.png]]
|
|
|
+
|
|
|
+需要确认一下,这个数字,是怎么来的:
|
|
|
+
|
|
|
+![[Pasted image 20251021154004.png]]
|
|
|
+
|
|
|
+这个丢失有点多:
|
|
|
+
|
|
|
+![[Pasted image 20251021161013.png]]
|
|
|
+
|
|
|
+一些通用方法,如果项目组本身是还没有的,就解构添加到这里
|
|
|
+
|
|
|
+![[Pasted image 20251022092051.png]]
|
|
|
+
|
|
|
+本地化处理,使用文档参考:
|
|
|
+
|
|
|
+https://nxjy5tl8k2.sg.larksuite.com/wiki/FH2cwCvWziDkVvkzvUHl7J38gwe
|
|
|
+
|
|
|
+https://nxjy5tl8k2.sg.larksuite.com/wiki/wikusfoHazy9ybv3bMRJ3gpWqUf
|
|
|
+
|
|
|
+填写地址:
|
|
|
+
|
|
|
+https://nxjy5tl8k2.sg.larksuite.com/sheets/JiBNsKkLVhBD76tUscqlfbpzggh
|
|
|
+
|
|
|
+打开示意图:
|
|
|
+
|
|
|
+![[Pasted image 20251022092619.png]]
|
|
|
+
|
|
|
+入口是这里:
|
|
|
+
|
|
|
+![[Pasted image 20251022092300.png]]
|
|
|
+
|
|
|
+可以选择对应文件夹,直接提取其中prefab的翻译
|
|
|
+
|
|
|
+![[Pasted image 20251022092330.png]]
|
|
|
+
|
|
|
+翻译后,应该还需要弄到这里才可以
|
|
|
+
|
|
|
+![[Pasted image 20251022092556.png]]
|
|
|
+
|
|
|
+![[Pasted image 20251022092630.png]]
|