better naming for "stackable" modifier

This commit is contained in:
XtraCube committed 2025-02-23 20:13:12 -05:00
1 parent 8fb8d18be9
commit fb19b4bc04
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -36,9 +36,9 @@ public abstract class BaseModifier
public virtual bool ShowInFreeplay => false;
/// <summary>
/// Gets a value indicating whether the modifier can be added multiple times.
/// Gets a value indicating whether the modifier is unique. If true, the player can only have one instance of this modifier.
/// </summary>
public virtual bool Stackable => false;
public virtual bool Unique => true;
/// <summary>
/// Gets the HUD information for this modifier. Defaults to the modifier name. Does nothing if <see cref="HideOnUi"/> is true.
+1 -1
View File
@@ -260,7 +260,7 @@ public class ModifierComponent(IntPtr cppPtr) : MonoBehaviour(cppPtr)
return null;
}
if (Modifiers.Find(x => x.ModifierId == modifierId && !x.Stackable) != null)
if (Modifiers.Find(x => x.ModifierId == modifierId && x.Unique) != null)
{
Logger<MiraApiPlugin>.Error($"Player already has modifier with id {modifierId}!");
return null;