;;ITEA - International Transit Enthusiasts' Association.;;
;;; 2015 - Created by Manuel Mejias for ITEA Community
;;;Thanks to Michael Kam - Samuel Bennett
[include]
3dcab/minicabina.b3d
[include]
3dcab/minicabina2.b3d
[include]
3dcab/SalaDeMaquinas.b3d

[object]
states = 3dcab/puerta1.b3d
rotateYfunction = if[cameraDistance < 8.2 ^ cameraDistance > 6.2 , max[value-delta*0.44,0], min[value+delta*0.6,1.6]]
RotateYDirection = 0, -1, 0
position = -0.35,0,-6.65

[object]
states = 3dcab/puerta2.b3d
rotateYfunction = if[cameraDistance < 8.2 ^ cameraDistance > 6.2 , max[value-delta*0.44,0], min[value+delta*0.6,1.6]]
RotateYDirection = 0, -1, 0
position = 0.35,0,6.65


;;REAR COACH;;
[INCLUDE]
amfleetcoaches/amfleetii.animated
position = 0,0,-23.3196


;;SEATS;;
[include]
3dcab/asiento.b3d
position = 0.7,0,7.85
[include]
3dcab/asiento.b3d
position = -0.7,0,7.85
[include]
3dcab/asiento2.b3d
position = -0.7,0,-7.85
[include]
3dcab/asiento2.b3d
position = 0.7,0,-7.85


;;TELEPHONE;
[include]
3dcab/telefono.b3d
position = -0.3,2.65,8.61
[include]
3dcab/telefono2.b3d
position = 0.3,2.65,-8.61


;;INVERSOR;;
[object]
states = 3dcab/Controls/reverser.b3d
rotateXfunction = -0.05
rotateYfunction = 0.7 * reverserNotch 
position = 0.43,2.433,8.68

[object]
states = 3dcab/Controls/reverser2.b3d
rotateXfunction = -0.05
rotateYfunction = -0.7 * reverserNotch 
position = -0.43,2.433,-8.68

;;ACELERADOR;;
[object]
states = 3dcab/Controls/Acelerator.b3d
rotateXfunction = 0.07 * powerNotch
position = 0.43,2.353,8.54
[object]
states = 3dcab/Controls/Acelerator.b3d
rotateXfunction = -0.07 * powerNotch
position = -0.43,2.353,-8.54

;;BRAKE;;
[object]
states = 3dcab/Controls/brake.b3d
rotateXfunction = 0.15 * brakeNotch
position = 0.9525,2.42,8.545
[object]
states = 3dcab/Controls/brake.b3d
rotateXfunction = -0.15 * brakeNotch
position = -0.9525,2.42,-8.545


;;LOCOMOTIVE BRAKE;;
[include]
3dcab/Controls/LocoBrake.b3d
position = 1.145,2.42,8.545

[include]
3dcab/Controls/LocoBrake2.b3d
position = -1.145,2.42,-8.545


;;Speedometer;;
[object]
states = 3dcab/Console/velocimetro.csv
rotatexdirection = -1, 0, 0
rotatexfunction = -4.05 + abs[speedometer] * 0.0695
rotateyfunction = -1
rotatezfunction = -1.55
position = 0.703,2.547,8.841

[object]
states = 3dcab/Console/velocimetro2.csv
rotatexdirection = -1, 0, 0
rotatexfunction = -0.95 + abs[speedometer] * 0.0695
rotateyfunction = 1
rotatezfunction = -1.55
position = -0.703,2.547,-8.841

;;EQ Reservoir ;;
[object]
states = 3dcab/Console/WHITE.csv
rotatexdirection = -1, 0, 0
rotatexfunction = -4.05 + equalizingReservoir * 0.00014503773772999998 * 0.031
rotateyfunction = -1
rotatezfunction = -1.55
position = 0.614,2.562,8.85
[object]
states = 3dcab/Console/WHITE2.csv
rotatexdirection = -1, 0, 0
rotatexfunction = -0.95 + equalizingReservoir * 0.00014503773772999998 * 0.031
rotateyfunction = 1
rotatezfunction = -1.55
position = -0.614,2.562,-8.85

