mirror of
https://github.com/jie65535/GrasscutterCommandGenerator.git
synced 2025-10-21 19:53:29 +08:00
Add SceneTag Page
This commit is contained in:
@@ -163,10 +163,20 @@ namespace GrasscutterTools.Game
|
||||
public static readonly Version V1_6_3 = new Version(1, 6, 3);
|
||||
|
||||
/// <summary>
|
||||
/// 2023/??
|
||||
/// 2023/9/1
|
||||
/// </summary>
|
||||
public static readonly Version V1_7_0 = new Version(1, 7, 0);
|
||||
|
||||
/// <summary>
|
||||
/// 2023/9/3
|
||||
/// </summary>
|
||||
public static readonly Version V1_7_1 = new Version(1, 7, 1);
|
||||
|
||||
/// <summary>
|
||||
/// 2023/10/1
|
||||
/// </summary>
|
||||
public static readonly Version V1_7_2 = new Version(1, 7, 2);
|
||||
|
||||
// More...
|
||||
/// <summary>
|
||||
/// Date
|
||||
@@ -190,6 +200,8 @@ namespace GrasscutterTools.Game
|
||||
V1_6_2,
|
||||
V1_6_3,
|
||||
V1_7_0,
|
||||
V1_7_1,
|
||||
V1_7_2,
|
||||
};
|
||||
|
||||
#endregion - 版本列表 Version List -
|
||||
|
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}"),
|
||||
|
@@ -38,6 +38,7 @@ namespace GrasscutterTools.Game
|
||||
Monsters = new ItemMapGroup(Resources.Monsters);
|
||||
Gadgets = new ItemMapGroup(Resources.Gadget);
|
||||
Scenes = new ItemMap(Resources.Scene);
|
||||
SceneTags = new ItemMapGroup(Resources.SceneTag);
|
||||
Dungeons = new ItemMap(Resources.Dungeon);
|
||||
Weapons = new ItemMap(Resources.Weapon);
|
||||
WeaponColors = new ItemMap(Resources.WeaponColor);
|
||||
@@ -73,6 +74,8 @@ namespace GrasscutterTools.Game
|
||||
|
||||
public static ItemMap Scenes { get; private set; }
|
||||
|
||||
public static ItemMapGroup SceneTags { get; private set; }
|
||||
|
||||
public static ItemMap Dungeons { get; private set; }
|
||||
|
||||
public static ItemMap Weapons { get; private set; }
|
||||
|
Reference in New Issue
Block a user