public void EquipGun(Duck d)
        {
            d.ThrowItem(false);
            d.GiveHoldable(this);

            // d.Equip(this);
        }
        public override void OnPressAction()
        {
            if (this.owner == null)
            {
                return;
            }
            Thing owner = this.owner;
            Duck  duck  = this.duck;

            if (duck != null)
            {
                ++duck.profile.stats.presentsOpened;
                this.duck.ThrowItem();
            }
            Level.Remove((Thing)this);
            Level.Add((Thing) new OpenPresent(this.x, this.y, this._sprite.frame));
            for (int index = 0; index < 4; ++index)
            {
                Level.Add((Thing)SmallSmoke.New(this.x + Rando.Float(-2f, 2f), this.y + Rando.Float(-2f, 2f)));
            }
            SFX.Play("harp", 0.8f);
            if (this._contains == (System.Type)null)
            {
                this.Initialize();
            }
            if (!(Editor.CreateThing(this._contains) is Holdable thing))
            {
                return;
            }
            if (Rando.Int(500) == 1 && thing is Gun && (thing as Gun).CanSpawnInfinite())
            {
                (thing as Gun).infiniteAmmoVal = true;
                (thing as Gun).infinite.value  = true;
            }
            thing.x = owner.x;
            thing.y = owner.y;
            Level.Add((Thing)thing);
            if (duck == null)
            {
                return;
            }
            duck.GiveHoldable(thing);
            duck.resetAction = true;
        }
 public Pedestal(float xpos, float ypos, Team team, int place)
     : base(xpos, ypos)
 {
     this._team         = team;
     this._sprite       = new SpriteMap("rockThrow/placePedastals", 38, 45);
     this._sprite.frame = place;
     this.center        = new Vec2((float)(this._sprite.w / 2), (float)this._sprite.h);
     this.graphic       = (Sprite)this._sprite;
     this.depth         = new Depth(0.062f);
     this._scoreCard    = new Sprite("rockThrow/scoreCard");
     this._font         = new BitmapFont("biosFont", 8);
     this._scoreCard.CenterOrigin();
     this._trophy = new Sprite("trophy");
     this._trophy.CenterOrigin();
     if (Network.isServer)
     {
         int num1 = 0;
         foreach (Profile activeProfile in team.activeProfiles)
         {
             float num2 = (float)((team.activeProfiles.Count - 1) * 10);
             Duck  duck = new Duck(xpos - num2 / 2f + (float)(num1 * 10), this.GetYOffset() - 15f, activeProfile);
             duck.depth = new Depth(0.06f);
             Level.Add((Thing)duck);
             if (place == 0)
             {
                 Trophy trophy = new Trophy(duck.x, duck.y);
                 Level.Add((Thing)trophy);
                 if (!Network.isActive)
                 {
                     duck.Fondle((Thing)trophy);
                     duck.GiveHoldable((Holdable)trophy);
                 }
             }
             ++num1;
         }
     }
     Level.Add((Thing) new Platform(xpos - 17f, this.GetYOffset(), 34f, 16f));
     Level.Add((Thing) new Block(-6f, this.GetYOffset() - 100f, 6f, 200f));
     Level.Add((Thing) new Block(320f, this.GetYOffset() - 100f, 6f, 200f));
     Level.Add((Thing) new Block(-20f, 155f, 600f, 100f));
 }