Преглед на файлове

Merge branch 'main' of ssh://192.168.0.8:29418/xianjing into hy_ru

gdl_123 преди 7 месеца
родител
ревизия
887f06ddb6
променени са 4 файла, в които са добавени 483 реда и са изтрити 1 реда
  1. 68 1
      Assets/Editor/CsvToLua/CsvToLua.cs
  2. 12 0
      Assets/Src/Core/DownLoad/FileHelper.cs
  3. 52 0
      Build/BuildDependenceResource/PackConfig.json
  4. 351 0
      Build/NewCfg/ROLanguagePackage_cn.csv

+ 68 - 1
Assets/Editor/CsvToLua/CsvToLua.cs

@@ -160,6 +160,12 @@ return aaa";
         {
             ChangeLuaCfg("Assets/Lua/Config/CardCfg.lua", "Assets\\Editor\\CsvToLua\\LuaCfg.lua", "Build/NewCfg/CardCfg.lua");
         }
+
+
+        if (GUILayout.Button("合并Language"))
+        {
+            MergeLanauage("Assets/Content/Config/LanguagePackage_cn.csv", "Build/NewCfg/ROLanguagePackage_cn.csv", "Build/NewCfg/Language_merge.csv");
+        }
     }
 
     public static string GetFilePath()
@@ -724,5 +730,66 @@ return aaa";
 
         File.WriteAllLines(outputPath, rowDatas);
     }
-    
+
+    struct lgInfo 
+    {
+       public int index;
+        public int off;
+    }
+    private static void MergeLanauage(string oldPath,string newPath, string outputPath)
+    {
+        List<string> oldLg = File.ReadAllLines(oldPath).ToList();
+        List<string> newLg = File.ReadAllLines(newPath).ToList();
+        Dictionary<string, lgInfo> cfgmap = new Dictionary<string, lgInfo>();
+
+        int length = oldLg.Count;
+        int off = -1;
+        for (int i = 0; i < length; i++)
+        {
+            off = oldLg[i].IndexOf(',');
+
+            if (off < 0)
+            {
+                continue;
+            }
+
+            string key = oldLg[i].Substring(0,off);
+
+            if (!cfgmap.ContainsKey(key))
+            {
+                lgInfo info = new lgInfo();
+                info.index = i;
+                info.off = off;
+                cfgmap.Add(key, info);
+            }
+        }
+
+
+        foreach (var item in newLg)
+        {
+            if (item == "" || item == ","||item == "key"||item == "string")
+                continue;
+
+            off = item.IndexOf(',');
+            if (off < 0)
+            {
+                continue;
+            }
+            string key = item.Substring(0,off);
+            if (!cfgmap.ContainsKey(key))
+            {
+                oldLg.Add(item);
+            }
+            else
+            {
+                lgInfo lgIf = cfgmap[key];
+                oldLg[lgIf.index] = item;
+            }
+        }
+
+
+        string data = FileHelper.CatStringArray(oldLg);
+        FileHelper.WirteStringToFile(outputPath, data);
+    }
+
 }

+ 12 - 0
Assets/Src/Core/DownLoad/FileHelper.cs

@@ -463,6 +463,18 @@ public class FileHelper
         }
     }
 
+
+    public static string CatStringArray(IEnumerable<string> datas)
+    {
+        StringBuilder stringBuilder = new StringBuilder();
+        foreach (var item in datas)
+        {
+            stringBuilder.Append(item);
+        }
+
+        return stringBuilder.ToString();
+    }
+
     //public static string[][] GetCsvDatas(string text)
     //{
     //    using (System.IO.StringReader stringReader = new System.IO.StringReader(text))

+ 52 - 0
Build/BuildDependenceResource/PackConfig.json

@@ -510,6 +510,58 @@
             "keystorePass": "n9P5j2b7blMm",
             "keyaliasName": "game",
             "keyaliasPass": "KlYX666Ro"
+        },
+          {
+            "channelName": "游逸",
+            "appName": "Rookie's Odyssey",
+            "distributeName": "正式服(英文版)(+混淆)",
+            "channelUniqueId": "12002024",
+            "bundleId": "com.RookieOdyssey.gp",
+            "gameVersionCode": {
+                "major": 1,
+                "minor": 0,
+                "release": 0,
+                "patch": 6
+            },
+            "resVersionCode": {
+                "major": 0,
+                "minor": 1,
+                "release": 0,
+                "patch": 0
+            },
+            "iconRelativePath": "XinLiWuYu",
+            "defineSymbols": [
+                "USE_LUA",
+                "VUPLEX_CCU",
+                "FPS_DISABLE"
+            ],
+            "logo1RelativePath": "xlwy.png",
+            "loginRelativePath": "Default",
+            "gameAssetsPath": "Default",
+            "specialFuncShield": false,
+            "splashScreenRelativeFiles": [],
+            "obscureKey": "",
+            "obscureOffsetMin": 0,
+            "obscureOffsetValues": [],
+            "sdkVerifyUrl": "http://165.154.202.27:81//",
+            "serverListUrl": "http://165.154.202.27:81//serverlist",
+            "notifyUrl": "http://165.154.202.27:88/res/NoticeNew/",
+            "specialInfoUrl": "http://165.154.202.27:81//channel",
+            "customerServiceInfoUrl": "http://165.154.202.27:81//vipService",
+            "leBian_MainChId": "69423",
+            "leBian_ClientChId": "youyi_bt_jj",
+            "leBian_SECID": "dmcve6kq.c",
+            "plugins": [
+                "common",
+                "YOUYI_1.6.9"
+            ],
+            "sdkBridges": [
+                "YOUYI_1.6.9"
+            ],
+            "keystoreName": "wenting.keystore",
+            "keystorePass": "n9P5j2b7blMm",
+            "keyaliasName": "game",
+            "keyaliasPass": "KlYX666Ro"
         },
         {
             "channelName": "游逸",

Файловите разлики са ограничени, защото са твърде много
+ 351 - 0
Build/NewCfg/ROLanguagePackage_cn.csv


Някои файлове не бяха показани, защото твърде много файлове са промени