Ejemplo n.º 1
0
        internal static bool Door(Player p, BlockID block, ushort x, ushort y, ushort z)
        {
            if (p.level.physics == 0)
            {
                return(true);
            }

            BlockID     physForm;
            PhysicsArgs args = ActivateablePhysics.GetDoorArgs(block, out physForm);

            p.level.Blockchange(x, y, z, physForm, false, args);
            return(true);
        }
Ejemplo n.º 2
0
        internal static ChangeResult Door(Player p, BlockID old, ushort x, ushort y, ushort z)
        {
            if (p.level.physics == 0)
            {
                return(p.ChangeBlock(x, y, z, Block.Air));
            }

            BlockID     physForm;
            PhysicsArgs args = ActivateablePhysics.GetDoorArgs(old, out physForm);

            p.level.Blockchange(x, y, z, physForm, false, args);
            return(ChangeResult.Modified);
        }
Ejemplo n.º 3
0
 internal static void Door(Player p, ExtBlock block, ushort x, ushort y, ushort z)
 {
     if (p.level.physics != 0)
     {
         byte        physForm;
         PhysicsArgs args = ActivateablePhysics.GetDoorArgs(block, out physForm);
         p.level.Blockchange(x, y, z, (ExtBlock)physForm, false, args);
     }
     else
     {
         p.RevertBlock(x, y, z);
     }
 }
Ejemplo n.º 4
0
        internal static bool Door(Player p, byte block, ushort x, ushort y, ushort z)
        {
            if (p.level.physics == 0)
            {
                return(true);
            }
            bool isExt = false;

            if (block == Block.custom_block)
            {
                isExt = true;
                block = p.level.GetExtTile(x, y, z);
            }

            byte        physForm;
            PhysicsArgs args = ActivateablePhysics.GetDoorArgs(block, isExt, out physForm);

            p.level.Blockchange(x, y, z, physForm, false, args);
            return(true);
        }