@@ -54,9 +54,11 @@ public sealed class BotConfig {
5454 [ PublicAPI ]
5555 public const EBotBehaviour DefaultBotBehaviour = EBotBehaviour . None ;
5656
57+ [ Obsolete ( "Functionality deprecated, will be removed in the next version" ) ]
5758 [ PublicAPI ]
5859 public const string ? DefaultCustomGamePlayedWhileFarming = null ;
5960
61+ [ Obsolete ( "Functionality deprecated, will be removed in the next version" ) ]
6062 [ PublicAPI ]
6163 public const string ? DefaultCustomGamePlayedWhileIdle = null ;
6264
@@ -207,9 +209,11 @@ public WebProxy? WebProxy {
207209 public ImmutableHashSet < EAssetType > CompleteTypesToSend { get ; init ; } = DefaultCompleteTypesToSend ;
208210
209211 [ JsonInclude ]
212+ [ Obsolete ( "Functionality deprecated, will be removed in the next version" ) ]
210213 public string ? CustomGamePlayedWhileFarming { get ; init ; } = DefaultCustomGamePlayedWhileFarming ;
211214
212215 [ JsonInclude ]
216+ [ Obsolete ( "Functionality deprecated, will be removed in the next version" ) ]
213217 public string ? CustomGamePlayedWhileIdle { get ; init ; } = DefaultCustomGamePlayedWhileIdle ;
214218
215219 [ JsonInclude ]
@@ -388,11 +392,15 @@ public BotConfig() { }
388392 [ UsedImplicitly ]
389393 public bool ShouldSerializeCompleteTypesToSend ( ) => ! Saving || ( ( CompleteTypesToSend != DefaultCompleteTypesToSend ) && ! CompleteTypesToSend . SetEquals ( DefaultCompleteTypesToSend ) ) ;
390394
395+ #pragma warning disable CA1822
396+ [ Obsolete ( "Functionality deprecated, will be removed in the next version" ) ]
391397 [ UsedImplicitly ]
392- public bool ShouldSerializeCustomGamePlayedWhileFarming ( ) => ! Saving || ( CustomGamePlayedWhileFarming != DefaultCustomGamePlayedWhileFarming ) ;
398+ public bool ShouldSerializeCustomGamePlayedWhileFarming ( ) => false ;
393399
400+ [ Obsolete ( "Functionality deprecated, will be removed in the next version" ) ]
394401 [ UsedImplicitly ]
395- public bool ShouldSerializeCustomGamePlayedWhileIdle ( ) => ! Saving || ( CustomGamePlayedWhileIdle != DefaultCustomGamePlayedWhileIdle ) ;
402+ public bool ShouldSerializeCustomGamePlayedWhileIdle ( ) => false ;
403+ #pragma warning restore CA1822
396404
397405 [ UsedImplicitly ]
398406 public bool ShouldSerializeEnabled ( ) => ! Saving || ( Enabled != DefaultEnabled ) ;
@@ -521,15 +529,6 @@ public static async Task<bool> Write(string filePath, BotConfig botConfig) {
521529 }
522530 }
523531
524- if ( ! string . IsNullOrEmpty ( CustomGamePlayedWhileFarming ) ) {
525- try {
526- // Test CustomGamePlayedWhileFarming against supported format, otherwise we'll throw later when used
527- string _ = string . Format ( CultureInfo . CurrentCulture , CustomGamePlayedWhileFarming , null , null ) ;
528- } catch ( FormatException e ) {
529- return ( false , Strings . FormatErrorConfigPropertyInvalid ( nameof ( CustomGamePlayedWhileFarming ) , e . Message ) ) ;
530- }
531- }
532-
533532 foreach ( EFarmingOrder farmingOrder in FarmingOrders . Where ( static farmingOrder => ! Enum . IsDefined ( farmingOrder ) ) ) {
534533 return ( false , Strings . FormatErrorConfigPropertyInvalid ( nameof ( FarmingOrders ) , farmingOrder ) ) ;
535534 }
0 commit comments