oops, forgot to commit the ASU Update Cooldowns commands

This commit is contained in:
zontreck 2025-03-06 18:39:12 -07:00
parent 65ec65bfc9
commit 54e8d8a4d5
5 changed files with 159 additions and 9 deletions

View file

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Runtime.ConstrainedExecution;
using Vintagestory.API.Server;
namespace AriasServerUtils
@ -13,6 +14,15 @@ namespace AriasServerUtils
[Serializable]
public class ASUModConfig
{
private readonly static Dictionary<CooldownType, string> m_defaultCD = new Dictionary<CooldownType, string>{
{ CooldownType.Home, "5s" },
{ CooldownType.Warp, "10s" },
{ CooldownType.Spawn, "5s" },
{ CooldownType.RTP, "30s" },
{ CooldownType.Back, "5s" }
};
public int MaxHomes { get; set; } = 20;
public bool AdminsBypassMaxHomes { get; set; } = true;
public bool onlyAdminsCreateWarps { get; set; } = true;
@ -30,14 +40,7 @@ namespace AriasServerUtils
public Dictionary<CooldownType, string> GetDefaultCooldowns()
{
return new Dictionary<CooldownType, string>{
{ CooldownType.Home, "5s" },
{ CooldownType.Warp, "10s" },
{ CooldownType.Spawn, "5s" },
{ CooldownType.RTP, "30s" },
{ CooldownType.Back, "5s" }
};
return m_defaultCD;
}
public void SanityCheckCooldowns()