;;Brake Pressure;;
[object]
states = 3dcab/Console/red.csv
rotatexdirection = -1, 0, 0
rotatexfunction = -4.05 + mainReservoir * 0.00014503773772999998 * 0.031
rotateyfunction = -1
rotatezfunction = -1.55
position = 0.614,2.562,8.85
[object]
states = 3dcab/Console/red2.csv
rotatexdirection = -1, 0, 0
rotatexfunction = -0.95 + mainReservoir * 0.00014503773772999998 * 0.031
rotateyfunction = 1
rotatezfunction = -1.55
position = -0.614,2.562,-8.85

;;Brake Pipe;;
[object]
states = 3dcab/Console/WHITE.csv
rotatexdirection = -1, 0, 0
rotatexfunction = -4.05 + brakePipe * 0.00014503773772999998 * 0.031
rotateyfunction = -1
rotatezfunction = -1.55
position = 0.615,2.506,8.813

[object]
states = 3dcab/Console/WHITE2.csv
rotatexdirection = -1, 0, 0
rotatexfunction = -0.95 + brakePipe * 0.00014503773772999998 * 0.031
rotateyfunction = 1
rotatezfunction = -1.55
position = -0.615,2.506,-8.813

;;Brake Cylinder;;
[object]
states = 3dcab/Console/red.csv
rotatexdirection = -1, 0, 0
rotatexfunction = -4.05 + brakeCylinder * 0.00014503773772999998 * 0.031
rotateyfunction = -1
rotatezfunction = -1.55
position = 0.615,2.506,8.813
[object]
states = 3dcab/Console/red2.csv
rotatexdirection = -1, 0, 0
rotatexfunction = -0.95 + brakeCylinder * 0.00014503773772999998 * 0.031
rotateyfunction = 1
rotatezfunction = -1.55
position = -0.615,2.506,-8.813

;;VELOCIMETRO DIGITAL;;
[object]
states = 3dcab/Console/0.b3d,3dcab/Console/1.b3d,3dcab/Console/2.b3d,3dcab/Console/3.b3d,3dcab/Console/4.b3d,3dcab/Console/5.b3d,3dcab/Console/6.b3d,3dcab/Console/7.b3d,3dcab/Console/8.b3d,3dcab/Console/9.b3d
stateFunction = floor[mod[Abs[speedometer] * 2.23693629, 10]]
position = 0.707,2.519,8.823
[object]
states = 3dcab/Console/0.b3d,3dcab/Console/1.b3d,3dcab/Console/2.b3d,3dcab/Console/3.b3d,3dcab/Console/4.b3d,3dcab/Console/5.b3d,3dcab/Console/6.b3d,3dcab/Console/7.b3d,3dcab/Console/8.b3d,3dcab/Console/9.b3d
stateFunction = floor[mod[Abs[speedometer] * 2.23693629, 100] * 0.1]
position = 0.703,2.519,8.823
[object]
states = 3dcab/Console/null.b3d,3dcab/Console/1.b3d,3dcab/Console/2.b3d,3dcab/Console/3.b3d,3dcab/Console/4.b3d,3dcab/Console/5.b3d,3dcab/Console/6.b3d,3dcab/Console/7.b3d,3dcab/Console/8.b3d,3dcab/Console/9.b3d
stateFunction = floor[Abs[speedometer] * 2.23693629/100]
position = 0.699,2.519,8.823

