Mongoid changes (#440)

* Remove old IsValidMongoId and Regex

* Convert more configs to MongoId, as well as BaseClasses

* Remove HashUtil.Generate(), replaced with new MongoId()
This commit is contained in:
Jesse
2025-07-03 16:42:16 +02:00
committed by GitHub
parent 020cfa7ab8
commit ebe8f9ded5
53 changed files with 159 additions and 291 deletions
@@ -1,4 +1,5 @@
using SPTarkov.DI.Annotations;
using SPTarkov.Server.Core.Models.Common;
using SPTarkov.Server.Core.Models.Enums;
using SPTarkov.Server.Core.Models.Spt.Config;
using SPTarkov.Server.Core.Servers;
@@ -10,7 +11,7 @@ public class PaymentHelper(ConfigServer configServer)
{
protected bool _addedCustomMoney;
protected readonly InventoryConfig _inventoryConfig = configServer.GetConfig<InventoryConfig>();
protected readonly HashSet<string> _moneyTpls =
protected readonly HashSet<MongoId> _moneyTpls =
[
Money.DOLLARS,
Money.EUROS,
@@ -23,7 +24,7 @@ public class PaymentHelper(ConfigServer configServer)
/// </summary>
/// <param name="tpl">Item Tpl to check</param>
/// <returns></returns>
public bool IsMoneyTpl(string tpl)
public bool IsMoneyTpl(MongoId tpl)
{
// Add custom currency first time this method is accessed
if (!_addedCustomMoney)