Interior: Added indicator light for parking radar
This commit is contained in:
parent
66bc60abe8
commit
df00a276f1
|
@ -16,6 +16,7 @@
|
|||
<type>select</type>
|
||||
<object-name>etc</object-name>
|
||||
<object-name>card</object-name>
|
||||
<object-name>baowenbei</object-name>
|
||||
<condition>
|
||||
|
||||
<equals>
|
||||
|
@ -177,17 +178,17 @@
|
|||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>followme.parkingRadar.toggle()</script>
|
||||
<script>followme.toggleParkingRadar()</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
<!--
|
||||
|
||||
<animation>
|
||||
<type>material</type>
|
||||
<object-name>reversing_radar_switch</object-name>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>sim/multiplay/generic/bool[2]</property>
|
||||
<property>sim/multiplay/generic/bool[12]</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
|
@ -195,16 +196,16 @@
|
|||
</animation>
|
||||
<animation>
|
||||
<type>material</type>
|
||||
<object-name>autohold_switch</object-name>
|
||||
<object-name>reversing_radar_switch</object-name>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>sim/multiplay/generic/bool[2]</property>
|
||||
<property>sim/multiplay/generic/bool[12]</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<texture>control.png</texture>
|
||||
</animation>
|
||||
-->
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -177,17 +177,17 @@
|
|||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>followme.parkingRadar.toggle()</script>
|
||||
<script>followme.toggleParkingRadar()</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
<!--
|
||||
|
||||
<animation>
|
||||
<type>material</type>
|
||||
<object-name>reversing_radar_switch</object-name>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>sim/multiplay/generic/bool[2]</property>
|
||||
<property>sim/multiplay/generic/bool[12]</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
|
@ -195,16 +195,17 @@
|
|||
</animation>
|
||||
<animation>
|
||||
<type>material</type>
|
||||
<object-name>autohold_switch</object-name>
|
||||
<object-name>reversing_radar_switch</object-name>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>sim/multiplay/generic/bool[2]</property>
|
||||
<property>sim/multiplay/generic/bool[12]</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<texture>control.png</texture>
|
||||
</animation>
|
||||
-->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -218,17 +218,17 @@
|
|||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>followme.parkingRadar.toggle()</script>
|
||||
<script>followme.toggleParkingRadar()</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
<!--
|
||||
|
||||
<animation>
|
||||
<type>material</type>
|
||||
<object-name>reversing_radar_switch</object-name>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>sim/multiplay/generic/bool[2]</property>
|
||||
<property>sim/multiplay/generic/bool[12]</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
|
@ -236,16 +236,16 @@
|
|||
</animation>
|
||||
<animation>
|
||||
<type>material</type>
|
||||
<object-name>autohold_switch</object-name>
|
||||
<object-name>reversing_radar_switch</object-name>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>sim/multiplay/generic/bool[2]</property>
|
||||
<property>sim/multiplay/generic/bool[12]</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<texture>control.png</texture>
|
||||
</animation>
|
||||
-->
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -514,6 +514,11 @@ var brakesABS = func(){
|
|||
}
|
||||
|
||||
var parkingRadar = Radar.new(0.3, 0, 3.8, 3, 3);
|
||||
var isParkingRadarActive = Variable.new("isParkingRadarActive", 0, "Indicates the status of the parking radar", 0, 1, 0, "/systems/isParkingRadarActive");
|
||||
var toggleParkingRadar = func(){
|
||||
parkingRadar.toggle();
|
||||
isParkingRadarActive.setValue(parkingRadar.isRunning);
|
||||
}
|
||||
|
||||
var Safety = {
|
||||
new: func(airbagAccelerationLimit=140, sideAirbagAccelerationLimit=75){
|
||||
|
|
|
@ -119,7 +119,9 @@
|
|||
<bool n="8" alias="/systems/safety/aeb_on"/>
|
||||
<bool n="9" alias="/controls/lighting/indicator/left_switch"/>
|
||||
<bool n="10" alias="/controls/lighting/indicator/right_switch"/>
|
||||
<bool n="11" alias="/controls/lighting/reverse_indicator"/>
|
||||
<bool n="11" alias="/controls/lighting/reverse_indicator"/>
|
||||
<bool n="12" alias="/systems/isParkingRadarActive"/>
|
||||
|
||||
|
||||
<int n="0" alias="/sim/model/lights/indicator-left/state"/>
|
||||
<int n="1" alias="/sim/model/lights/indicator-right/state"/>
|
||||
|
|
Loading…
Reference in New Issue