Add farmland drop

This commit is contained in:
zontreck 2025-05-07 12:15:23 -07:00
parent 9715975a48
commit 419c05dbac
5 changed files with 113 additions and 3 deletions

View file

@ -22,7 +22,7 @@ namespace AriasServerUtils
{ CooldownType.RTP, "30s" },
{ CooldownType.Back, "5s" }
};
private static readonly int CURRENT_VERSION = 5;
private static readonly int CURRENT_VERSION = 6;
public int Version { get; set; } = 0;
@ -36,11 +36,25 @@ namespace AriasServerUtils
public int MaxRTPBlockDistance { get; set; } = 50000;
public Dictionary<CooldownType, string> Cooldowns { get; set; } = new Dictionary<CooldownType, string>();
/// <summary>
/// If true, attempts to downgrade the soil quality when breaking farmland.
/// </summary>
public bool EnableFarmlandDowngrade { get; set; } = false;
/// <summary>
/// If true, farmland will drop as soil when broken.
/// </summary>
public bool EnableFarmlandDrop { get; set; } = true;
public Dictionary<CooldownType, string> GetDefaultCooldowns()
{
return m_defaultCD;
}
/// <summary>
/// Performs some checks against known possible invalid values and sets them to sane values.
/// </summary>
public void SanityCheck()
{
foreach (var cd in GetDefaultCooldowns())