From b407012bef556736901530d8c767c7a950862d57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AD=B1=E5=82=91?= Date: Fri, 25 Aug 2023 19:47:23 +0800 Subject: [PATCH] Add FreezeTime and LockWeather to scene page --- .../Pages/PageScene.Designer.cs | 20 ++ Source/GrasscutterTools/Pages/PageScene.cs | 16 ++ .../Pages/PageScene.en-US.resx | 9 + Source/GrasscutterTools/Pages/PageScene.resx | 174 ++++++++++++------ .../Pages/PageScene.ru-RU.resx | 25 ++- .../Pages/PageScene.zh-TW.resx | 6 + 6 files changed, 188 insertions(+), 62 deletions(-) diff --git a/Source/GrasscutterTools/Pages/PageScene.Designer.cs b/Source/GrasscutterTools/Pages/PageScene.Designer.cs index 35fdc72..7385203 100644 --- a/Source/GrasscutterTools/Pages/PageScene.Designer.cs +++ b/Source/GrasscutterTools/Pages/PageScene.Designer.cs @@ -46,6 +46,8 @@ this.ListScenes = new System.Windows.Forms.ListBox(); this.LblTp = new System.Windows.Forms.Label(); this.RbListCutScene = new System.Windows.Forms.RadioButton(); + this.ChkLockClimate = new System.Windows.Forms.CheckBox(); + this.BtnFreezeTime = new System.Windows.Forms.Button(); ((System.ComponentModel.ISupportInitialize)(this.NUDTpZ)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUDTpY)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.NUDTpX)).BeginInit(); @@ -203,10 +205,26 @@ this.RbListCutScene.UseVisualStyleBackColor = true; this.RbListCutScene.CheckedChanged += new System.EventHandler(this.RbListCutScene_CheckedChanged); // + // ChkLockClimate + // + resources.ApplyResources(this.ChkLockClimate, "ChkLockClimate"); + this.ChkLockClimate.Name = "ChkLockClimate"; + this.ChkLockClimate.UseVisualStyleBackColor = true; + this.ChkLockClimate.CheckedChanged += new System.EventHandler(this.ChkLockClimate_CheckedChanged); + // + // BtnFreezeTime + // + resources.ApplyResources(this.BtnFreezeTime, "BtnFreezeTime"); + this.BtnFreezeTime.Name = "BtnFreezeTime"; + this.BtnFreezeTime.UseVisualStyleBackColor = true; + this.BtnFreezeTime.Click += new System.EventHandler(this.BtnFreezeTime_Click); + // // PageScene // resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.BtnFreezeTime); + this.Controls.Add(this.ChkLockClimate); this.Controls.Add(this.RbListCutScene); this.Controls.Add(this.RbListDungeons); this.Controls.Add(this.RbListScene); @@ -252,5 +270,7 @@ private System.Windows.Forms.ListBox ListScenes; private System.Windows.Forms.Label LblTp; private System.Windows.Forms.RadioButton RbListCutScene; + private System.Windows.Forms.CheckBox ChkLockClimate; + private System.Windows.Forms.Button BtnFreezeTime; } } diff --git a/Source/GrasscutterTools/Pages/PageScene.cs b/Source/GrasscutterTools/Pages/PageScene.cs index cbebc50..f2cb7ce 100644 --- a/Source/GrasscutterTools/Pages/PageScene.cs +++ b/Source/GrasscutterTools/Pages/PageScene.cs @@ -156,5 +156,21 @@ namespace GrasscutterTools.Pages args += $" {GameData.Scenes.Ids[ListScenes.SelectedIndex]}"; SetCommand("/tp", args); } + + /// + /// 锁定天气 + /// + private void ChkLockClimate_CheckedChanged(object sender, EventArgs e) + { + SetCommand("/prop", $"is_weather_locked {(ChkLockClimate.Checked ? "on" : "off")}"); + } + + /// + /// 冻结游戏时间 + /// + private void BtnFreezeTime_Click(object sender, EventArgs e) + { + SetCommand("/prop", "is_game_time_locked on"); + } } } \ No newline at end of file diff --git a/Source/GrasscutterTools/Pages/PageScene.en-US.resx b/Source/GrasscutterTools/Pages/PageScene.en-US.resx index fa06753..7f335fb 100644 --- a/Source/GrasscutterTools/Pages/PageScene.en-US.resx +++ b/Source/GrasscutterTools/Pages/PageScene.en-US.resx @@ -182,4 +182,13 @@ In the command, you can use ~ to indicate the current position, and ~N to indica Cutscene + + 54, 21 + + + Lock + + + Freeze Time + \ No newline at end of file diff --git a/Source/GrasscutterTools/Pages/PageScene.resx b/Source/GrasscutterTools/Pages/PageScene.resx index ba7d5aa..c60f33f 100644 --- a/Source/GrasscutterTools/Pages/PageScene.resx +++ b/Source/GrasscutterTools/Pages/PageScene.resx @@ -129,7 +129,7 @@ - 75, 23 + 75, 25 TxtSceneFilter @@ -145,7 +145,7 @@ 14, 17 - 0 + 2 $this @@ -163,19 +163,22 @@ 343, 28 - 12 + 14 LblSceneDescription - - $this + + Bottom, Left + + + 192, 31 NoControl - - $this + + Bottom, Left $this @@ -189,11 +192,11 @@ System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - CmbClimateType + + 9 - 4 + 6 System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -208,10 +211,10 @@ 14, 17 - 2 + 4 - - 129, 156 + + BtnFreezeTime 7, 17 @@ -243,14 +246,11 @@ ListScenes - - LblTpZ - NoControl - 11 + 13 1 @@ -258,8 +258,11 @@ 13 + + 9 + - 5 + 7 System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -267,17 +270,20 @@ PageScene - - 10 + + 1 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 12 LblTpY - - Bottom, Left + + True + + + 8 $this @@ -292,7 +298,7 @@ RbListCutScene - 9 + 11 Bottom, Left @@ -309,6 +315,9 @@ 80, 23 + + 16 + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -324,9 +333,6 @@ NoControl - - 7 - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -339,6 +345,9 @@ NoControl + + 215, 184 + 109, 158 @@ -366,11 +375,14 @@ 设置天气 - + + 17 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True + + $this 11 @@ -381,21 +393,36 @@ 121, 25 + + 0 + 3, 158 3 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + 含场景ID + + Bottom, Left + + + LblTpZ + $this NoControl + + $this + RbListDungeons @@ -405,11 +432,11 @@ 287, 30 - - 6 + + 100, 25 - GrasscutterTools.Pages.BasePage, GrasscutterTools, Version=1.10.0.0, Culture=neutral, PublicKeyToken=de2b1c089621e923 + GrasscutterTools.Pages.BasePage, GrasscutterTools, Version=1.12.2.0, Culture=neutral, PublicKeyToken=de2b1c089621e923 Bottom, Left @@ -423,8 +450,8 @@ System.Windows.Forms.ListBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - BtnTeleport + + 80, 23 Bottom, Left @@ -438,9 +465,12 @@ 300, 208 - + $this + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + 12 @@ -448,16 +478,19 @@ 4 - 87, 187 + 87, 188 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + LblTp y - - True - - 14 + 16 50, 21 @@ -465,12 +498,18 @@ True - - Bottom, Left + + True 56, 17 + + 锁定 + + + True + NoControl @@ -481,7 +520,7 @@ 8 - 1 + 3 0 @@ -495,8 +534,8 @@ 76, 21 - - 300, 23 + + BtnTeleport True @@ -507,11 +546,11 @@ $this - - 14 + + ChkLockClimate - 13 + 15 System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -519,6 +558,9 @@ $this + + 冻结时间 + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -526,16 +568,22 @@ 场景控制 - 8 + 10 - - 80, 23 + + 300, 23 + + + CmbClimateType System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 16 + 18 + + + $this NUDTpY @@ -552,6 +600,9 @@ True + + 51, 21 + Bottom, Left @@ -570,17 +621,17 @@ 6, 185 - - LblTp + + 14 - 3 + 5 LblClimateType - 15 + 17 Top, Left, Right @@ -603,6 +654,9 @@ $this + + $this + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -618,8 +672,8 @@ $this - - 9 + + 129, 156 5 diff --git a/Source/GrasscutterTools/Pages/PageScene.ru-RU.resx b/Source/GrasscutterTools/Pages/PageScene.ru-RU.resx index 13dc401..f32f0f1 100644 --- a/Source/GrasscutterTools/Pages/PageScene.ru-RU.resx +++ b/Source/GrasscutterTools/Pages/PageScene.ru-RU.resx @@ -140,10 +140,10 @@ 84, 215 - 228, 21 + 126, 21 - Включить идентификатор сцены + Включить сцену 212, 186 @@ -169,6 +169,9 @@ 20, 184 + + 100, 25 + 52, 17 @@ -206,4 +209,22 @@ Катсцена + + 171, 30 + + + 65, 21 + + + Замок + + + 212, 211 + + + 125, 25 + + + Время заморозки + \ No newline at end of file diff --git a/Source/GrasscutterTools/Pages/PageScene.zh-TW.resx b/Source/GrasscutterTools/Pages/PageScene.zh-TW.resx index b1fb7d3..a166d11 100644 --- a/Source/GrasscutterTools/Pages/PageScene.zh-TW.resx +++ b/Source/GrasscutterTools/Pages/PageScene.zh-TW.resx @@ -148,4 +148,10 @@ 過場 + + 鎖定 + + + 凍結時間 + \ No newline at end of file