mirror of
https://github.com/jie65535/GrasscutterCommandGenerator.git
synced 2025-10-21 19:53:29 +08:00
Update Scenes and avatar/weapon colors
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
using Newtonsoft.Json;
|
||||
using GrasscutterTools.Game.Props;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace GrasscutterTools.Game.Data.Excels
|
||||
{
|
||||
[ResourceType("AvatarExcelConfigData.json")]
|
||||
internal class AvatarData : GameResource
|
||||
{
|
||||
[JsonProperty("qualityType")]
|
||||
public string QualityType { get; set; }
|
||||
[JsonProperty("qualityType"), JsonConverter(typeof(StringEnumConverter))]
|
||||
public QualityType QualityType { get; set; }
|
||||
}
|
||||
}
|
||||
|
@@ -9,6 +9,7 @@ using System.Threading;
|
||||
using GrasscutterTools.Game.Data.Excels;
|
||||
using GrasscutterTools.Game.Inventory;
|
||||
using GrasscutterTools.Game.Props;
|
||||
using GrasscutterTools.GOOD;
|
||||
using GrasscutterTools.Utils;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
@@ -229,16 +230,35 @@ namespace GrasscutterTools.Game.Data
|
||||
QuestData.Values.OrderBy(it => it.Id).Select(it => $"{it.Id}:{TextMapData.GetText(MainQuestData[it.MainId].TitleTextMapHash)} - {TextMapData.GetText(it.DescTextMapHash.ToString())}"),
|
||||
Encoding.UTF8);
|
||||
|
||||
//File.WriteAllLines(
|
||||
// Path.Combine(dir, "Scene.txt"),
|
||||
// SceneData.Values.Select(it => $"{it.Id}:{it.ScriptData}"),
|
||||
// Encoding.UTF8);
|
||||
|
||||
sb.Clear();
|
||||
foreach (var it in SceneData.Values.OrderBy(it => it.Id))
|
||||
{
|
||||
var name = GameData.Scenes[it.Id];
|
||||
sb.AppendLine($"{it.Id}:{(name == ItemMap.EmptyName ? it.ScriptData : name)}");
|
||||
}
|
||||
File.WriteAllText(
|
||||
Path.Combine(dir, "Scene.txt"),
|
||||
sb.ToString(),
|
||||
Encoding.UTF8);
|
||||
|
||||
File.WriteAllLines(
|
||||
Path.Combine(dir, "Weapon.txt"),
|
||||
WeaponData.Values.Select(it => $"{it.Id}:{TextMapData.GetText(it.NameTextMapHash.ToString())}"),
|
||||
Encoding.UTF8);
|
||||
}
|
||||
|
||||
|
||||
File.WriteAllLines(
|
||||
Path.Combine(projectResourcesDir, "AvatarColor.txt"),
|
||||
AvatarData.Values.Select(it => $"{it.Id % 1000 + 1000}:{(int)it.QualityType}"),
|
||||
Encoding.UTF8);
|
||||
|
||||
File.WriteAllLines(
|
||||
Path.Combine(projectResourcesDir, "WeaponColor.txt"),
|
||||
WeaponData.Values.Select(it => $"{it.Id}:{(it.RankLevel >= 5 ? "yellow" : it.RankLevel >= 4 ? "purple" : "blue")}"),
|
||||
Encoding.UTF8);
|
||||
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
44
Source/GrasscutterTools/Game/Props/QualityType.cs
Normal file
44
Source/GrasscutterTools/Game/Props/QualityType.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
namespace GrasscutterTools.Game.Props
|
||||
{
|
||||
internal enum QualityType
|
||||
{
|
||||
/// <summary>
|
||||
/// 无
|
||||
/// </summary>
|
||||
QUALITY_NONE = 0,
|
||||
|
||||
/// <summary>
|
||||
/// 一星
|
||||
/// </summary>
|
||||
QUALITY_WHITE = 1,
|
||||
|
||||
/// <summary>
|
||||
/// 二星
|
||||
/// </summary>
|
||||
QUALITY_GREEN = 2,
|
||||
|
||||
/// <summary>
|
||||
/// 三星
|
||||
/// </summary>
|
||||
QUALITY_BLUE = 3,
|
||||
|
||||
/// <summary>
|
||||
/// 四星
|
||||
/// </summary>
|
||||
QUALITY_PURPLE = 4,
|
||||
|
||||
/// <summary>
|
||||
/// 五星
|
||||
/// </summary>
|
||||
QUALITY_ORANGE = 5,
|
||||
|
||||
/// <summary>
|
||||
/// 限定五星
|
||||
/// </summary>
|
||||
//QUALITY_ORANGE_SP = 105,
|
||||
QUALITY_ORANGE_SP = 5,
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user