From a2fef84ad0f3bfe62540b48d449c37c95bd578f5 Mon Sep 17 00:00:00 2001 From: Justin Nicholson Date: Tue, 1 Oct 2019 23:53:05 -0700 Subject: [PATCH 1/2] Add indestructible shipping container --- depot/Dialogs/type.xml | 116 +++++++++++ depot/Models/40ft_container.ac | 307 ++++++++++++++++++++++++++++++ depot/Models/container.png | Bin 0 -> 226 bytes depot/Models/container_green.png | Bin 0 -> 272 bytes depot/Models/container_red.png | Bin 0 -> 268 bytes depot/Models/container_yellow.png | Bin 0 -> 272 bytes depot/Models/depot.xml | 15 ++ depot/Nasal/damage.nas | 2 +- depot/Nasal/fdm.nas | 1 + depot/gui/dialogs/type.xml | 8 + 10 files changed, 448 insertions(+), 1 deletion(-) create mode 100644 depot/Dialogs/type.xml create mode 100644 depot/Models/40ft_container.ac create mode 100644 depot/Models/container.png create mode 100644 depot/Models/container_green.png create mode 100644 depot/Models/container_red.png create mode 100644 depot/Models/container_yellow.png diff --git a/depot/Dialogs/type.xml b/depot/Dialogs/type.xml new file mode 100644 index 0000000..7659853 --- /dev/null +++ b/depot/Dialogs/type.xml @@ -0,0 +1,116 @@ + + + + + + + type + vbox + 250 + false + + + hbox + + true + + + + true + + + + + + + + vbox + 6 + + true + + + + + + + + + + + + + diff --git a/depot/Models/40ft_container.ac b/depot/Models/40ft_container.ac new file mode 100644 index 0000000..b3feb28 --- /dev/null +++ b/depot/Models/40ft_container.ac @@ -0,0 +1,307 @@ +AC3Db +MATERIAL "metal_red" rgb 0.705 0.705 0.705 amb 1.000 1.000 1.000 emis 0.000 0.000 0.000 spec 0.598 0.598 0.598 shi 26 trans 0.000 +MATERIAL "metal_green" rgb 0.705 0.705 0.705 amb 1.000 1.000 1.000 emis 0.000 0.000 0.000 spec 0.598 0.598 0.598 shi 26 trans 0.000 +MATERIAL "metal_yellow" rgb 0.705 0.705 0.705 amb 1.000 1.000 1.000 emis 0.000 0.000 0.000 spec 0.598 0.598 0.598 shi 26 trans 0.000 +OBJECT world +name "Blender_exporter_v2.26__40ft_container.ac" +kids 5 +OBJECT poly +name "Cube" +data 4 +Cube +crease 40.0 +texture "container_red.png" +texrep 1 1 +numvert 8 +-2.55457 0 -0.10408 +-2.55457 2.59 -0.10408 +-2.55457 0 -12.30408 +-2.55457 2.59 -12.30408 +-0.12457 0 -0.10408 +-0.12457 2.59 -0.10408 +-0.12457 0 -12.30408 +-0.12457 2.59 -12.30408 +numsurf 6 +SURF 0X0 +mat 0 +refs 4 +0 -2.710623 -0.142225 +1 -2.710623 1.220974 +3 3.710623 1.220974 +2 3.710623 -0.142225 +SURF 0X0 +mat 0 +refs 4 +2 -0.389669 -0.366603 +3 -0.389669 1.529894 +7 1.389669 1.529894 +6 1.389669 -0.366603 +SURF 0X0 +mat 0 +refs 4 +6 3.710623 -0.142225 +7 3.710623 1.220974 +5 -2.710623 1.220974 +4 -2.710623 -0.142225 +SURF 0X0 +mat 0 +refs 4 +4 1.389669 -0.366602 +5 1.389669 1.529895 +1 -0.389669 1.529895 +0 -0.389669 -0.366602 +SURF 0X0 +mat 0 +refs 4 +2 0.454166 0.625461 +6 0.504145 0.625461 +4 0.504145 0.374539 +0 0.454166 0.374539 +SURF 0X0 +mat 0 +refs 4 +7 0.504145 0.625461 +3 0.454166 0.625461 +1 0.454166 0.374539 +5 0.504145 0.374539 +kids 0 +OBJECT poly +name "Cube.001" +data 8 +Cube.002 +crease 40.0 +texture "container_green.png" +texrep 1 1 +numvert 8 +0.12723 0 -0.10408 +0.12723 2.59 -0.10408 +0.12723 0 -12.30408 +0.12723 2.59 -12.30408 +2.55723 0 -0.10408 +2.55723 2.59 -0.10408 +2.55723 0 -12.30408 +2.55723 2.59 -12.30408 +numsurf 6 +SURF 0X0 +mat 1 +refs 4 +0 -2.710623 -0.142225 +1 -2.710623 1.220974 +3 3.710623 1.220974 +2 3.710623 -0.142225 +SURF 0X0 +mat 1 +refs 4 +2 -0.389669 -0.366603 +3 -0.389669 1.529894 +7 1.389669 1.529894 +6 1.389669 -0.366603 +SURF 0X0 +mat 1 +refs 4 +6 3.710623 -0.142225 +7 3.710623 1.220974 +5 -2.710623 1.220974 +4 -2.710623 -0.142225 +SURF 0X0 +mat 1 +refs 4 +4 1.389669 -0.366602 +5 1.389669 1.529895 +1 -0.389669 1.529895 +0 -0.389669 -0.366602 +SURF 0X0 +mat 1 +refs 4 +2 0.454166 0.625461 +6 0.504145 0.625461 +4 0.504145 0.374539 +0 0.454166 0.374539 +SURF 0X0 +mat 1 +refs 4 +7 0.504145 0.625461 +3 0.454166 0.625461 +1 0.454166 0.374539 +5 0.504145 0.374539 +kids 0 +OBJECT poly +name "Cube.002" +data 8 +Cube.003 +crease 40.0 +texture "container_yellow.png" +texrep 1 1 +numvert 8 +0.12723 0 12.28235 +0.12723 2.59 12.28235 +0.12723 0 0.08235 +0.12723 2.59 0.08235 +2.55723 0 12.28235 +2.55723 2.59 12.28235 +2.55723 0 0.08235 +2.55723 2.59 0.08235 +numsurf 6 +SURF 0X0 +mat 2 +refs 4 +0 -2.710623 -0.142225 +1 -2.710623 1.220974 +3 3.710623 1.220974 +2 3.710623 -0.142225 +SURF 0X0 +mat 2 +refs 4 +2 -0.389669 -0.366603 +3 -0.389669 1.529894 +7 1.389669 1.529894 +6 1.389669 -0.366603 +SURF 0X0 +mat 2 +refs 4 +6 3.710623 -0.142225 +7 3.710623 1.220974 +5 -2.710623 1.220974 +4 -2.710623 -0.142225 +SURF 0X0 +mat 2 +refs 4 +4 1.389669 -0.366602 +5 1.389669 1.529895 +1 -0.389669 1.529895 +0 -0.389669 -0.366602 +SURF 0X0 +mat 2 +refs 4 +2 0.454166 0.625461 +6 0.504145 0.625461 +4 0.504145 0.374539 +0 0.454166 0.374539 +SURF 0X0 +mat 2 +refs 4 +7 0.504145 0.625461 +3 0.454166 0.625461 +1 0.454166 0.374539 +5 0.504145 0.374539 +kids 0 +OBJECT poly +name "Cube.003" +data 8 +Cube.004 +crease 40.0 +texture "container_green.png" +texrep 1 1 +numvert 8 +-2.55457 0 12.28235 +-2.55457 2.59 12.28235 +-2.55457 0 0.08235 +-2.55457 2.59 0.08235 +-0.12457 0 12.28235 +-0.12457 2.59 12.28235 +-0.12457 0 0.08235 +-0.12457 2.59 0.08235 +numsurf 6 +SURF 0X0 +mat 1 +refs 4 +0 -2.710623 -0.142225 +1 -2.710623 1.220974 +3 3.710623 1.220974 +2 3.710623 -0.142225 +SURF 0X0 +mat 1 +refs 4 +2 -0.389669 -0.366603 +3 -0.389669 1.529894 +7 1.389669 1.529894 +6 1.389669 -0.366603 +SURF 0X0 +mat 1 +refs 4 +6 3.710623 -0.142225 +7 3.710623 1.220974 +5 -2.710623 1.220974 +4 -2.710623 -0.142225 +SURF 0X0 +mat 1 +refs 4 +4 1.389669 -0.366602 +5 1.389669 1.529895 +1 -0.389669 1.529895 +0 -0.389669 -0.366602 +SURF 0X0 +mat 1 +refs 4 +2 0.454166 0.625461 +6 0.504145 0.625461 +4 0.504145 0.374539 +0 0.454166 0.374539 +SURF 0X0 +mat 1 +refs 4 +7 0.504145 0.625461 +3 0.454166 0.625461 +1 0.454166 0.374539 +5 0.504145 0.374539 +kids 0 +OBJECT poly +name "Cube.004" +data 8 +Cube.005 +crease 40.0 +texture "container_red.png" +texrep 1 1 +numvert 8 +-0.44535 2.59 6.17163 +-0.44535 5.18 6.17163 +-2.06253 2.59 -5.92071 +-2.06253 5.18 -5.92071 +1.9632 2.59 5.84952 +1.9632 5.18 5.84952 +0.34603 2.59 -6.24282 +0.34603 5.18 -6.24282 +numsurf 6 +SURF 0X0 +mat 0 +refs 4 +0 -2.710623 -0.142225 +1 -2.710623 1.220974 +3 3.710623 1.220974 +2 3.710623 -0.142225 +SURF 0X0 +mat 0 +refs 4 +2 -0.389669 -0.366603 +3 -0.389669 1.529894 +7 1.389669 1.529894 +6 1.389669 -0.366603 +SURF 0X0 +mat 0 +refs 4 +6 3.710623 -0.142225 +7 3.710623 1.220974 +5 -2.710623 1.220974 +4 -2.710623 -0.142225 +SURF 0X0 +mat 0 +refs 4 +4 1.389669 -0.366602 +5 1.389669 1.529895 +1 -0.389669 1.529895 +0 -0.389669 -0.366602 +SURF 0X0 +mat 0 +refs 4 +2 0.454166 0.625461 +6 0.504145 0.625461 +4 0.504145 0.374539 +0 0.454166 0.374539 +SURF 0X0 +mat 0 +refs 4 +7 0.504145 0.625461 +3 0.454166 0.625461 +1 0.454166 0.374539 +5 0.504145 0.374539 +kids 0 diff --git a/depot/Models/container.png b/depot/Models/container.png new file mode 100644 index 0000000000000000000000000000000000000000..b44dacdd955a740816433b26cdb17ee611795b6f GIT binary patch literal 226 zcmeAS@N?(olHy`uVBq!ia0vp^E+EXo1SGc?vOEP+oCO|{#S9F3${@^GvDCf{D9B#o z>Fdh=n2U)`!n#{QE)ysuS>hT|;+&tGo0?a`;9QiNSdyBeP@Y+mq2TW68xY>eCk|8; zFdh=n2U)`QR(4%Yhj>}WQl7;iF1B#Zfaf$gL6@8Vo7R>LV0FMhJw4NZ$Nk>pEyua zm#2$kNX4zU7d8qy1Te53bkB2BoAfV+vFhR^z7mz|jc0n8JTe>iemJ!D*v|c*GUCtY zoSta3^<~?$^8I~rjEqby90Cds4Gai|5-Jz0fQhiOC#&zuOmr#IKAmw9=qd(JS3j3^ HP6Fdh=n2U)`(J-~J>MT%5vcxr_#5q4VH#M(>!MP|ku_QG`p**uBL&4qCHz2%`PaLSI z&C|s(q~g}w3x#VS<*>0#@z~;c+`p-@7%{{rMcrV;<{G zqc!*c&i=y1A)w&Uz`)4Fg2Z4%<$@Fl5}_>qEt|+xmmtA^ul@pE#Ng@b=d#Wzp$P!J C?n1Eu literal 0 HcmV?d00001 diff --git a/depot/Models/container_yellow.png b/depot/Models/container_yellow.png new file mode 100644 index 0000000000000000000000000000000000000000..1e7dcc250aa05b05eb0992afdc66edac0c218821 GIT binary patch literal 272 zcmeAS@N?(olHy`uVBq!ia0vp^E+EXo1|%(nCvO5$oCO|{#S9F3${@^GvDCf{D9B#o z>Fdh=n2U)`iS66N9!8*$WQl7;iF1B#Zfaf$gL6@8Vo7R>LV0FMhJw4NZ$Nk>pEyua zm#2$kNX4zU7Ys!m5*XYr_Oq$+$~@0cn&QH+uxFNpi9zQ9FV=U`_bXOczFKc{>zncE zsuY=9Q`Y^wyMA%FLjwaN6AOoc0uqA*l?zhPL4>lOS>|%dE;9>GA8iG?iow&>&t;uc GLK6T~k4P>6 literal 0 HcmV?d00001 diff --git a/depot/Models/depot.xml b/depot/Models/depot.xml index 259e295..e22d584 100644 --- a/depot/Models/depot.xml +++ b/depot/Models/depot.xml @@ -106,6 +106,21 @@ + + 40ft_container.ac + container + + + select + container + + + sim/multiplay/generic/int[17] + 7 + + + + Aircraft/depot/Models/smoke.xml diff --git a/depot/Nasal/damage.nas b/depot/Nasal/damage.nas index ebc4fca..27db4cb 100644 --- a/depot/Nasal/damage.nas +++ b/depot/Nasal/damage.nas @@ -347,7 +347,7 @@ var fail_systems = func (probability, factor = 100) {#this factor needs tuning a hp -= factor * probability*(0.75+rand()*0.25);# from 75 to 100% damage printf("HP: %d/%d", hp, hp_max); setprop("sam/damage", math.max(0,100*hp/hp_max));#used in HUD - if ( hp < 0 ) { + if ( hp < 0 and getprop("sim/multiplay/generic/int[17]") != 7) { setprop("/carrier/sunk/",1);#we are dead setprop("/sim/multiplay/generic/int[2]",1);#radar off setprop("/sim/multiplay/generic/int[0]",1);#smoke on diff --git a/depot/Nasal/fdm.nas b/depot/Nasal/fdm.nas index 202cadf..5fb34a9 100644 --- a/depot/Nasal/fdm.nas +++ b/depot/Nasal/fdm.nas @@ -49,6 +49,7 @@ var PositionUpdater = func () { if (type == 4) {damage.hp_max=900;damage.hp=900;} if (type == 5) {damage.hp_max=1500;damage.hp=1500;} if (type == 6) {damage.hp_max=450;damage.hp=450;} + if (type == 7) {damage.hp_max=0;damage.hp=0;} last_type = type; } else { print("Can only switch type when not damaged!!"); diff --git a/depot/gui/dialogs/type.xml b/depot/gui/dialogs/type.xml index 7659853..1fb98a0 100644 --- a/depot/gui/dialogs/type.xml +++ b/depot/gui/dialogs/type.xml @@ -109,6 +109,14 @@ 6 + From ec1362eef611fa77643cbdf1b0b66a131e7ac07e Mon Sep 17 00:00:00 2001 From: Justin Nicholson Date: Thu, 3 Oct 2019 00:09:14 -0700 Subject: [PATCH 2/2] disable depot radar --- depot/depot-set.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/depot/depot-set.xml b/depot/depot-set.xml index e9d7822..a0074c7 100644 --- a/depot/depot-set.xml +++ b/depot/depot-set.xml @@ -110,6 +110,7 @@ 750 0 + 1 0