mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-20 01:46:15 +00:00
better naming for "stackable" modifier
This commit is contained in:
1 parent
8fb8d18be9
commit
fb19b4bc04
2 files changed
+3
-3
No files matched your search
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user