config.cpp 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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 U_Wing
  7. #define patch_name MODNAME##vehicle_addon##_Patches
  8. #define vehicle_classname MODNAME##_##vehicle_addon
  9. #define new_u_wing_class(name) vehicle_classname##_##name
  10. class CfgPatches
  11. {
  12. class macro_patch_name(U_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(u_wing,MKII)
  23. };
  24. weapons[]=
  25. {
  26. };
  27. };
  28. };
  29. #include "../../common/sensor_templates.hpp"
  30. class CBA_Extended_EventHandlers_base;
  31. class CfgVehicles
  32. {
  33. class Helicopter_Base_H;
  34. class Heli_Transport_01_base_F:Helicopter_Base_H
  35. {
  36. class Turrets;
  37. };
  38. class Swop_Uwing: Heli_Transport_01_base_F
  39. {
  40. transportSoldier = 20;
  41. class ACE_SelfActions;
  42. #include "../../common/universal_mfd.hpp"
  43. class Turrets:Turrets
  44. {
  45. class MainTurret;
  46. };
  47. };
  48. class macro_new_vehicle(u_wing,MKII) : Swop_uwing
  49. {
  50. faction = macro_rebel_faction
  51. editorSubcategory = macro_editor_cat_air(Rebel_heli)
  52. vehicleClass = macro_editor_vehicle_type_air(Rebel)
  53. scope = 2;
  54. scopeCurator=2;
  55. airBrakeFrictionCoef = 80.4;
  56. altFullForce = 6000;
  57. altNoForce = 9000;
  58. armor = 600;
  59. forceInGarage=1;
  60. displayname = "U-Wing Mk.II";
  61. class UserActions
  62. {
  63. #include "../../common/universal_dmg_report.hpp"
  64. class ThrusterEngage
  65. {
  66. condition = "(!(this getvariable [""impulsorStatus"",false]) AND (player == driver this) AND (alive this) AND (speed this >10) )";
  67. displayName = "<t color='#4C9900'>[Impulsor On]</t>";
  68. displayNameDefault = "<t color='#4C9900'>[Impulsor On]</t>";
  69. onlyForPlayer = 0;
  70. position = "pilotview";
  71. priority = 1e+008;
  72. radius = 6;
  73. statement = "this execVM ""\uwing\initTE.sqf""";
  74. textToolTip = "<t color='#4C9900'>[Impulsor On]</t>";
  75. userActionID = 64;
  76. };
  77. class ThrusterDisngage : ThrusterEngage
  78. {
  79. condition = "((this getvariable [""impulsorStatus"",false]) AND (player == driver this) AND (alive this))";
  80. displayName = "<t color='#FF9933'>[RepulsorBrake On]</t>";
  81. displayNameDefault = "<t color='#FF9933'>[RepulsorBrake On]</t>";
  82. onlyForPlayer = 0;
  83. position = "pilotview";
  84. priority = 1e+008;
  85. radius = 6;
  86. statement = "this execVM ""\uwing\initTD.sqf""";
  87. textToolTip = "<t color='#FF9933'>[RepulsorBrake On]</t>";
  88. userActionID = 65;
  89. };
  90. };
  91. class ACE_SelfActions:ACE_SelfActions
  92. {
  93. #include "../../common/universal_hud_color_changer.hpp"
  94. };
  95. #include "../../common/universal_mfd.hpp"
  96. class EventHandlers
  97. {
  98. fired = "";
  99. init = "[_this select 0] execVM '\uwing\init.sqf';[_this select 0] execVM '\uwing\initturbine.sqf';";
  100. killed = "_this call (uinamespace getvariable 'BIS_fnc_effectKilled');";
  101. class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers_base {};
  102. };
  103. weapons[] = {
  104. macro_new_weapon(wynd,a2a),
  105. macro_new_weapon(wynd,agm),
  106. macro_new_weapon(wynd,ugm),
  107. macro_basic_air_weapons,
  108. macro_new_weapon(generic,ion_aircraft_cannon)
  109. };
  110. magazines[] = {
  111. macro_new_mag(a2a,4),
  112. macro_new_mag(agm,6),
  113. macro_new_mag(ugm,10),
  114. macro_basic_air_mags,
  115. macro_new_mag(generic_aircraft_cannon_blue,1000),
  116. macro_new_mag(generic_aircraft_cannon_blue,1000)
  117. };
  118. class Turrets:Turrets
  119. {
  120. class MainTurret:MainTurret
  121. {
  122. weapons[] = {
  123. macro_basic_air_weapons,
  124. macro_new_weapon(generic,republic_aircraft_cannon)
  125. };
  126. magazines[] = {
  127. macro_basic_air_mags,
  128. macro_new_mag(generic_aircraft_cannon_green,1000),
  129. macro_new_mag(generic_aircraft_cannon_green,1000)
  130. };
  131. };
  132. };
  133. };
  134. };