-
-
Notifications
You must be signed in to change notification settings - Fork 6
ConditionalPrograms
ConditionalPrograms is a class containing some predefined conditional TurboList programs.
Please be sure to get familiar with DefaultPrograms before continuing!
Note 1: TurboLists will be called "groups" eventually.
Note 2: Do not forget to "import" the class when using it to prevent compile errors.
Note 3: as of writing this, ConditionalPrograms are not available for non-java models yet.
Example on how to use a Conditional Program in a Model Group:
somegroup.addProgram(new ConditionalPrograms.FrontLights().add(DefaultPrograms.GLOW).addElse(DefaultPrograms.RGB_PRIMARY));
//when using more fine tuned imports
othergroup.addPrograms(new BackLights().add(GLOW).addElse(new RGBChannel("channel_id"));Alternatives for addElse are addOpposite or addNegative, if you would prefer to use them, they work the same.
Here a list with their function & eventual usage:
-
Lights,FrontLights- condition is
truewhen vehicle lights are on
- condition is
-
BackLights,RearLights- condition is
truewhen vehicle lights are on or going backwards
- condition is
-
BrakeLights,- condition is
truewhen a vehicle is braking (BasicSystem)
- condition is
-
FogLights,- condition is
truewhen fog lights are on
- condition is
-
LongLights,- condition is
truewhen long lights are on
- condition is
-
ReverseLights- condition is
truewhen the vehicle is reversing (going backwards)
- condition is
-
LightsFrontForward- for trains,
truewhen lights on and going forward
- for trains,
-
LightsFrontBackward- for trains,
truewhen lights on and going backward
- for trains,
-
LightsRearForward- for trains,
truewhen lights on and going forward
- for trains,
-
LightsRearBackward- for trains,
truewhen lights on and going backward
- for trains,
-
TurnSignalLeft,IndicatorLightLeft- condition is
truewhen the left turn signal is on or warning lights
- condition is
-
TurnSignalRight,IndicatorLightRight- condition is
truewhen the right turn signal is on or warning lights
- condition is
-
WarningLights- condition is
truewhen the warning/hazard lights are on
- condition is
-
BackLightsSignalLeft,TailLightsSignalLeft- condition is
truewhen the left turn signal is on OR back lights condition
- condition is
-
BackLightsSignalRight,TailLightsSignalRight- condition is
truewhen the right turn signal is on OR back lights condition
- condition is
-
IDSpecific(String)- condition is
truewhen the part category equals the specified string
- condition is
-
IDSpecificArray(String[])- condition is
truewhen the part category equals any of the specified strings
- condition is
Need help in something that is not in the wiki, or is not there yet? Got issues or crashes?
Or want to help expand the Wiki? We have a discord server! https://discord.gg/AkMAzaA