Example #1
0
 public void Initialize(int numSlots)
 {
     if (this.Storage == null)
     {
         this.Storage = new AuthorizationInventory(
             numSlots,
             this.Parent,
             AuthorizationInventory.AuthroizationFlags.AuthedMayAdd | AuthorizationInventory.AuthroizationFlags.AuthedMayRemove);
     }
 }
Example #2
0
 public override void Initialize()
 {
     if (!(this.Storage is AuthorizationInventory))
     {
         // ensure the inventory type is authorization inventory (migration)
         var newInventory = new AuthorizationInventory(
             this.Storage.Stacks.Count(),
             this.Parent,
             AuthorizationInventory.AuthroizationFlags.AuthedMayAdd | AuthorizationInventory.AuthroizationFlags.AuthedMayRemove);
         newInventory.ReplaceStacks(this.Storage.Stacks);
         this.Storage = newInventory;
     }
     base.Initialize();
 }