;;REVERSED CAB;;
[object]
states = 3dcab/Console/Reversed/0.b3d,3dcab/Console/Reversed/1.b3d,3dcab/Console/Reversed/2.b3d,3dcab/Console/Reversed/3.b3d,3dcab/Console/Reversed/4.b3d,3dcab/Console/Reversed/5.b3d,3dcab/Console/Reversed/6.b3d,3dcab/Console/Reversed/7.b3d,3dcab/Console/Reversed/8.b3d,3dcab/Console/Reversed/9.b3d
stateFunction = floor[mod[Abs[speedometer] * 2.23693629, 10]]
position = -0.707,2.519,-8.823
[object]
states = 3dcab/Console/Reversed/0.b3d,3dcab/Console/Reversed/1.b3d,3dcab/Console/Reversed/2.b3d,3dcab/Console/Reversed/3.b3d,3dcab/Console/Reversed/4.b3d,3dcab/Console/Reversed/5.b3d,3dcab/Console/Reversed/6.b3d,3dcab/Console/Reversed/7.b3d,3dcab/Console/Reversed/8.b3d,3dcab/Console/Reversed/9.b3d
stateFunction = floor[mod[Abs[speedometer] * 2.23693629, 100] * 0.1]
position = -0.703,2.519,-8.823
[object]
states = 3dcab/Console/null.b3d,3dcab/Console/Reversed/1.b3d,3dcab/Console/Reversed/2.b3d,3dcab/Console/Reversed/3.b3d,3dcab/Console/Reversed/4.b3d,3dcab/Console/Reversed/5.b3d,3dcab/Console/Reversed/6.b3d,3dcab/Console/Reversed/7.b3d,3dcab/Console/Reversed/8.b3d,3dcab/Console/Reversed/9.b3d
stateFunction = floor[Abs[speedometer] * 2.23693629/100]
position = -0.699,2.519,-8.823



;;ACELEROMETRO DIGITAL;;
[object]
states = 3dcab/Console/0.b3d,3dcab/Console/1.b3d,3dcab/Console/2.b3d,3dcab/Console/3.b3d,3dcab/Console/4.b3d,3dcab/Console/5.b3d,3dcab/Console/6.b3d,3dcab/Console/7.b3d,3dcab/Console/8.b3d,3dcab/Console/9.b3d
stateFunction = floor[Abs[accelerationMotor] * 40/100]
position = 0.666,2.5075,8.816
[object]
states = 3dcab/Console/0.b3d,3dcab/Console/1.b3d,3dcab/Console/2.b3d,3dcab/Console/3.b3d,3dcab/Console/4.b3d,3dcab/Console/5.b3d,3dcab/Console/6.b3d,3dcab/Console/7.b3d,3dcab/Console/8.b3d,3dcab/Console/9.b3d
stateFunction = floor[mod[Abs[accelerationMotor] * 40, 100] * 0.1]
position = 0.67,2.5075,8.816
[object]
states = 3dcab/Console/0.b3d,3dcab/Console/1.b3d,3dcab/Console/2.b3d,3dcab/Console/3.b3d,3dcab/Console/4.b3d,3dcab/Console/5.b3d,3dcab/Console/6.b3d,3dcab/Console/7.b3d,3dcab/Console/8.b3d,3dcab/Console/9.b3d
stateFunction = floor[mod[Abs[accelerationMotor] * 40, 10]]
position = 0.674,2.5075,8.816

;;REVERSED CAB;;
[object]
states = 3dcab/Console/Reversed/0.b3d,3dcab/Console/Reversed/1.b3d,3dcab/Console/Reversed/2.b3d,3dcab/Console/Reversed/3.b3d,3dcab/Console/Reversed/4.b3d,3dcab/Console/Reversed/5.b3d,3dcab/Console/Reversed/6.b3d,3dcab/Console/Reversed/7.b3d,3dcab/Console/Reversed/8.b3d,3dcab/Console/Reversed/9.b3d
stateFunction = floor[Abs[accelerationMotor] * 40/100]
position = -0.666,2.5075,-8.816
[object]
states = 3dcab/Console/Reversed/0.b3d,3dcab/Console/Reversed/1.b3d,3dcab/Console/Reversed/2.b3d,3dcab/Console/Reversed/3.b3d,3dcab/Console/Reversed/4.b3d,3dcab/Console/Reversed/5.b3d,3dcab/Console/Reversed/6.b3d,3dcab/Console/Reversed/7.b3d,3dcab/Console/Reversed/8.b3d,3dcab/Console/Reversed/9.b3d
stateFunction = floor[mod[Abs[accelerationMotor] * 40, 100] * 0.1]
position = -0.67,2.5075,-8.816
[object]
states = 3dcab/Console/Reversed/0.b3d,3dcab/Console/Reversed/1.b3d,3dcab/Console/Reversed/2.b3d,3dcab/Console/Reversed/3.b3d,3dcab/Console/Reversed/4.b3d,3dcab/Console/Reversed/5.b3d,3dcab/Console/Reversed/6.b3d,3dcab/Console/Reversed/7.b3d,3dcab/Console/Reversed/8.b3d,3dcab/Console/Reversed/9.b3d
stateFunction = floor[mod[Abs[accelerationMotor] * 40, 10]]
position = -0.674,2.5075,-8.816

