mirror of
https://github.com/jie65535/GrasscutterCommandGenerator.git
synced 2025-12-10 08:51:34 +08:00
Add Weather Page
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user