mirror of
https://github.com/jie65535/GrasscutterCommandGenerator.git
synced 2025-12-11 09:01:35 +08:00
Add Weather Page
This commit is contained in:
@@ -69,6 +69,8 @@ namespace GrasscutterTools.Game.Data
|
||||
|
||||
public TextMapData TextMapData { get; set; }
|
||||
|
||||
public List<WeatherData> WeatherData { get; set; }
|
||||
|
||||
public GameResources(string resourcesDirPath, TextMapData textMapData)
|
||||
{
|
||||
TextMapData = textMapData;
|
||||
@@ -446,6 +448,31 @@ namespace GrasscutterTools.Game.Data
|
||||
|
||||
#endregion
|
||||
|
||||
#region Weather
|
||||
|
||||
// Weather
|
||||
|
||||
sb.Clear();
|
||||
|
||||
foreach (var scene in WeatherData
|
||||
.GroupBy(it => it.SceneId)
|
||||
.OrderBy(it => it.Key))
|
||||
{
|
||||
sb.Append("// ").AppendLine(scene.Key.ToString());
|
||||
foreach (var weather in scene)
|
||||
{
|
||||
var profileName = weather.ProfileName.Substring(weather.ProfileName.LastIndexOf('/') + 1)
|
||||
.Replace("ESP_", "");
|
||||
sb.AppendLine($"{weather.AreaId}:{profileName}");
|
||||
}
|
||||
}
|
||||
File.WriteAllText(
|
||||
Path.Combine(projectResourcesDir, "Weather.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