Add Weather Page

This commit is contained in:
jie65535 committed 2023-10-14 11:36:17 +08:00
1 parent cfdca6f031
commit f8b920100d
18 files changed
+2199 -566

No files matched your search

@@ -55,8 +55,6 @@ namespace GrasscutterTools.Pages
public override void OnLoad()
{
Scenes = GameData.Scenes.Lines;
CmbClimateType.Items.Clear();
CmbClimateType.Items.AddRange(Resources.ClimateType.Split(','));
}
/// <summary>
@@ -130,24 +128,6 @@ namespace GrasscutterTools.Pages
}
}
/// <summary>
/// 气候类型列表
/// </summary>
private static readonly string[] climateTypes = { "none", "sunny", "cloudy", "rain", "thunderstorm", "snow", "mist" };
/// <summary>
/// 气候类型下拉框选中项改变时触发
/// </summary>
private void CmbClimateType_SelectedIndexChanged(object sender, EventArgs e)
{
if (CmbClimateType.SelectedIndex < 0)
return;
if (CommandVersion.Check(CommandVersion.V1_2_2))
SetCommand("/weather", CmbClimateType.SelectedIndex < climateTypes.Length ? climateTypes[CmbClimateType.SelectedIndex] : "none");
else
SetCommand("/weather", $"0 {CmbClimateType.SelectedIndex}");
}
/// <summary>
/// 点击传送按钮时触发
/// </summary>
@@ -159,14 +139,6 @@ namespace GrasscutterTools.Pages
SetCommand("/tp", args);
}
/// <summary>
/// 锁定天气
/// </summary>
private void ChkLockClimate_CheckedChanged(object sender, EventArgs e)
{
SetCommand("/prop", $"is_weather_locked {(ChkLockClimate.Checked ? "on" : "off")}");
}
/// <summary>
/// 冻结游戏时间
/// </summary>