Added retreival of agenst, started basic flow
This commit is contained in:
30
FarmmapsHaulmkilling/Models/HaulmkillingAgent.cs
Normal file
30
FarmmapsHaulmkilling/Models/HaulmkillingAgent.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace FarmmapsHaulmkilling.Models
|
||||
{
|
||||
public class HaulmkillingAgent
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public List<string> SupportedOptions { get; set; }
|
||||
public Dictionary<string, List<HaulmkillingAgentValue>> Values { get; set; }
|
||||
|
||||
public HaulmkillingAgentValue? GetAgentValue(string inputName, string optionKey)
|
||||
{
|
||||
if (!Values.ContainsKey(inputName))
|
||||
return null;
|
||||
|
||||
var agentDataValues = Values[inputName];
|
||||
return agentDataValues.FirstOrDefault(v => v.Option.Equals(optionKey));
|
||||
}
|
||||
}
|
||||
|
||||
public struct HaulmkillingAgentValue
|
||||
{
|
||||
public string Option { get; set; }
|
||||
public float Min { get; set; }
|
||||
public float Max { get; set; }
|
||||
public float FMul { get; set; }
|
||||
public float FExp { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user