From a3c15260b869a9db7ca93257a5809828a668c5bd Mon Sep 17 00:00:00 2001 From: Hakoyu Date: Wed, 17 Apr 2024 23:33:17 +0800 Subject: [PATCH] =?UTF-8?q?#=E4=BF=AE=E5=A4=8D=20-=20=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E5=AE=A0=E7=89=A9=E5=B7=AE=E5=BC=82=E4=BF=A1=E6=81=AF=E7=9A=84?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VPet.ModMaker/Models/ModModel/ModInfoModel.cs | 8 ++++---- VPet.ModMaker/Models/ModModel/PetModel.cs | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/VPet.ModMaker/Models/ModModel/ModInfoModel.cs b/VPet.ModMaker/Models/ModModel/ModInfoModel.cs index 56dc656..c189347 100644 --- a/VPet.ModMaker/Models/ModModel/ModInfoModel.cs +++ b/VPet.ModMaker/Models/ModModel/ModInfoModel.cs @@ -92,24 +92,24 @@ public class ModInfoModel : ObservableObjectX // 若宠物的值为默认值并且本体同名宠物不为默认值, 则把本体宠物的值作为模组宠物的默认值 if ( petModel.TouchHeadRectangleLocation - == PetModel.Current.TouchHeadRectangleLocation + == PetModel.Default.TouchHeadRectangleLocation && petModel.TouchHeadRectangleLocation != mainPet.TouchHeadRectangleLocation ) petModel.TouchHeadRectangleLocation = mainPet.TouchHeadRectangleLocation; if ( petModel.TouchBodyRectangleLocation - == PetModel.Current.TouchBodyRectangleLocation + == PetModel.Default.TouchBodyRectangleLocation && petModel.TouchBodyRectangleLocation != mainPet.TouchBodyRectangleLocation ) petModel.TouchBodyRectangleLocation = mainPet.TouchBodyRectangleLocation; if ( petModel.TouchRaisedRectangleLocation - == PetModel.Current.TouchRaisedRectangleLocation + == PetModel.Default.TouchRaisedRectangleLocation && petModel.TouchRaisedRectangleLocation != mainPet.TouchRaisedRectangleLocation ) petModel.TouchRaisedRectangleLocation = mainPet.TouchRaisedRectangleLocation; if ( - petModel.RaisePoint == PetModel.Current.RaisePoint + petModel.RaisePoint == PetModel.Default.RaisePoint && petModel.RaisePoint != mainPet.RaisePoint ) petModel.RaisePoint = mainPet.RaisePoint; diff --git a/VPet.ModMaker/Models/ModModel/PetModel.cs b/VPet.ModMaker/Models/ModModel/PetModel.cs index 0af7cd4..ab135fa 100644 --- a/VPet.ModMaker/Models/ModModel/PetModel.cs +++ b/VPet.ModMaker/Models/ModModel/PetModel.cs @@ -120,7 +120,7 @@ public class PetModel : ObservableObjectX Moves.Add(new(move)); } - public static PetModel Current { get; } = null!; + public static PetModel Default { get; } = new() { I18nResource = new() }; #region FromMain [DebuggerBrowsable(DebuggerBrowsableState.Never)] @@ -477,21 +477,21 @@ public class PetModel : ObservableObjectX SavePetBasicInfo(lps); // 如果值不为默认并且不与本体值相同, 则保存 if ( - TouchHeadRectangleLocation != Current.TouchHeadRectangleLocation + TouchHeadRectangleLocation != Default.TouchHeadRectangleLocation && TouchHeadRectangleLocation != mainPet.TouchHeadRectangleLocation ) SavePetTouchHeadInfo(lps); if ( - TouchBodyRectangleLocation != Current.TouchBodyRectangleLocation + TouchBodyRectangleLocation != Default.TouchBodyRectangleLocation && TouchBodyRectangleLocation != mainPet.TouchBodyRectangleLocation ) SavePetTouchBodyInfo(lps); if ( - TouchRaisedRectangleLocation != Current.TouchRaisedRectangleLocation + TouchRaisedRectangleLocation != Default.TouchRaisedRectangleLocation && TouchRaisedRectangleLocation != mainPet.TouchRaisedRectangleLocation ) SavePetTouchRaisedInfo(lps); - if (RaisePoint != Current.RaisePoint && RaisePoint != mainPet.RaisePoint) + if (RaisePoint != Default.RaisePoint && RaisePoint != mainPet.RaisePoint) SavePetRaisePointInfo(lps); }