-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
true
when vehicle lights are on
- condition is
-
BackLights
,RearLights
- condition is
true
when vehicle lights are on or going backwards
- condition is
-
BrakeLights
,- condition is
true
when a vehicle is braking (BasicSystem)
- condition is
-
FogLights
,- condition is
true
when fog lights are on
- condition is
-
LongLights
,- condition is
true
when long lights are on
- condition is
-
ReverseLights
- condition is
true
when the vehicle is reversing (going backwards)
- condition is
-
LightsFrontForward
- for trains,
true
when lights on and going forward
- for trains,
-
LightsFrontBackward
- for trains,
true
when lights on and going backward
- for trains,
-
LightsRearForward
- for trains,
true
when lights on and going forward
- for trains,
-
LightsRearBackward
- for trains,
true
when lights on and going backward
- for trains,
-
TurnSignalLeft
,IndicatorLightLeft
- condition is
true
when the left turn signal is on or warning lights
- condition is
-
TurnSignalRight
,IndicatorLightRight
- condition is
true
when the right turn signal is on or warning lights
- condition is
-
WarningLights
- condition is
true
when the warning/hazard lights are on
- condition is
-
BackLightsSignalLeft
,TailLightsSignalLeft
- condition is
true
when the left turn signal is on OR back lights condition
- condition is
-
BackLightsSignalRight
,TailLightsSignalRight
- condition is
true
when the right turn signal is on OR back lights condition
- condition is
-
IDSpecific(String)
- condition is
true
when the part category equals the specified string
- condition is
-
IDSpecificArray(String[])
- condition is
true
when 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