;;;ACELEROMETRO BAR;;
[object]
states = 3dcab/Console/accelerator.b3d
translateXFunction = Abs[accelerationMotor] * 40 * 0.000416666
position = 0.6815,2.5075,8.818
[object]
states = 3dcab/Console/accelerator2.b3d
translateXFunction = Abs[accelerationMotor] * 40 * 0.000416666
position = -0.6815,2.5075,-8.818

;;"134.21617746321752976770869283836" conversion m/s2 to mph/min;;

;;TRACTIVE EFFORT DIGITS;;
[object]
states = 3dcab/Console/0.b3d,3dcab/Console/1.b3d,3dcab/Console/2.b3d,3dcab/Console/3.b3d,3dcab/Console/4.b3d,3dcab/Console/5.b3d,3dcab/Console/6.b3d,3dcab/Console/7.b3d,3dcab/Console/8.b3d,3dcab/Console/9.b3d
stateFunction = floor[mod[Abs[accelerationMotor] * 22, 10]]
position = 0.553,2.483,8.799
[object]
states = 3dcab/Console/0.b3d,3dcab/Console/1.b3d,3dcab/Console/2.b3d,3dcab/Console/3.b3d,3dcab/Console/4.b3d,3dcab/Console/5.b3d,3dcab/Console/6.b3d,3dcab/Console/7.b3d,3dcab/Console/8.b3d,3dcab/Console/9.b3d
stateFunction = floor[mod[Abs[accelerationMotor] * 22, 100] * 0.1]
position = 0.548,2.483,8.799

;;REVERSED CAB;;
[object]
states = 3dcab/Console/Reversed/0.b3d,3dcab/Console/Reversed/1.b3d,3dcab/Console/Reversed/2.b3d,3dcab/Console/Reversed/3.b3d,3dcab/Console/Reversed/4.b3d,3dcab/Console/Reversed/5.b3d,3dcab/Console/Reversed/6.b3d,3dcab/Console/Reversed/7.b3d,3dcab/Console/Reversed/8.b3d,3dcab/Console/Reversed/9.b3d
stateFunction = floor[mod[Abs[accelerationMotor] * 22, 10]]
position = -0.553,2.483,-8.799
[object]
states = 3dcab/Console/Reversed/0.b3d,3dcab/Console/Reversed/1.b3d,3dcab/Console/Reversed/2.b3d,3dcab/Console/Reversed/3.b3d,3dcab/Console/Reversed/4.b3d,3dcab/Console/Reversed/5.b3d,3dcab/Console/Reversed/6.b3d,3dcab/Console/Reversed/7.b3d,3dcab/Console/Reversed/8.b3d,3dcab/Console/Reversed/9.b3d
stateFunction = floor[mod[Abs[accelerationMotor] * 22, 100] * 0.1]
position = -0.548,2.483,-8.799

;;TRACTIVE EFFORT BAR;;
[object]
states = 3dcab/Console/effort0.b3d,3dcab/Console/effort1.b3d,3dcab/Console/effort2.b3d,3dcab/Console/effort3.b3d,3dcab/Console/effort4.b3d,3dcab/Console/effort5.b3d,3dcab/Console/effort6.b3d,3dcab/Console/effort7.b3d,3dcab/Console/effort8.b3d,3dcab/Console/effort9.b3d
statefunction = floor[mod[Abs[accelerationMotor] * 22, 100] * 0.1]
translateYfunction = Abs[accelerationMotor] * 18.1 * 0.0014625
translateZfunction = Abs[accelerationMotor] * 18.1 * 0.00095
TextureShiftYFunction = if[AccelerationMotor < 0 & BrakeNotch > 0, max[0,0], min[1,0.5]]
[object]
states = 3dcab/Console/Reversed/effort0.b3d,3dcab/Console/Reversed/effort1.b3d,3dcab/Console/Reversed/effort2.b3d,3dcab/Console/Reversed/effort3.b3d,3dcab/Console/Reversed/effort4.b3d,3dcab/Console/Reversed/effort5.b3d,3dcab/Console/Reversed/effort6.b3d,3dcab/Console/Reversed/effort7.b3d,3dcab/Console/Reversed/effort8.b3d,3dcab/Console/Reversed/effort9.b3d
statefunction = floor[mod[Abs[accelerationMotor] * 22, 100] * 0.1]
translateYfunction = Abs[accelerationMotor] * 18.1 * 0.0014625
translateZfunction = Abs[accelerationMotor] * 18.1 * 0.00095
TranslateZDirection = 0, 0, -1
TextureShiftYFunction = if[AccelerationMotor < 0 & BrakeNotch > 0, max[0,0], min[1,0.5]]

