Files
SoulliesOfficial 9b1b5ca93f initial
2025-10-03 00:02:43 -04:00

40 lines
1.6 KiB
C#

using System.Collections.Generic;
using UnityEngine;
namespace Continentis.MainGame.Equipment
{
public class AttributeSubmodule : SubmoduleBase<EquipmentBase>
{
public Dictionary<string, float> numericChange;
public Dictionary<string, float> percentageChangeOfAccumulation;
public Dictionary<string, float> percentageChangeOfMultiplication;
public AttributeSubmodule(EquipmentBase equipment,
Dictionary<string, float> numericChange,
Dictionary<string, float> percentageChangeOfAccumulation,
Dictionary<string, float> percentageChangeOfMultiplication) : base(equipment)
{
this.numericChange = numericChange ?? new Dictionary<string, float>();
this.percentageChangeOfAccumulation = percentageChangeOfAccumulation ?? new Dictionary<string, float>();
this.percentageChangeOfMultiplication = percentageChangeOfMultiplication ?? new Dictionary<string, float>();
}
public List<string> GetModifiedAttributeNames()
{
HashSet<string> attributeNames = new HashSet<string>();
foreach (var key in numericChange.Keys)
{
attributeNames.Add(key);
}
foreach (var key in percentageChangeOfAccumulation.Keys)
{
attributeNames.Add(key);
}
foreach (var key in percentageChangeOfMultiplication.Keys)
{
attributeNames.Add(key);
}
return new List<string>(attributeNames);
}
}
}