public void Initialize(int numSlots) { if (this.Storage == null) { this.Storage = new AuthorizationInventory( numSlots, this.Parent, AuthorizationInventory.AuthroizationFlags.AuthedMayAdd | AuthorizationInventory.AuthroizationFlags.AuthedMayRemove); } }
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(); }