Files
7d2dXG/Mods/CustomPlayerActionManager/Scripts/Utilities/ActionSetUserDataExtension.cs
Nathaniel Cosford 062dfab2cd Patched
2025-05-30 01:04:40 +09:30

22 lines
684 B
C#

using System.Collections.Generic;
public static class ActionSetUserDataExtension
{
public static void AddUniConflict(this PlayerActionsBase self, PlayerActionsBase other)
{
List<PlayerActionsBase> list = new List<PlayerActionsBase>((self.UserData as PlayerActionData.ActionSetUserData).bindingsConflictWithSet);
if(!list.Contains(other))
{
list.Add(other);
self.UserData = new PlayerActionData.ActionSetUserData(list.ToArray());
}
}
public static void AddBiConflict(this PlayerActionsBase self, PlayerActionsBase other)
{
self.AddUniConflict(other);
other.AddUniConflict(self);
}
}