diff --git a/Backend/Appearance.cs b/Backend/Appearance.cs index f557268..c5d9926 100644 --- a/Backend/Appearance.cs +++ b/Backend/Appearance.cs @@ -400,9 +400,9 @@ public Proto.Appearances.AppearanceFlagMarket GetOrCreateMarketFlags() handleFlag(change, flags.Height.HasElevation, ItemTypeFlag.HasElevation, "Height.HasElevation"); } - // Both expire and expireStop map to ClientDuration. - bool hasExpiryToggle = (flags.Expire || flags.Expirestop); - handleFlag(change, hasExpiryToggle, ItemTypeFlag.ClientDuration, "expire | expireStop"); + // All of expire, expireStop and clockExpire map to ClientDuration (as of 12.90). + bool hasExpiryToggle = (flags.Expire || flags.Expirestop || flags.Clockexpire); + handleFlag(change, hasExpiryToggle, ItemTypeFlag.ClientDuration, "expire | expireStop | clockExpire"); return change.changes.Count > 0 ? change : null; } diff --git a/LapisItemEditor/LapisItemEditor.csproj b/LapisItemEditor/LapisItemEditor.csproj index 1b7ad17..9d4c8ad 100644 --- a/LapisItemEditor/LapisItemEditor.csproj +++ b/LapisItemEditor/LapisItemEditor.csproj @@ -1,6 +1,6 @@  - WinExe + Exe net6.0 enable LapisItemEditor diff --git a/LapisItemEditor/ViewModels/Main/ItemPropertiesViewModel.cs b/LapisItemEditor/ViewModels/Main/ItemPropertiesViewModel.cs index 7ec63b8..8f288da 100644 --- a/LapisItemEditor/ViewModels/Main/ItemPropertiesViewModel.cs +++ b/LapisItemEditor/ViewModels/Main/ItemPropertiesViewModel.cs @@ -346,6 +346,7 @@ public class ItemPropertiesViewModel : ViewModelBase private bool hasWearout; private bool hasExpire; private bool hasExpireStop; + private bool hasClockExpire; private bool hasTradeAs; private bool hasShowAs; private bool hasMinimumLevel; @@ -429,6 +430,7 @@ public ItemPropertiesViewModel() HasWearout = false; HasExpire = false; HasExpireStop = false; + HasClockExpire = false; HasTradeAs = false; HasShowAs = false; HasMinimumLevel = false; @@ -578,6 +580,7 @@ public ItemPropertiesViewModel() FullBank = _flags.Fullbank; HasExpire = _flags.Expire; HasExpireStop = _flags.Expirestop; + HasClockExpire = _flags.Clockexpire; HasWearout = _flags.Wearout; @@ -922,6 +925,14 @@ public ItemPropertiesViewModel() } }); + this.WhenAnyValue(x => x.hasClockExpire).Subscribe(value => + { + if (flags != null) + { + flags.Clockexpire = value; + } + }); + this.WhenAnyValue(x => x.IgnoreLook).Subscribe(value => { if (flags != null) @@ -1053,6 +1064,7 @@ public ItemPropertiesViewModel() public bool HasWearout { get => hasWearout; set => this.RaiseAndSetIfChanged(ref hasWearout, value); } public bool HasExpire { get => hasExpire; set => this.RaiseAndSetIfChanged(ref hasExpire, value); } public bool HasExpireStop { get => hasExpireStop; set => this.RaiseAndSetIfChanged(ref hasExpireStop, value); } + public bool HasClockExpire { get => hasClockExpire; set => this.RaiseAndSetIfChanged(ref hasClockExpire, value); } public bool HasTradeAs { get => hasTradeAs; set => this.RaiseAndSetIfChanged(ref hasTradeAs, value); } public bool HasShowAs { get => hasShowAs; set => this.RaiseAndSetIfChanged(ref hasShowAs, value); } public bool HasMinimumLevel { get => hasMinimumLevel; set => this.RaiseAndSetIfChanged(ref hasMinimumLevel, value); } diff --git a/LapisItemEditor/Views/Main/ItemPropertiesView.axaml b/LapisItemEditor/Views/Main/ItemPropertiesView.axaml index 3123b49..fd587ee 100644 --- a/LapisItemEditor/Views/Main/ItemPropertiesView.axaml +++ b/LapisItemEditor/Views/Main/ItemPropertiesView.axaml @@ -134,7 +134,7 @@ - + Hangable Hook Type @@ -189,7 +189,7 @@ - + Height @@ -291,7 +291,12 @@ Expire stop - + + + + + Clock expire + diff --git a/LapisItemEditor/Views/Main/MainWindow.axaml.cs b/LapisItemEditor/Views/Main/MainWindow.axaml.cs index c3fbfec..fe79efd 100644 --- a/LapisItemEditor/Views/Main/MainWindow.axaml.cs +++ b/LapisItemEditor/Views/Main/MainWindow.axaml.cs @@ -1,6 +1,3 @@ -using System; -using System.Diagnostics; -using System.IO; using Avalonia.Controls; using Avalonia.Input; using Avalonia.Markup.Xaml;