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); }
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); }
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); } }
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); }