Skip to content

Commit

Permalink
Reverted unneeded changes, cleaned some usings, and updated comments
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveBenz committed Dec 30, 2023
1 parent 9be6710 commit f83f5e8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion TractorMod/Framework/Config/GenericAttachmentConfig.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Pathoschild.Stardew.TractorMod.Framework.Config
{
/// <summary>Configuration for an attachment which has no extra modalities - just on or off.</summary>
/// <summary>Configuration for an attachment which can only be enabled or disabled.</summary>
internal class GenericAttachmentConfig
{
/// <summary>Whether to enable the attachment.</summary>
Expand Down
6 changes: 0 additions & 6 deletions TractorMod/Framework/Config/IExtendedDistanceConfig.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pathoschild.Stardew.TractorMod.Framework.Config
{
/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion TractorMod/Framework/Config/ScytheConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ internal class ScytheConfig : IExtendedDistanceConfig
/// <summary>Whether to clear weeds.</summary>
public bool ClearWeeds { get; set; } = true;

/// <inheritdoc/>
/// <summary>If true, causes the area of effect to be increased somewhat from <see cref="ModConfig.Distance"/></summary>
public bool IncreaseDistance { get; set; } = true;
}
}
8 changes: 6 additions & 2 deletions TractorMod/Framework/ExtendedDistanceAttachment.cs
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
using Pathoschild.Stardew.TractorMod.Framework.Config;
using StardewModdingAPI;
using StardewValley;

namespace Pathoschild.Stardew.TractorMod.Framework
{
/// <summary>The base class for attachments that can operate over a larger area.
/// </summary>
/// <typeparam name="TConfig">The type of the config file.</typeparam>
internal abstract class ExtendedDistanceAttachment<TConfig> : BaseAttachment
where TConfig : IExtendedDistanceConfig

{
/// <summary>Construct an instance.</summary>
/// <param name="config">The mod configuration.</param>
/// <param name="config">The configuration for the attachment.</param>
protected ExtendedDistanceAttachment(TConfig config, IModRegistry modRegistry, IReflectionHelper reflection, int rateLimit = 0)
: base(modRegistry, reflection, rateLimit)
{
this.Config = config;
}

/// <summary>The configuration for the attachment.</summary>
protected TConfig Config { get; }

/// <summary>If true, the attachment's area of affect should be expanded by a tile.</summary>
public override bool IsDistanceExtended => this.Config.IncreaseDistance;
}
}

0 comments on commit f83f5e8

Please sign in to comment.