mirror of
https://github.com/l0k1/oprf_assets.git
synced 2026-10-02 10:35:48 +00:00
Made the repo more up-to-date.
This commit is contained in:
+133
-36
@@ -60,6 +60,7 @@
|
||||
<sim>
|
||||
<author>pinto</author>
|
||||
<description>BUK-M2</description>
|
||||
<long-description>BUK-M2 is a modern Russian self-propelled surface to air missile system.</long-description>
|
||||
<status>alpha</status>
|
||||
<aircraft-version>0.1</aircraft-version>
|
||||
|
||||
@@ -87,6 +88,19 @@
|
||||
<splash-texture>Aircraft/BUK-M2/splash1.png</splash-texture>
|
||||
</startup>
|
||||
|
||||
<previews>
|
||||
<preview>
|
||||
<type>exterior</type>
|
||||
<splash type="bool">true</splash>
|
||||
<path>gui/1.png</path>
|
||||
</preview>
|
||||
<preview>
|
||||
<type>exterior</type>
|
||||
<splash type="bool">true</splash>
|
||||
<path>gui/2.png</path>
|
||||
</preview>
|
||||
</previews>
|
||||
|
||||
<current-view>
|
||||
<deck-park type="bool">true</deck-park>
|
||||
|
||||
@@ -106,6 +120,10 @@
|
||||
</font>
|
||||
</hud>
|
||||
|
||||
<tower>
|
||||
<auto-position type="bool">true</auto-position>
|
||||
</tower>
|
||||
|
||||
<systems>
|
||||
<autopilot>
|
||||
<path>Systems/fbw.xml</path>
|
||||
@@ -119,8 +137,10 @@
|
||||
</property-rule>
|
||||
</systems>
|
||||
<multiplay>
|
||||
<visibility-range-nm type="int">250</visibility-range-nm>
|
||||
<generic>
|
||||
<int n="0" type="int">0</int>
|
||||
<int n="2" type="int">0</int>
|
||||
</generic>
|
||||
</multiplay>
|
||||
|
||||
@@ -138,9 +158,41 @@
|
||||
</script>
|
||||
</binding>
|
||||
</item>
|
||||
<item>
|
||||
<label>Targets</label>
|
||||
<name>enemies</name>
|
||||
<binding>
|
||||
<command>dialog-show</command>
|
||||
<dialog-name>enemies</dialog-name>
|
||||
</binding>
|
||||
</item>
|
||||
<item>
|
||||
<label>Priority</label>
|
||||
<name>enemies</name>
|
||||
<binding>
|
||||
<command>dialog-show</command>
|
||||
<dialog-name>priority</dialog-name>
|
||||
</binding>
|
||||
</item>
|
||||
</menu>
|
||||
</default>
|
||||
</menubar>
|
||||
|
||||
<aircraft-data>
|
||||
<!-- Properties that get saved to persist locally between FG sessions -->
|
||||
<path>enemies/e1</path>
|
||||
<path>enemies/e2</path>
|
||||
<path>enemies/e3</path>
|
||||
<path>enemies/e4</path>
|
||||
<path>enemies/e5</path>
|
||||
<path>enemies/e6</path>
|
||||
<path>enemies/e7</path>
|
||||
<path>enemies/e8</path>
|
||||
<path>enemies/e9</path>
|
||||
<path>enemies/e10</path>
|
||||
<path>enemies/e11</path>
|
||||
<path>enemies/e12</path>
|
||||
</aircraft-data>
|
||||
</sim>
|
||||
|
||||
<controls>
|
||||
@@ -149,33 +201,33 @@
|
||||
<trigger type="bool">false</trigger>
|
||||
<station n="1">
|
||||
<offsets>
|
||||
<x-m type="double"> 4.15986</x-m>
|
||||
<y-m type="double"> -2.70311</y-m>
|
||||
<z-m type="double"> 3.67645</z-m>
|
||||
<x-m type="double"> 2.00744</x-m>
|
||||
<y-m type="double"> -1.27342</y-m>
|
||||
<z-m type="double"> 4.26168</z-m>
|
||||
</offsets>
|
||||
<trigger type="bool">false</trigger>
|
||||
</station>
|
||||
<station n="2">
|
||||
<offsets>
|
||||
<x-m type="double"> -0.02697</x-m>
|
||||
<y-m type="double"> -0.98148</y-m>
|
||||
<z-m type="double"> 3.94307</z-m>
|
||||
<x-m type="double"> 2.00744</x-m>
|
||||
<y-m type="double"> -0.42511</y-m>
|
||||
<z-m type="double"> 4.26168</z-m>
|
||||
</offsets>
|
||||
<trigger type="bool">false</trigger>
|
||||
</station>
|
||||
<station n="3">
|
||||
<offsets>
|
||||
<x-m type="double"> 4.15986</x-m>
|
||||
<y-m type="double"> 2.70311</y-m>
|
||||
<z-m type="double"> 3.67645</z-m>
|
||||
<x-m type="double"> 2.00744</x-m>
|
||||
<y-m type="double"> 0.42511</y-m>
|
||||
<z-m type="double"> 4.26168</z-m>
|
||||
</offsets>
|
||||
<trigger type="bool">false</trigger>
|
||||
</station>
|
||||
<station n="4">
|
||||
<offsets>
|
||||
<x-m type="double"> -0.02697</x-m>
|
||||
<y-m type="double"> 0.98148</y-m>
|
||||
<z-m type="double"> 3.94307</z-m>
|
||||
<x-m type="double"> 2.00744</x-m>
|
||||
<y-m type="double"> 1.27342</y-m>
|
||||
<z-m type="double"> 4.26168</z-m>
|
||||
</offsets>
|
||||
<trigger type="bool">false</trigger>
|
||||
</station>
|
||||
@@ -195,44 +247,54 @@
|
||||
|
||||
<armament>
|
||||
<models type="string">Aircraft/BUK-M2/Models/Armament/Weapons/</models>
|
||||
<modelsUseCase type="bool">true</modelsUseCase>
|
||||
<modelsUpperCase type="bool">true</modelsUpperCase>
|
||||
<MP-lat type="string">rotors/main/blade[0]/flap-deg</MP-lat>
|
||||
<MP-lon type="string">rotors/main/blade[1]/flap-deg</MP-lon>
|
||||
<MP-alt type="string">rotors/main/blade[2]/flap-deg</MP-alt>
|
||||
<hit-interpolation type="bool">true</hit-interpolation>
|
||||
<pylon-offset type="int">1</pylon-offset>
|
||||
<pylon-stations>controls/armament</pylon-stations>
|
||||
<station-name type="string">station</station-name>
|
||||
<msg type="bool">true</msg>
|
||||
<damage type="bool">true</damage>
|
||||
<!-- speed: M4 diameter: 0.4m lenght: 5.5-->
|
||||
<!-- speed: Mach 4 length: 5.5m -->
|
||||
<m317>
|
||||
<sound-on-off type="bool">false</sound-on-off>
|
||||
<sound-volume type="double">0.0</sound-volume>
|
||||
<vol-search type="double">0.00</vol-search>
|
||||
<vol-track type="double">0.15</vol-track>
|
||||
<vol-track-weak type="double">0.1</vol-track-weak>
|
||||
<guidance type="string">radar</guidance>
|
||||
<navigation type="string">APN</navigation> <!-- new -->
|
||||
<navigation type="string">APN0506</navigation> <!-- horizontal APN, vertical aim 5 degrees above for 6 seconds -->
|
||||
<all-aspect type="bool">true</all-aspect>
|
||||
<max-fire-range-nm type="int">31</max-fire-range-nm>
|
||||
<max-fire-range-nm type="int">31</max-fire-range-nm> <!-- -->
|
||||
<FCS-field-deg type="int">360</FCS-field-deg>
|
||||
<seeker-field-deg type="int">360</seeker-field-deg>
|
||||
<max-g type="int">24</max-g>
|
||||
<thrust-lbf-stage-1 type="double">18000</thrust-lbf-stage-1> <!-- changed -->
|
||||
<thrust-lbf-stage-2 type="double">6000</thrust-lbf-stage-2> <!-- changed -->
|
||||
<stage-1-duration-sec type="double">8</stage-1-duration-sec> <!-- changed -->
|
||||
<stage-2-duration-sec type="double">18</stage-2-duration-sec><!-- changed -->
|
||||
<weight-launch-lbs>1576</weight-launch-lbs>
|
||||
<weight-warhead-lbs>145</weight-warhead-lbs>
|
||||
<weight-fuel-lbs>900</weight-fuel-lbs> <!-- new -->
|
||||
<drag-coeff type="double">0.15</drag-coeff> <!-- changed -->
|
||||
<drag-area type="double">1.312336</drag-area> <!-- changed -->
|
||||
<seeker-field-deg type="int">170</seeker-field-deg>
|
||||
<max-g type="int">24</max-g> <!-- wikipedia -->
|
||||
<thrust-lbf-stage-1 type="double">16500</thrust-lbf-stage-1> <!-- changed -->
|
||||
<thrust-lbf-stage-2 type="double">0</thrust-lbf-stage-2> <!-- authentic -->
|
||||
<stage-1-duration-sec type="double">15</stage-1-duration-sec> <!-- http://www.whathappenedtoflightmh17.com/a-detailed-description-of-the-buk-sa-11-which-could-have-shot-down-mh17/#prettyPhoto -->
|
||||
<stage-2-duration-sec type="double">0</stage-2-duration-sec><!-- -->
|
||||
<weight-launch-lbs>1576</weight-launch-lbs> <!-- authentic -->
|
||||
<weight-warhead-lbs>145</weight-warhead-lbs> <!-- authentic -->
|
||||
<weight-fuel-lbm>900</weight-fuel-lbm> <!-- -->
|
||||
<drag-coeff type="double">0.25</drag-coeff> <!-- -->
|
||||
<cross-section-sqft type="double">1.312336</cross-section-sqft> <!-- authentic (0.4m diameter) -->
|
||||
<arming-time-sec type="double">2</arming-time-sec>
|
||||
<min-speed-for-guiding-mach type="double">0.35</min-speed-for-guiding-mach>
|
||||
<self-destruct-time-sec type="double">120</self-destruct-time-sec>
|
||||
<min-speed-for-guiding-mach type="double">0.5</min-speed-for-guiding-mach>
|
||||
<self-destruct-time-sec type="double">60</self-destruct-time-sec>
|
||||
<seeker-angular-speed-dps type="double">3000</seeker-angular-speed-dps>
|
||||
<loft-altitude type="int">0</loft-altitude>
|
||||
<min-fire-range-nm type="double">2.0</min-fire-range-nm>
|
||||
<max-report-distance type="double">200</max-report-distance> <!-- new -->
|
||||
<rail type="bool">true</rail> <!-- changed -->
|
||||
<rail-length-m type="double">5.5</rail-length-m> <!-- changed -->
|
||||
<min-fire-range-nm type="double">1.6</min-fire-range-nm> <!-- authentic -->
|
||||
<max-report-distance type="double">200</max-report-distance> <!-- -->
|
||||
<rail type="bool">true</rail> <!-- -->
|
||||
<rail-length-m type="double">5.5</rail-length-m> <!-- authentic length-->
|
||||
<rail-point-forward type="bool">false</rail-point-forward>
|
||||
<rail-pitch-deg type="double">30</rail-pitch-deg> <!-- new -->
|
||||
<rail-pitch-deg type="double">24</rail-pitch-deg> <!-- matching mount -->
|
||||
<chaff-resistance type="double">0.95</chaff-resistance>
|
||||
<proportionality-constant type="double">3</proportionality-constant>
|
||||
<ready-time type="int">1</ready-time>
|
||||
<class type="string">A</class>
|
||||
<fire-msg>Bird away</fire-msg>
|
||||
<telemetry type="bool">true</telemetry>
|
||||
</m317>
|
||||
</armament>
|
||||
</payload>
|
||||
@@ -250,6 +312,38 @@
|
||||
</blade>
|
||||
</main>
|
||||
</rotors>
|
||||
|
||||
<sam>
|
||||
<impact0 type="double">-1</impact0>
|
||||
<impact1 type="double">-1</impact1>
|
||||
<impact2 type="double">-1</impact2>
|
||||
<impact3 type="double">-1</impact3>
|
||||
<hit0 type="double">-1</hit0>
|
||||
<hit1 type="double">-1</hit1>
|
||||
<hit2 type="double">-1</hit2>
|
||||
<hit3 type="double">-1</hit3>
|
||||
<missiles type="double">4</missiles>
|
||||
<timeleft type="double">600</timeleft>
|
||||
<damage type="double">100</damage>
|
||||
</sam>
|
||||
|
||||
<enemies>
|
||||
<e1 userarchive="y" type="string">Leto</e1>
|
||||
<e2 userarchive="y" type="string">swamp</e2>
|
||||
<e3 userarchive="y" type="string">pinto</e3>
|
||||
<e4 userarchive="y" type="string">fb237</e4>
|
||||
<e5 userarchive="y" type="string">Wilco-1</e5>
|
||||
<e6 userarchive="y" type="string">Kokos</e6>
|
||||
<e7 userarchive="y" type="string">J-Mav16</e7>
|
||||
<e8 userarchive="y" type="string">S</e8>
|
||||
<e9 userarchive="y" type="string">Raider1</e9>
|
||||
<e10 userarchive="y" type="string">Slobb</e10>
|
||||
<e11 userarchive="y" type="string">5H1N0B1</e11>
|
||||
<e12 userarchive="y" type="string">SNOWY1</e12>
|
||||
</enemies>
|
||||
|
||||
<priority type="int">0</priority>
|
||||
<priority0 type="int">1</priority0>
|
||||
|
||||
<nasal>
|
||||
<carrier>
|
||||
@@ -261,6 +355,9 @@
|
||||
<radar_logic>
|
||||
<file>Aircraft/BUK-M2/Nasal/radar-logic.nas</file>
|
||||
</radar_logic>
|
||||
<vector>
|
||||
<file>Aircraft/BUK-M2/Nasal/vector.nas</file><!-- needed by the guided-missiles -->
|
||||
</vector>
|
||||
<armament>
|
||||
<file>Aircraft/BUK-M2/Nasal/guided-missiles.nas</file>
|
||||
</armament>
|
||||
|
||||
+216
-8
@@ -84,7 +84,7 @@
|
||||
<enable-hat>false</enable-hat>
|
||||
</ladder>
|
||||
|
||||
<label>
|
||||
<!--<label>
|
||||
<name>Wind Angle Runway</name>
|
||||
<x>-300</x>
|
||||
<y>190</y>
|
||||
@@ -98,7 +98,7 @@
|
||||
<input>
|
||||
<property>/orientation/relative-wind-deg</property>
|
||||
</input>
|
||||
</label>
|
||||
</label>-->
|
||||
|
||||
<label>
|
||||
<name>Height</name>
|
||||
@@ -264,7 +264,7 @@
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<!--<label>
|
||||
<name>Magnetic Heading</name>
|
||||
<x>-300</x>
|
||||
<y>-225</y>
|
||||
@@ -310,15 +310,15 @@
|
||||
<input>
|
||||
<property>/velocities/wind-speed-runway-kt</property>
|
||||
</input>
|
||||
</label>
|
||||
</label>-->
|
||||
|
||||
<label>
|
||||
<!--<label>
|
||||
<name>Speed</name>
|
||||
<x>100</x>
|
||||
<y>-225</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix> Speed: </prefix>
|
||||
<prefix> My speed: </prefix>
|
||||
<postfix> kts</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%2.1f</format>
|
||||
@@ -326,9 +326,9 @@
|
||||
<input>
|
||||
<property>/velocities/groundspeed-kt</property>
|
||||
</input>
|
||||
</label>
|
||||
</label>-->
|
||||
|
||||
<label>
|
||||
<!--<label>
|
||||
<name>Target Speed</name>
|
||||
<x>100</x>
|
||||
<y>-200</y>
|
||||
@@ -342,6 +342,214 @@
|
||||
<input>
|
||||
<property>/carrier/fbw/target/groundspeed-kt</property>
|
||||
</input>
|
||||
</label>-->
|
||||
|
||||
<label>
|
||||
<name>Time to impact</name>
|
||||
<x>150</x>
|
||||
<y>50</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix>1st Time to impact: </prefix>
|
||||
<postfix> sec</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%2.1f</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>sam/impact0</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Time to impact</name>
|
||||
<x>150</x>
|
||||
<y>0</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix>2nd Time to impact: </prefix>
|
||||
<postfix> sec</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%2.1f</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>sam/impact1</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Time to impact</name>
|
||||
<x>150</x>
|
||||
<y>-50</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix>3rd Time to impact: </prefix>
|
||||
<postfix> sec</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%2.1f</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>sam/impact2</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Time to impact</name>
|
||||
<x>150</x>
|
||||
<y>-100</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix>4th Time to impact: </prefix>
|
||||
<postfix> sec</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%2.1f</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>sam/impact3</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Hit chance</name>
|
||||
<x>150</x>
|
||||
<y>25</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix>1st Hit chance: </prefix>
|
||||
<postfix> %%</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%d</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>sam/hit0</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Hit chance</name>
|
||||
<x>150</x>
|
||||
<y>-25</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix>2nd Hit chance: </prefix>
|
||||
<postfix> %%</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%d</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>sam/hit1</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Hit chance</name>
|
||||
<x>150</x>
|
||||
<y>-75</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix>3rd Hit chance: </prefix>
|
||||
<postfix> %%</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%d</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>sam/hit2</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Hit chance</name>
|
||||
<x>150</x>
|
||||
<y>-125</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix>4th Hit chance: </prefix>
|
||||
<postfix> %%</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%d</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>sam/hit3</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>ETA</name>
|
||||
<x>150</x>
|
||||
<y>-175</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix>Time before operational: </prefix>
|
||||
<postfix> sec</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%d</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>sam/timeleft</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>stores</name>
|
||||
<x>-300</x>
|
||||
<y>-175</y>
|
||||
<width>125</width>
|
||||
<height>25</height>
|
||||
<prefix> Missiles ready: </prefix>
|
||||
<postfix></postfix>
|
||||
<halign>left</halign>
|
||||
<format>%d</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>/sam/missiles</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>damage</name>
|
||||
<x>-150</x>
|
||||
<y>-175</y>
|
||||
<width>125</width>
|
||||
<height>25</height>
|
||||
<prefix> Integrity: </prefix>
|
||||
<postfix> %%</postfix>
|
||||
<halign>left</halign>
|
||||
<format>%3.1f</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>/sam/damage</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>Target info</name>
|
||||
<x>-300</x>
|
||||
<y>-225</y>
|
||||
<width>375</width>
|
||||
<height>25</height>
|
||||
<prefix> Next target: </prefix>
|
||||
<postfix></postfix>
|
||||
<halign>left</halign>
|
||||
<format>%s</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>/sam/info</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<name>tower</name>
|
||||
<x>100</x>
|
||||
<y>-225</y>
|
||||
<width>200</width>
|
||||
<height>25</height>
|
||||
<prefix> Placement near: </prefix>
|
||||
<postfix></postfix>
|
||||
<halign>left</halign>
|
||||
<format>%s</format>
|
||||
<box>true</box>
|
||||
<input>
|
||||
<property>/sim/tower/airport-id</property>
|
||||
</input>
|
||||
</label>
|
||||
|
||||
</PropertyList>
|
||||
|
||||
@@ -4,6 +4,50 @@
|
||||
|
||||
<path>BUK-M2.ac</path>
|
||||
|
||||
<animation>
|
||||
<type>select</type>
|
||||
<object-name>missile1</object-name>
|
||||
<condition>
|
||||
<less-than>
|
||||
<property>active</property>
|
||||
<value>1</value>
|
||||
</less-than>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>select</type>
|
||||
<object-name>missile2</object-name>
|
||||
<condition>
|
||||
<less-than>
|
||||
<property>active</property>
|
||||
<value>2</value>
|
||||
</less-than>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>select</type>
|
||||
<object-name>missile3</object-name>
|
||||
<condition>
|
||||
<less-than>
|
||||
<property>active</property>
|
||||
<value>3</value>
|
||||
</less-than>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>select</type>
|
||||
<object-name>missile4</object-name>
|
||||
<condition>
|
||||
<less-than>
|
||||
<property>active</property>
|
||||
<value>4</value>
|
||||
</less-than>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
<model>
|
||||
<path>Aircraft/BUK-M2/Models/smoke.xml</path>
|
||||
<offsets>
|
||||
|
||||
+19
-5
@@ -28,10 +28,13 @@ var warhead_lbs = {
|
||||
"AGM-84": 488.00,
|
||||
"AGM-88": 146.00,
|
||||
"AGM65": 200.00,
|
||||
"AGM-154A": 493.00,
|
||||
"AGM-158": 1000.00,
|
||||
"ALARM": 450.00,
|
||||
"AM39-Exocet": 364.00,
|
||||
"AS-37-Martel": 330.00,
|
||||
"AS30L": 529.00,
|
||||
"CBU-87": 128.00,
|
||||
"Exocet": 364.00,
|
||||
"FAB-100": 92.59,
|
||||
"FAB-250": 202.85,
|
||||
@@ -81,6 +84,7 @@ var incoming_listener = func {
|
||||
var last_vector = split(":", last);
|
||||
var author = last_vector[0];
|
||||
var callsign = getprop("sim/multiplay/callsign");
|
||||
callsign = size(callsign) < 8 ? callsign : left(callsign,7);
|
||||
if (size(last_vector) > 1 and author != callsign) {
|
||||
# not myself
|
||||
#print("not me");
|
||||
@@ -175,11 +179,11 @@ var incoming_listener = func {
|
||||
return;
|
||||
}
|
||||
|
||||
var prob = 1;
|
||||
if (type == "M90" and distance < 300) {
|
||||
var failed = fail_systems(warhead_lbs[type]/2);
|
||||
return;
|
||||
} elsif (distance < 150) {
|
||||
var prob = 1;
|
||||
if ( distance > 50 ) {
|
||||
distance = distance - 50;
|
||||
prob = 1 - (distance/100);
|
||||
@@ -197,6 +201,14 @@ var incoming_listener = func {
|
||||
print("cannon");
|
||||
if (size(last_vector) > 2 and last_vector[2] == " "~callsign) {
|
||||
print("cannon hit us");
|
||||
|
||||
#"Leto: Gun Splash On : SA-11"
|
||||
#"Leto: KCA cannon shell hit: SA-11: 4 hits:..."
|
||||
if (size(last_vector) < 4) {
|
||||
# msg is either missing number of hits, or has no trailing dots from spam filter.
|
||||
print('"'~last~'" is not a legal hit message, tell the shooter to upgrade his OPRF plane :)');
|
||||
return;
|
||||
}
|
||||
var last3 = split(" ", last_vector[3]);
|
||||
#print("last3[2]: " ~ last3[2]);
|
||||
#print("last3[1]: " ~ last3[1]);
|
||||
@@ -211,12 +223,12 @@ var incoming_listener = func {
|
||||
var probability = cannon_types[last_vector[1]];
|
||||
for (var i = 1; i <= hit_count; i = i + 1) {
|
||||
var failed = fail_systems(probability);
|
||||
damaged_sys = damaged_sys + failed;
|
||||
# damaged_sys = damaged_sys + failed;
|
||||
}
|
||||
# that someone is me!
|
||||
#print("hitting me");
|
||||
|
||||
printf("Took %.1f%% damage from cannon! %s systems was hit.", probability*hit_count*100, damaged_sys);
|
||||
#printf("Took %.1f%% damage from cannon! %s systems was hit.", probability*hit_count*100, damaged_sys);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -234,10 +246,12 @@ var maxDamageDistFromWarhead = func (lbs) {
|
||||
var fail_systems = func (damage) {
|
||||
hp = hp - damage;
|
||||
print("HP: " ~ hp ~ "/" ~ hp_max);
|
||||
|
||||
setprop("sam/damage", math.max(0,100*hp/hp_max));
|
||||
if ( hp < 0 ) {
|
||||
setprop("/carrier/sunk/",1);
|
||||
setprop("/sim/multiplay/generic/int[2]",1);
|
||||
setprop("/sim/multiplay/generic/int[0]",1);
|
||||
setprop("/sim/messages/copilot", "SAM dead.");
|
||||
}
|
||||
};
|
||||
|
||||
@@ -281,4 +295,4 @@ var logTime = func{
|
||||
}
|
||||
}
|
||||
|
||||
setlistener("/sim/multiplay/chat-history", incoming_listener, 0, 0);
|
||||
setlistener("/sim/multiplay/chat-history", incoming_listener, 0, 0);
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.4 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.1 MiB |
Reference in New Issue
Block a user