config.cpp 10 KB

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