mirror of
https://github.com/ACEmulator/ACE
synced 2026-08-17 12:26:06 -04:00
* adding verify-armor-levels admin command * . * . * update comment * ensuring rng formula doesn't get applied more than once on multiple re-runs
37 lines
828 B
C#
37 lines
828 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
using ACE.Entity.Enum;
|
|
|
|
namespace ACE.Server.Entity
|
|
{
|
|
public class TinkerLog
|
|
{
|
|
public List<MaterialType> Tinkers;
|
|
|
|
public TinkerLog(string csv)
|
|
{
|
|
Tinkers = new List<MaterialType>();
|
|
|
|
if (csv == null) return;
|
|
|
|
var vals = csv.Split(',');
|
|
|
|
foreach (var val in vals)
|
|
{
|
|
if (!Enum.TryParse(val, true, out MaterialType materialType))
|
|
{
|
|
Console.WriteLine($"Couldn't parse {val}");
|
|
continue;
|
|
}
|
|
Tinkers.Add(materialType);
|
|
}
|
|
}
|
|
|
|
public int NumTinkers(MaterialType type)
|
|
{
|
|
return Tinkers.Count(i => i == type);
|
|
}
|
|
}
|
|
}
|