config.cpp 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  1. //Get this addons macro
  2. //get the macro for the air subaddon
  3. //get generlized macros
  4. #include "../../../RD501_main/config_macros.hpp"
  5. //General name of the vehicle
  6. #define vehicle_addon X_Wing
  7. #define patch_name MODNAME##vehicle_addon##_Patches
  8. #define vehicle_classname MODNAME##_##vehicle_addon
  9. #define new_x_wing_class(name) vehicle_classname##_##name
  10. class CfgPatches
  11. {
  12. class macro_patch_name(X_Wing)
  13. {
  14. addonRootClass=macro_patch_name(vehicles)
  15. requiredAddons[]=
  16. {
  17. macro_patch_name(vehicles)
  18. };
  19. requiredVersion=0.1;
  20. units[]=
  21. {
  22. macro_new_vehicle(X_wing,T_65_MkII),
  23. macro_new_vehicle(X_wing,T_65_red5_MkII),
  24. macro_new_vehicle(X_wing,T_65_blue_MkII),
  25. macro_new_vehicle(X_wing,T_65_green_MkII),
  26. macro_new_vehicle(X_wing,T_70_Black_MkII),
  27. macro_new_vehicle(X_wing,T_70_MkII)
  28. };
  29. weapons[]=
  30. {
  31. };
  32. };
  33. };
  34. #include "../../common/sensor_templates.hpp"
  35. class CBA_Extended_EventHandlers_base;
  36. class CfgVehicles
  37. {
  38. class Plane_Base_F;
  39. class swop_xw:Plane_Base_F
  40. {
  41. class ACE_SelfActions;
  42. };
  43. class swop_xwt70:Plane_Base_F
  44. {
  45. scope=0;
  46. class EventHandlers
  47. {
  48. fired = "_this call (uinamespace getvariable 'BIS_fnc_effectFired');";
  49. init = "[_this select 0] execVM '\XT\init.sqf';[_this select 0] execVM '\XT\initturbine.sqf';";
  50. killed = "_this call (uinamespace getvariable 'BIS_fnc_effectKilled');";
  51. class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers_base {};
  52. };
  53. class ACE_SelfActions;
  54. };
  55. class swop_xwt70bo:swop_xwt70
  56. {
  57. scope=0;
  58. class ACE_SelfActions:ACE_SelfActions{
  59. };
  60. };
  61. class macro_new_vehicle(X_wing,T_65_MkII) : swop_xw
  62. {
  63. forceInGarage=1;
  64. faction = macro_rebel_faction
  65. editorSubcategory = macro_editor_cat_air(Rebel_vtol)
  66. vehicleClass = macro_editor_vehicle_type_air(Rebel)
  67. scope = 2;
  68. altFullForce = 6000;
  69. airBrakeFrictionCoef = 80.4;
  70. altNoForce = 9000;
  71. armor = 300;
  72. displayname = "X-Wing T-65 Mk.II";
  73. class ACE_SelfActions:ACE_SelfActions
  74. {
  75. #include "../../common/universal_hud_color_changer.hpp"
  76. };
  77. #include "../../common/universal_mfd.hpp"
  78. class UserActions
  79. {
  80. class AfterburnerOn
  81. {
  82. displayName = "<t color='#4C9900'>[Afterburner On]</t>";
  83. shortcut = "";
  84. condition = "speed this >50 and (!(this getVariable 'AfterBurnerxt'))";
  85. statement = "this setVariable ['AfterBurnerxt',true];this spawn nes4day_afterburnerxt";
  86. priority = 1e+011;
  87. displayNameDefault = "";
  88. position = "pilotview";
  89. radius = 15;
  90. onlyforplayer = 1;
  91. };
  92. class AfterburnerOff
  93. {
  94. displayName = "<t color='#FF9933'>[Afterburner Off]</t>";
  95. shortcut = "";
  96. condition = "(this getVariable 'AfterBurnerxt')";
  97. statement = "this setVariable ['AfterBurnerxt',false]";
  98. priority = 1e+011;
  99. displayNameDefault = "";
  100. position = "pilotview";
  101. radius = 15;
  102. onlyforplayer = 1;
  103. };
  104. class door_close
  105. {
  106. condition = "this animationPhase ""wing_1_up_A"" == 1 and this animationPhase ""wing_2_up_A"" == 1 and this animationPhase ""wing_1_down_A"" == 1 and this animationPhase ""wing_2_down_A"" == 1";
  107. displayName = "<t color='#009FD4'>[Close S-foils]</t>";
  108. displayNameDefault = "";
  109. hideonuse = 1;
  110. onlyForPlayer = 1;
  111. position = "pilotview";
  112. priority = 1e+011;
  113. radius = 2;
  114. shortcut = "";
  115. statement = "this animate [""wing_1_up_A"",0];this animate [""wing_2_up_A"",0];this animate [""wing_1_down_A"",0];this animate [""wing_2_down_A"",0]; this say3d ""xwing_unfoldwing_sound""";
  116. textToolTip = "Close wing";
  117. };
  118. class door_open
  119. {
  120. condition = "speed this >25 and this animationPhase ""wing_1_up_A"" == 0 and this animationPhase ""wing_2_up_A"" == 0 and this animationPhase ""wing_1_down_A"" == 0 and this animationPhase ""wing_2_down_A"" == 0";
  121. displayName = "<t color='#F64747'>[Open S-foils]</t>";
  122. displayNameDefault = "";
  123. hideonuse = 1;
  124. onlyForPlayer = 1;
  125. position = "pilotview";
  126. priority = 1e+011;
  127. radius = 2;
  128. shortcut = "";
  129. statement = "this animate [""wing_1_up_A"",1];this animate [""wing_2_up_A"",1];this animate [""wing_1_down_A"",1];this animate [""wing_2_down_A"",1]; this say3d ""xwing_foldwing_sound""";
  130. };
  131. };
  132. weapons[] = {
  133. macro_new_weapon(wynd,a2a),
  134. macro_new_weapon(wynd,agm),
  135. macro_new_weapon(wynd,ugm),
  136. macro_basic_air_weapons,
  137. macro_new_weapon(generic,rebel_aircraft_cannon)
  138. };
  139. magazines[] = {
  140. macro_basic_air_mags,
  141. macro_new_mag(generic_aircraft_cannon_red,1000),
  142. macro_new_mag(generic_aircraft_cannon_red,1000),
  143. macro_new_mag(a2a,4),
  144. macro_new_mag(agm,6),
  145. macro_new_mag(ugm,10)
  146. };
  147. };
  148. class macro_new_vehicle(X_wing,T_65_red5_MkII) : macro_new_vehicle(X_wing,T_65_MkII)
  149. {
  150. displayname = "X-Wing T-65 (Red-5) Mk.II";
  151. model = "\XT\xt.p3d";
  152. soundEngineOnInt[] = {"\XT\sounds\xwing_engonintRED5.ogg", 0.7, 1};
  153. hiddenSelections[] = {"camo1", "camo2", "start", "start2", "burn", "burn2", "t1l", "t2l", "t1r", "t2r"};
  154. hiddenSelectionsTextures[] = {"XT\fusfive.paa", "XT\wingsfive.paa"};
  155. };
  156. class macro_new_vehicle(X_wing,T_65_blue_MkII) : macro_new_vehicle(X_wing,T_65_MkII)
  157. {
  158. displayname = "X-Wing T-65 (Blue) Mk.II";
  159. model = "\XT\xt.p3d";
  160. soundEngineOnInt[] = {"\XT\sounds\xwing_engonintRED5.ogg", 0.7, 1};
  161. hiddenSelections[] = {"camo1", "camo2", "start", "start2", "burn", "burn2", "t1l", "t2l", "t1r", "t2r"};
  162. hiddenSelectionsTextures[] = {"XT\T_Fuselage_02_C.paa", "XT\T_Wings_02_C.paa"};
  163. };
  164. class macro_new_vehicle(X_wing,T_65_green_MkII) : macro_new_vehicle(X_wing,T_65_MkII)
  165. {
  166. displayname = "X-Wing T-65 (Green) Mk.II";
  167. model = "\XT\xt.p3d";
  168. soundEngineOnInt[] = {"\XT\sounds\xwing_engonintRED5.ogg", 0.7, 1};
  169. hiddenSelections[] = {"camo1", "camo2", "start", "start2", "burn", "burn2", "t1l", "t2l", "t1r", "t2r"};
  170. hiddenSelectionsTextures[] = {"XT\T_Fuselage_03_C.paa", "XT\T_Wings_03_C.paa"};
  171. };
  172. class macro_new_vehicle(X_wing,T_70_MkII) : swop_xwt70
  173. {
  174. forceInGarage=1;
  175. faction = macro_resistance_faction;
  176. editorSubcategory = macro_editor_cat_air(Resistance);
  177. vehicleClass = macro_editor_vehicle_type_air(Resistance);
  178. scope = 2;
  179. altFullForce = 6000;
  180. airBrakeFrictionCoef = 80.4;
  181. altNoForce = 9000;
  182. armor = 300;
  183. displayname = "X-Wing T-70 Mk.II";
  184. class ACE_SelfActions:ACE_SelfActions
  185. {
  186. #include "../../common/universal_hud_color_changer.hpp"
  187. };
  188. #include "../../common/universal_mfd.hpp"
  189. class UserActions
  190. {
  191. class AfterburnerOn
  192. {
  193. displayName = "<t color='#4C9900'>[Afterburner On]</t>";
  194. shortcut = "";
  195. condition = "speed this >50 and (!(this getVariable 'AfterBurnerxt'))";
  196. statement = "this setVariable ['AfterBurnerxt',true];this spawn nes4day_afterburnerxt";
  197. priority = 1e+011;
  198. displayNameDefault = "";
  199. position = "pilotview";
  200. radius = 15;
  201. onlyforplayer = 1;
  202. };
  203. class AfterburnerOff
  204. {
  205. displayName = "<t color='#FF9933'>[Afterburner Off]</t>";
  206. shortcut = "";
  207. condition = "(this getVariable 'AfterBurnerxt')";
  208. statement = "this setVariable ['AfterBurnerxt',false]";
  209. priority = 1e+011;
  210. displayNameDefault = "";
  211. position = "pilotview";
  212. radius = 15;
  213. onlyforplayer = 1;
  214. };
  215. class door_close
  216. {
  217. condition = "this animationPhase ""wing_1_up_A"" == 1 and this animationPhase ""wing_2_up_A"" == 1 and this animationPhase ""wing_1_down_A"" == 1 and this animationPhase ""wing_2_down_A"" == 1";
  218. displayName = "<t color='#009FD4'>[Close S-foils]</t>";
  219. displayNameDefault = "";
  220. hideonuse = 1;
  221. onlyForPlayer = 1;
  222. position = "pilotview";
  223. priority = 1e+011;
  224. radius = 2;
  225. shortcut = "";
  226. statement = "this animate [""wing_1_up_A"",0];this animate [""wing_2_up_A"",0];this animate [""wing_1_down_A"",0];this animate [""wing_2_down_A"",0]; this say3d ""xwing_unfoldwing_sound""";
  227. textToolTip = "Close wing";
  228. };
  229. class door_open
  230. {
  231. condition = "speed this >25 and this animationPhase ""wing_1_up_A"" == 0 and this animationPhase ""wing_2_up_A"" == 0 and this animationPhase ""wing_1_down_A"" == 0 and this animationPhase ""wing_2_down_A"" == 0";
  232. displayName = "<t color='#F64747'>[Open S-foils]</t>";
  233. displayNameDefault = "";
  234. hideonuse = 1;
  235. onlyForPlayer = 1;
  236. position = "pilotview";
  237. priority = 1e+011;
  238. radius = 2;
  239. shortcut = "";
  240. statement = "this animate [""wing_1_up_A"",1];this animate [""wing_2_up_A"",1];this animate [""wing_1_down_A"",1];this animate [""wing_2_down_A"",1]; this say3d ""xwing_foldwing_sound""";
  241. };
  242. };
  243. weapons[] = {
  244. macro_new_weapon(wynd,a2a),
  245. macro_new_weapon(wynd,agm),
  246. macro_new_weapon(wynd,ugm),
  247. macro_basic_air_weapons,
  248. macro_new_weapon(generic,rebel_aircraft_cannon)
  249. };
  250. magazines[] = {
  251. macro_basic_air_mags,
  252. macro_new_mag(generic_aircraft_cannon_red,1000),
  253. macro_new_mag(generic_aircraft_cannon_red,1000),
  254. macro_new_mag(a2a,4),
  255. macro_new_mag(agm,6),
  256. macro_new_mag(ugm,10)
  257. };
  258. };
  259. class macro_new_vehicle(X_wing,T_70_Black_MkII) : macro_new_vehicle(X_wing,T_70_MkII)
  260. {
  261. displayName = "X-Wing T-70 (Black) Mk.II";
  262. model = "\XT\xt70black.p3d";
  263. picture = "\XT\xt70blac_512_ca.paa";
  264. icon = "\xt\xt70blac_128_ca.paa";
  265. soundEngineOnInt[] = {"\XT\sounds\xwing_engonintBLACKONE.ogg", 0.7, 1};
  266. hiddenSelections[] = {"camo1"};
  267. hiddenSelectionsTextures[] = {"XT\t_xwing_t70blackone_body_co.paa"};
  268. }
  269. };