;;;TEXT BOX CONSOLE;;
;;WHEELSLIP
[INCLUDE]
3dcab/Console/nepon.b3d
[INCLUDE]
3dcab/Console/nepon2.b3d
[INCLUDE]
3dcab/Console/FIRE.b3d
[INCLUDE]
3dcab/Console/FIRE2.b3d
[object]
states = 3dcab/Console/null.b3d,3dcab/Console/wheelslip.b3d
statefunction = abs[speed] <= 13.41 & powerNotch >= 6
[object]
states = 3dcab/Console/null.b3d,3dcab/Console/wheelslip2.b3d
statefunction = abs[speed] <= 13.41 & powerNotch >= 6
[object]
states = 3dcab/Console/null.b3d,3dcab/Console/NOBrakePower.b3d
statefunction = powerNotch < 1 & BrakeNotch < 1
[object]
states = 3dcab/Console/null.b3d,3dcab/Console/NOBrakePower2.b3d
statefunction = powerNotch < 1 & BrakeNotch < 1
[object]
states = 3dcab/Console/null.b3d,3dcab/Console/alerter.b3d
statefunction = pluginState[270]
[object]
states = 3dcab/Console/null.b3d,3dcab/Console/alerter2.b3d
statefunction = pluginState[270]
[object]
states = 3dcab/Console/DOORSBypassed.b3d,3dcab/Console/DOORSOpened.b3d
statefunction = Doors
[object]
states = 3dcab/Console/DOORSBypassed2.b3d,3dcab/Console/DOORSOpened2.b3d
statefunction = Doors
[object]
states =  3dcab/Console/PANTOOFF.b3d
statefunction = pluginState[256]
[object]
states =  3dcab/Console/PANTOOFF2.b3d
statefunction = pluginState[256]


;;North East Corridor Signalling;;
[object]
states = 3dcab/Signalling/0.b3d,3dcab/Signalling/1.b3d,3dcab/Signalling/2.b3d,3dcab/Signalling/3.b3d,3dcab/Signalling/4.b3d,3dcab/Signalling/5.b3d,3dcab/Signalling/6.b3d,3dcab/Signalling/7.b3d,3dcab/Signalling/8.b3d,3dcab/Signalling/9.b3d,3dcab/Signalling/10.b3d,3dcab/Signalling/11.b3d,3dcab/Signalling/12.b3d,3dcab/Signalling/13.b3d
Statefunction = section

;;reversed;;
[object]
states = 3dcab/Signalling/reversed/0.b3d,3dcab/Signalling/reversed/1.b3d,3dcab/Signalling/reversed/2.b3d,3dcab/Signalling/reversed/3.b3d,3dcab/Signalling/reversed/4.b3d,3dcab/Signalling/reversed/5.b3d,3dcab/Signalling/reversed/6.b3d,3dcab/Signalling/reversed/7.b3d,3dcab/Signalling/reversed/8.b3d,3dcab/Signalling/reversed/9.b3d,3dcab/Signalling/reversed/10.b3d,3dcab/Signalling/reversed/11.b3d,3dcab/Signalling/reversed/12.b3d,3dcab/Signalling/reversed/13.b3d
Statefunction = section
;;;Metro North Railroad Signalling "FUTURE";;
