コード例 #1
0
        public sealed override bool Drop(int x, int y)
        {
            if (Terraria.WorldGen.destroyObject)
            {
                return(false);
            }

            for (int m = x; m < x + width; m++)
            {
                for (int n = y; n < y + height; n++)
                {
                    if (Main.tile[m, n].type == 28 && Main.tile[m, n].active())
                    {
                        Main.tile[m, n].type = 0;
                        Main.tile[m, n].active(false);
                    }
                }
            }

            foreach (PotsDrop potsDrop in PotsRegistery.ModifyPotsDrop(Type))
            {
                if (potsDrop.successFunc(x, y))
                {
                    potsDrop.ExecuteDrop(x, y);
                    return(false);
                }
                Terraria.WorldGen.destroyObject = true;
            }

            Terraria.WorldGen.destroyObject = true;

            return(false);
        }
コード例 #2
0
        public sealed override void SetDefaults()
        {
            Main.tileCut[Type]            = true;
            Main.tileFrameImportant[Type] = true;
            Main.tileNoFail[Type]         = true;

            SetExtraDefaults(ref TileObjectData.newTile);
            PotsRegistery.RegisterDefaultsPotsDrop(Type);
            RegisterPotsDrop(PotsRegistery.ModifyPotsDrop(Type));

            TileObjectData.addTile(Type);
            base.SetDefaults();
        }