Nick J. Connors c977cb5333 Decluttered logs and added asteroid belts
Also includes some basic proc gen
2021-12-19 02:37:52 -05:00

26 lines
696 B
C#

using NewHorizons.Utility;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NewHorizons.External
{
public abstract class Module
{
public void Build(Dictionary<string, object> dict)
{
if (dict == null)
{
return;
}
foreach (var item in dict)
{
var property = GetType().GetProperty(item.Key, System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance);
property.SetValue(this, Convert.ChangeType(item.Value, property.PropertyType));
}
}
}
}