mirror of
https://github.com/jie65535/GrasscutterCommandGenerator.git
synced 2025-10-22 20:09:46 +08:00
Add SceneTag Page
This commit is contained in:
39
Source/GrasscutterTools/Game/Data/Excels/SceneTagData.cs
Normal file
39
Source/GrasscutterTools/Game/Data/Excels/SceneTagData.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* Grasscutter Tools
|
||||
* Copyright (C) 2023 jie65535
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
**/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace GrasscutterTools.Game.Data.Excels
|
||||
{
|
||||
[ResourceType("SceneTagConfigData.json")]
|
||||
internal class SceneTagData
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[JsonProperty("sceneTagName")]
|
||||
public string SceneTagName { get; set; }
|
||||
|
||||
[JsonProperty("sceneId")]
|
||||
public int SceneId { get; set; }
|
||||
|
||||
[JsonProperty("isDefaultValid")]
|
||||
public bool IsDefaultValid { get; set; }
|
||||
}
|
||||
}
|
@@ -63,6 +63,8 @@ namespace GrasscutterTools.Game.Data
|
||||
|
||||
public Dictionary<int, SceneData> SceneData { get; set; }
|
||||
|
||||
public List<SceneTagData> SceneTagData { get; set; }
|
||||
|
||||
public Dictionary<int, WeaponData> WeaponData { get; set; }
|
||||
|
||||
public TextMapData TextMapData { get; set; }
|
||||
@@ -419,6 +421,31 @@ namespace GrasscutterTools.Game.Data
|
||||
#endregion Weapon
|
||||
}
|
||||
|
||||
#region SceneTag
|
||||
|
||||
// SceneTag
|
||||
|
||||
sb.Clear();
|
||||
|
||||
foreach (var scene in SceneTagData
|
||||
.GroupBy(it => it.SceneId))
|
||||
{
|
||||
sb.Append("// ").AppendLine(scene.Key.ToString());
|
||||
foreach (var sceneTag in scene)
|
||||
{
|
||||
sb.Append($"{sceneTag.Id}:{sceneTag.SceneTagName}");
|
||||
if (sceneTag.IsDefaultValid)
|
||||
sb.Append(" (Default)");
|
||||
sb.AppendLine();
|
||||
}
|
||||
}
|
||||
File.WriteAllText(
|
||||
Path.Combine(projectResourcesDir, "SceneTag.txt"),
|
||||
sb.ToString(),
|
||||
Encoding.UTF8);
|
||||
|
||||
#endregion
|
||||
|
||||
File.WriteAllLines(
|
||||
Path.Combine(projectResourcesDir, "AvatarColor.txt"),
|
||||
AvatarData.Values.Select(it => $"{it.Id % 1000 + 1000}:{(int)it.QualityType}"),
|
||||
|
Reference in New Issue
Block a user