You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| threshold | float | No |```0.9```| Defines at which fillUnit fill level percentage the object changes |
77
-
|thresholdIsGreater| boolean | No |```true```|If true the object changes are activated above threshold, if not then below threshold|
81
+
|thresholdCondition| boolean | No |```>```|Object changes are activated based on defined condition and threshold value. Possible values: ```<```, ```=```, ```>```|
78
82
| requiresPoweredOn | boolean | No |```true```| Require vehicle to be powered on in order for object changes can be active |
79
83
| requiresTurnedOn | boolean | No |```false```| Require vehicle to be turned on in order for object changes can be active [^1]|
80
84
@@ -84,6 +88,7 @@ Trigger object changes based on the fill level percentage.
84
88
<vehicle>
85
89
<fillUnitExtension>
86
90
<fillUnitfillUnitIndex="3">
91
+
<!-- Object changes are active when fill level percentage is above 85% -->
| threshold | float | No |```0.9```| Defines at which fillUnit fill level percentage the sound is triggered |
108
-
|thresholdIsGreater| boolean | No |```true```|If true the sound is triggered above threshold, if not then below threshold|
113
+
|thresholdCondition| boolean | No |```>```|Sound starts playing based on defined condition and threshold value. Possible values: ```<```, ```=```, ```>```|
109
114
| requiresPoweredOn | boolean | No |```true```| Require vehicle to be powered on in order for sound can be playing |
110
115
| requiresTurnedOn | boolean | No |```false```| Require vehicle to be turned on in order for sound can be playing [^1]|
111
116
@@ -115,6 +120,7 @@ Same as a normal vehicle sample entry, but with additional attributes.
115
120
<vehicle>
116
121
<fillUnitExtension>
117
122
<fillUnitfillUnitIndex="3">
123
+
<!-- Sound starts playing when fill level percentage is above 95% -->
schema:register(XMLValueType.FLOAT, basePath..'.fillLevelSound#threshold', 'Defines at which fillUnit fill level percentage the sound is triggered', 0.9)
schema:register(XMLValueType.STRING, basePath..'.fillLevelSound#thresholdCondition', 'Sound starts playing based on defined condition and threshold value. Possible values: "<", "=", ">"', '>')
40
+
schema:register(XMLValueType.BOOL, basePath..'.fillLevelSound#requiresTurnedOn', 'Require vehicle to be powered on in order for sound can be playing', false)
41
+
schema:register(XMLValueType.BOOL, basePath..'.fillLevelSound#requiresPoweredOn', 'Require vehicle to be turned on in order for sound can be playing (if vehicle has TurnOn specialization)', true)
schema:register(XMLValueType.FLOAT, basePath..'.fillLevelObjectChanges#threshold', 'Defines at which fillUnit fill level percentage the object changes', 0.9)
schema:register(XMLValueType.STRING, basePath..'.fillLevelObjectChanges#thresholdCondition', 'Object changes are activated based on defined condition and threshold value. Possible values: "<", "=", ">"', '>')
47
+
schema:register(XMLValueType.BOOL, basePath..'.fillLevelObjectChanges#requiresTurnedOn', 'Require vehicle to be powered on in order for object changes can be active', false)
48
+
schema:register(XMLValueType.BOOL, basePath..'.fillLevelObjectChanges#requiresPoweredOn', 'Require vehicle to be turned on in order for object changes can be active (if vehicle has TurnOn specialization)', true)
47
49
48
50
schema:setXMLSpecializationType()
49
51
end
@@ -77,8 +79,15 @@ function FillUnitExtension:onLoad()
@@ -123,7 +139,7 @@ function FillUnitExtension:onUpdateTick(dt)
123
139
end
124
140
125
141
ifentry.fillLevelObjectChanges~=nilthen
126
-
localisActive=(entry.fillLevelObjectChangeThresholdIsGreaterandfillLevelPct>entry.fillLevelObjectChangeThreshold) or (notentry.fillLevelObjectChangeThresholdIsGreaterandfillLevelPct<entry.fillLevelObjectChangeThreshold)
@@ -135,7 +151,7 @@ function FillUnitExtension:onUpdateTick(dt)
135
151
end
136
152
137
153
ifself.isClientandentry.sample~=nilthen
138
-
localplaySample=(entry.soundThresholdIsGreaterandfillLevelPct>entry.soundThreshold) or (notentry.soundThresholdIsGreaterandfillLevelPct<entry.soundThreshold)
0 commit comments