Update All resources to 5.0

This commit is contained in:
2024-08-28 23:05:06 +08:00
parent c62b46850c
commit 92f5289576
61 changed files with 14042 additions and 502 deletions

View File

@@ -29,7 +29,6 @@
private void InitializeComponent()
{
this.BtnUpdateResources = new System.Windows.Forms.Button();
this.BtnConvertCutScene = new System.Windows.Forms.Button();
this.LblProjectResRoot = new System.Windows.Forms.Label();
this.TxtProjectResRoot = new System.Windows.Forms.TextBox();
this.LblGcResRoot = new System.Windows.Forms.Label();
@@ -49,16 +48,6 @@
this.BtnUpdateResources.UseVisualStyleBackColor = true;
this.BtnUpdateResources.Click += new System.EventHandler(this.BtnUpdateResources_Click);
//
// BtnConvertCutScene
//
this.BtnConvertCutScene.Location = new System.Drawing.Point(147, 195);
this.BtnConvertCutScene.Name = "BtnConvertCutScene";
this.BtnConvertCutScene.Size = new System.Drawing.Size(150, 30);
this.BtnConvertCutScene.TabIndex = 0;
this.BtnConvertCutScene.Text = "Convert Cutscene";
this.BtnConvertCutScene.UseVisualStyleBackColor = true;
this.BtnConvertCutScene.Click += new System.EventHandler(this.BtnConvertCutScene_Click);
//
// LblProjectResRoot
//
this.LblProjectResRoot.AutoSize = true;
@@ -132,7 +121,6 @@
this.Controls.Add(this.BtnUpdateBannerTitles);
this.Controls.Add(this.BtnUpdateActivity);
this.Controls.Add(this.BtnUpdateAllResources);
this.Controls.Add(this.BtnConvertCutScene);
this.Controls.Add(this.BtnUpdateResources);
this.Name = "PageTools";
this.ResumeLayout(false);
@@ -143,7 +131,6 @@
#endregion
private System.Windows.Forms.Button BtnUpdateResources;
private System.Windows.Forms.Button BtnConvertCutScene;
private System.Windows.Forms.Label LblProjectResRoot;
private System.Windows.Forms.TextBox TxtProjectResRoot;
private System.Windows.Forms.Label LblGcResRoot;

View File

@@ -27,7 +27,6 @@ using System.Windows.Forms;
using GrasscutterTools.Game;
using GrasscutterTools.Game.Activity;
using GrasscutterTools.Game.CutScene;
using GrasscutterTools.Game.Data;
using GrasscutterTools.Properties;
@@ -101,27 +100,6 @@ namespace GrasscutterTools.Pages
}
}
private void BtnConvertCutScene_Click(object sender, EventArgs e)
{
var src = new OpenFileDialog
{
Title = "请选择 Json 格式的 Cutscene.txt",
Multiselect = false,
};
if (src.ShowDialog() != DialogResult.OK)
return;
try
{
var cutScenes = JsonConvert.DeserializeObject<List<CutSceneItem>>(File.ReadAllText(src.FileName));
File.WriteAllLines(src.FileName, cutScenes.Select(it => $"{it.Id}:{it.Path.Substring(it.Path.IndexOf('/') + 1)}"));
MessageBox.Show("OK", Resources.Tips, MessageBoxButtons.OK);
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), Resources.Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private bool CheckInputPaths()
{
if (string.IsNullOrEmpty(TxtProjectResRoot.Text) || string.IsNullOrEmpty(TxtGcResRoot.Text))
@@ -177,7 +155,7 @@ namespace GrasscutterTools.Pages
TextMapData ??= new TextMapData(TxtGcResRoot.Text);
UpdateActivityForLanguage(activityItems, "TextMapCHS", "zh-cn");
// UpdateActivityForLanguage(activityItems, "TextMapCHS", "zh-cn");
UpdateActivityForLanguage(activityItems, "TextMapCHT", "zh-tw");
UpdateActivityForLanguage(activityItems, "TextMapEN", "en-us");
UpdateActivityForLanguage(activityItems, "TextMapRU", "ru-ru");