From f93cab826d95d976f69703ae6ec7c9c4cdf3b62d Mon Sep 17 00:00:00 2001 From: David Vierra Date: Sat, 23 Apr 2011 12:02:13 -1000 Subject: [PATCH] add flips and rotation for powered and detector rails --- blockrotation.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/blockrotation.py b/blockrotation.py index 72cfba2..5bd5289 100644 --- a/blockrotation.py +++ b/blockrotation.py @@ -140,7 +140,17 @@ rotationClasses.append(Rail) def applyThrownBit(array): array[8:16] = array[0:8] | 0x8 - + +class PoweredDetectorRail(Rail): + blocktypes = [alphaMaterials.PoweredRail.ID, alphaMaterials.DetectorRail.ID] +PoweredDetectorRail.rotateLeft = genericRotation(PoweredDetectorRail) +PoweredDetectorRail.flipEastWest = genericEastWestFlip(PoweredDetectorRail) +PoweredDetectorRail.flipNorthSouth = genericNorthSouthFlip(PoweredDetectorRail) +applyThrownBit(PoweredDetectorRail.rotateLeft) +applyThrownBit(PoweredDetectorRail.flipEastWest) +applyThrownBit(PoweredDetectorRail.flipNorthSouth) + + class Lever: blocktypes = [alphaMaterials.Lever.ID] ThrownBit = 0x8