Even More Modifiers  1.0.0.0
A mod for rolling various bonus stats on items
NullModifierPool.cs
Go to the documentation of this file.
1 using System.Collections.Generic;
2 using Loot.Api.Attributes;
3 
4 namespace Loot.Api.Core
5 {
10  [DoNotLoad]
11  public sealed class NullModifierPool : FiniteModifierPool
12  {
13  private static NullModifierPool _singleton;
14  public static NullModifierPool INSTANCE
15  {
16  get => _singleton ?? (_singleton = new NullModifierPool());
17  internal set => _singleton = value;
18  }
19 
20  public override bool CanRoll(ModifierContext ctx) => false;
21 
22  public override float RollChance => 0f;
23 
24  public NullModifierPool(List<Modifier> modifiers = null) : base(modifiers)
25  {
26  }
27  }
28 }
Defines a context in which a Modifier might be rolled Which fields are available (not null) depends o...
Defines a "Null" modifier which represents a pool with no modifiers Cannot be rolled normally ...
NullModifierPool(List< Modifier > modifiers=null)
static NullModifierPool _singleton