public void CannotAddBigItems()
        {
            Satchel     bag   = new Satchel();
            WoodenSword sword = new WoodenSword();
            BattleAxe   axe   = new BattleAxe();

            bag.AddItem(sword);
            bag.AddItem(axe);

            Assert.AreEqual(1, bag.ItemCount);

            bag.DisplayContents();
        }
        public void CanAddLittleItems()
        {
            Satchel     bag   = new Satchel();
            Boomerang   rang  = new Boomerang();
            WoodenSword sword = new WoodenSword();

            bag.AddItem(rang);
            bag.AddItem(sword);

            Assert.AreEqual(2, bag.ItemCount);

            bag.DisplayContents();
        }
Exemple #3
0
        public CombustionGenerator()
            : base(TypeName, TypeTileData, (StaticPrefabType)TypeID, "SpriteSheets/InventorySpriteSheet")
        {
            this._cutOutBounds = true;
            //this._currentBounds = SignsOfLife.ContentHandler.GetItemTextureBounds("tech_gaspipe");
            this._currentBounds = new Rectangle(1, 2, 96, 82);
            this._texture       = TextureLoader.Instance.GetTexture(_texid);
            this._requiresFloor = true;

            _gump         = new GUMP_CombustionGenerator();
            _hackySatchel = new Satchel();
            //_hackySatchel.SetContainer(_gump);
            _gump.SetPhysicalItem(_hackySatchel);//Damn it...
            _gump.SetPhysicalStaticPrefab(this);
        }
        public CombustionGenerator()
            : base(TypeName, TypeTileData, (StaticPrefabType)TypeID, "SpriteSheets/InventorySpriteSheet")
        {
            this._cutOutBounds = true;
            //this._currentBounds = SignsOfLife.ContentHandler.GetItemTextureBounds("tech_gaspipe");
            this._currentBounds = new Rectangle(1,2,96,82);
            this._texture = TextureLoader.Instance.GetTexture(_texid);
            this._requiresFloor = true;

            _gump = new GUMP_CombustionGenerator();
            _hackySatchel = new Satchel();
            //_hackySatchel.SetContainer(_gump);
            _gump.SetPhysicalItem(_hackySatchel);//Damn it...
            _gump.SetPhysicalStaticPrefab(this);
        }
Exemple #5
0
        public Bag CreateBag(string typeOfBag)
        {
            Bag newBag = null;

            switch (typeOfBag)
            {
            case "Backpack":
                newBag = new Backpack();
                break;

            case "Satchel":
                newBag = new Satchel();
                break;

            default:
                throw new ArgumentException(string.Format(ExceptionMessages.InvalidBagType, typeOfBag));
            }

            return(newBag);
        }