config.cpp 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  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. class EventHandlers{};
  43. };
  44. class swop_xwt70:Plane_Base_F
  45. {
  46. scope=0;
  47. class EventHandlers{};
  48. class ACE_SelfActions;
  49. };
  50. class swop_xwt70bo:swop_xwt70
  51. {
  52. scope=0;
  53. class ACE_SelfActions:ACE_SelfActions{};
  54. };
  55. class macro_new_vehicle(X_wing,T_65_MkII) : swop_xw
  56. {
  57. forceInGarage=1;
  58. faction = macro_rebel_faction
  59. editorSubcategory = macro_editor_cat_air(Rebel_vtol)
  60. vehicleClass = macro_editor_vehicle_type_air(Rebel)
  61. scope = 2;
  62. altFullForce = 6000;
  63. airBrakeFrictionCoef = 80.4;
  64. altNoForce = 9000;
  65. armor = 300;
  66. displayname = "X-Wing T-65 Mk.II";
  67. class ACE_SelfActions:ACE_SelfActions
  68. {
  69. #include "../../common/universal_hud_color_changer.hpp"
  70. };
  71. #include "../../common/universal_mfd.hpp"
  72. class UserActions
  73. {
  74. class AfterburnerOn
  75. {
  76. displayName = "<t color='#4C9900'>[Afterburner On]</t>";
  77. shortcut = "";
  78. condition = "speed this >50 and (!(this getVariable 'AfterBurnerxt'))";
  79. statement = "this setVariable ['AfterBurnerxt',true];this spawn nes4day_afterburnerxt";
  80. priority = 1e+011;
  81. displayNameDefault = "";
  82. position = "pilotview";
  83. radius = 15;
  84. onlyforplayer = 1;
  85. };
  86. class AfterburnerOff
  87. {
  88. displayName = "<t color='#FF9933'>[Afterburner Off]</t>";
  89. shortcut = "";
  90. condition = "(this getVariable 'AfterBurnerxt')";
  91. statement = "this setVariable ['AfterBurnerxt',false]";
  92. priority = 1e+011;
  93. displayNameDefault = "";
  94. position = "pilotview";
  95. radius = 15;
  96. onlyforplayer = 1;
  97. };
  98. class door_close
  99. {
  100. 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";
  101. displayName = "<t color='#009FD4'>[Close S-foils]</t>";
  102. displayNameDefault = "";
  103. hideonuse = 1;
  104. onlyForPlayer = 1;
  105. position = "pilotview";
  106. priority = 1e+011;
  107. radius = 2;
  108. shortcut = "";
  109. 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""";
  110. textToolTip = "Close wing";
  111. };
  112. class door_open
  113. {
  114. 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";
  115. displayName = "<t color='#F64747'>[Open S-foils]</t>";
  116. displayNameDefault = "";
  117. hideonuse = 1;
  118. onlyForPlayer = 1;
  119. position = "pilotview";
  120. priority = 1e+011;
  121. radius = 2;
  122. shortcut = "";
  123. 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""";
  124. };
  125. };
  126. weapons[] = {
  127. macro_new_weapon(wynd,a2a),
  128. macro_new_weapon(wynd,agm),
  129. macro_new_weapon(wynd,ugm),
  130. macro_basic_air_weapons,
  131. macro_new_weapon(generic,rebel_aircraft_cannon)
  132. };
  133. magazines[] = {
  134. macro_basic_air_mags,
  135. macro_new_mag(generic_aircraft_cannon_red,1000),
  136. macro_new_mag(generic_aircraft_cannon_red,1000),
  137. macro_new_mag(a2a,4),
  138. macro_new_mag(agm,6),
  139. macro_new_mag(ugm,10)
  140. };
  141. };
  142. class macro_new_vehicle(X_wing,T_65_red5_MkII) : macro_new_vehicle(X_wing,T_65_MkII)
  143. {
  144. displayname = "X-Wing T-65 (Red-5) Mk.II";
  145. model = "\XT\xt.p3d";
  146. soundEngineOnInt[] = {"\XT\sounds\xwing_engonintRED5.ogg", 0.7, 1};
  147. hiddenSelections[] = {"camo1", "camo2", "start", "start2", "burn", "burn2", "t1l", "t2l", "t1r", "t2r"};
  148. hiddenSelectionsTextures[] = {"XT\fusfive.paa", "XT\wingsfive.paa"};
  149. };
  150. class macro_new_vehicle(X_wing,T_65_blue_MkII) : macro_new_vehicle(X_wing,T_65_MkII)
  151. {
  152. displayname = "X-Wing T-65 (Blue) Mk.II";
  153. model = "\XT\xt.p3d";
  154. soundEngineOnInt[] = {"\XT\sounds\xwing_engonintRED5.ogg", 0.7, 1};
  155. hiddenSelections[] = {"camo1", "camo2", "start", "start2", "burn", "burn2", "t1l", "t2l", "t1r", "t2r"};
  156. hiddenSelectionsTextures[] = {"XT\T_Fuselage_02_C.paa", "XT\T_Wings_02_C.paa"};
  157. };
  158. class macro_new_vehicle(X_wing,T_65_green_MkII) : macro_new_vehicle(X_wing,T_65_MkII)
  159. {
  160. displayname = "X-Wing T-65 (Green) Mk.II";
  161. model = "\XT\xt.p3d";
  162. soundEngineOnInt[] = {"\XT\sounds\xwing_engonintRED5.ogg", 0.7, 1};
  163. hiddenSelections[] = {"camo1", "camo2", "start", "start2", "burn", "burn2", "t1l", "t2l", "t1r", "t2r"};
  164. hiddenSelectionsTextures[] = {"XT\T_Fuselage_03_C.paa", "XT\T_Wings_03_C.paa"};
  165. };
  166. class macro_new_vehicle(X_wing,T_70_MkII) : swop_xwt70
  167. {
  168. forceInGarage=1;
  169. faction = macro_resistance_faction;
  170. editorSubcategory = macro_editor_cat_air(Resistance);
  171. vehicleClass = macro_editor_vehicle_type_air(Resistance);
  172. scope = 2;
  173. altFullForce = 6000;
  174. airBrakeFrictionCoef = 80.4;
  175. altNoForce = 9000;
  176. armor = 300;
  177. displayname = "X-Wing T-70 Mk.II";
  178. class ACE_SelfActions:ACE_SelfActions
  179. {
  180. #include "../../common/universal_hud_color_changer.hpp"
  181. };
  182. #include "../../common/universal_mfd.hpp"
  183. class UserActions
  184. {
  185. class AfterburnerOn
  186. {
  187. displayName = "<t color='#4C9900'>[Afterburner On]</t>";
  188. shortcut = "";
  189. condition = "speed this >50 and (!(this getVariable 'AfterBurnerxt'))";
  190. statement = "this setVariable ['AfterBurnerxt',true];this spawn nes4day_afterburnerxt";
  191. priority = 1e+011;
  192. displayNameDefault = "";
  193. position = "pilotview";
  194. radius = 15;
  195. onlyforplayer = 1;
  196. };
  197. class AfterburnerOff
  198. {
  199. displayName = "<t color='#FF9933'>[Afterburner Off]</t>";
  200. shortcut = "";
  201. condition = "(this getVariable 'AfterBurnerxt')";
  202. statement = "this setVariable ['AfterBurnerxt',false]";
  203. priority = 1e+011;
  204. displayNameDefault = "";
  205. position = "pilotview";
  206. radius = 15;
  207. onlyforplayer = 1;
  208. };
  209. class door_close
  210. {
  211. 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";
  212. displayName = "<t color='#009FD4'>[Close S-foils]</t>";
  213. displayNameDefault = "";
  214. hideonuse = 1;
  215. onlyForPlayer = 1;
  216. position = "pilotview";
  217. priority = 1e+011;
  218. radius = 2;
  219. shortcut = "";
  220. 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""";
  221. textToolTip = "Close wing";
  222. };
  223. class door_open
  224. {
  225. 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";
  226. displayName = "<t color='#F64747'>[Open S-foils]</t>";
  227. displayNameDefault = "";
  228. hideonuse = 1;
  229. onlyForPlayer = 1;
  230. position = "pilotview";
  231. priority = 1e+011;
  232. radius = 2;
  233. shortcut = "";
  234. 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""";
  235. };
  236. };
  237. weapons[] = {
  238. macro_new_weapon(wynd,a2a),
  239. macro_new_weapon(wynd,agm),
  240. macro_new_weapon(wynd,ugm),
  241. macro_basic_air_weapons,
  242. macro_new_weapon(generic,rebel_aircraft_cannon)
  243. };
  244. magazines[] = {
  245. macro_basic_air_mags,
  246. macro_new_mag(generic_aircraft_cannon_red,1000),
  247. macro_new_mag(generic_aircraft_cannon_red,1000),
  248. macro_new_mag(a2a,4),
  249. macro_new_mag(agm,6),
  250. macro_new_mag(ugm,10)
  251. };
  252. };
  253. class macro_new_vehicle(X_wing,T_70_Black_MkII) : macro_new_vehicle(X_wing,T_70_MkII)
  254. {
  255. displayName = "X-Wing T-70 (Black) Mk.II";
  256. model = "\XT\xt70black.p3d";
  257. picture = "\XT\xt70blac_512_ca.paa";
  258. icon = "\xt\xt70blac_128_ca.paa";
  259. soundEngineOnInt[] = {"\XT\sounds\xwing_engonintBLACKONE.ogg", 0.7, 1};
  260. hiddenSelections[] = {"camo1"};
  261. hiddenSelectionsTextures[] = {"XT\t_xwing_t70blackone_body_co.paa"};
  262. }
  263. };