config.cpp 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  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 LAAT
  7. #define patch_name MODNAME##vehicle_addon##_Patches
  8. #define vehicle_classname MODNAME##_##vehicle_addon
  9. #define macro_new_vehicle(laat,name) vehicle_classname##_##name
  10. #define reskined_laat_mk3(classname,displayname,texturebody,texturewing)\
  11. class macro_new_vehicle(laat,classname):macro_new_vehicle(laat,Mk3)\
  12. {\
  13. forceInGarage = 0;\
  14. displayName=LAAT/I MK.III - ('##displayname##') ;\
  15. hiddenSelectionsTextures[]={macro_vehicle_textures##\LAAT\##texturebody,macro_vehicle_textures##\LAAT\##texturewing};\
  16. };
  17. #define reskined_laat_mk4_full_path(classname,displayname,texturebody,texturewing)\
  18. class macro_new_vehicle(laat,classname):macro_new_vehicle(laat,Mk4)\
  19. {\
  20. forceInGarage = 0;\
  21. displayName=LAAT/I MK.IV - ('##displayname##') ;\
  22. hiddenSelectionsTextures[]={texturebody,texturewing};\
  23. };
  24. class CfgPatches
  25. {
  26. class macro_patch_name(LAAT)
  27. {
  28. addonRootClass=macro_patch_name(vehicles)
  29. requiredAddons[]=
  30. {
  31. macro_patch_name(vehicles)
  32. };
  33. requiredVersion=0.1;
  34. units[]=
  35. {
  36. macro_new_vehicle(laat,Mk3),
  37. macro_new_vehicle(laat,Mk4),
  38. macro_new_vehicle(laat,mk4_skin),
  39. macro_new_vehicle(laat,mk4_501st_cxc),
  40. macro_new_vehicle(laat,mk4_501st_cxx),
  41. macro_new_vehicle(laat,mk4_501st_cxp),
  42. macro_new_vehicle(laat,mk4_501st_cxs),
  43. macro_new_vehicle(laat,mk4_501st_cx),
  44. macro_new_vehicle(laat,cargo_Mk2),
  45. macro_new_vehicle(laat,spec_ops),
  46. macro_new_vehicle(laat,muunilinst),
  47. macro_new_vehicle(laat,blue)
  48. };
  49. weapons[]=
  50. {
  51. };
  52. };
  53. };
  54. class DefaultEventhandlers;
  55. class CfgVehicles
  56. {
  57. #include "inheritance.hpp"
  58. class macro_new_vehicle(laat,Mk3):swop_LAAT
  59. {
  60. scope=2;
  61. displayName="LAAT/I MK.III";
  62. author="RD501"
  63. side=1;
  64. crew="SWOP_Clonetrooper_P1";
  65. transportSoldier=24;
  66. forceInGarage = 1;
  67. crewExplosionProtection = 0;
  68. crewCrashProtection = 0;
  69. slingLoadMemoryPoint = "slingload0";
  70. //typing hard
  71. #include "ace_stuff.hpp"
  72. #include "flight_model.hpp"
  73. #include "common_stuff.hpp"
  74. RD501_magclamp_small_1[] = {0.0,1.0,-4.5};
  75. class UserActions
  76. {
  77. #include "user_action.hpp"
  78. };
  79. class ACE_SelfActions:ACE_SelfActions
  80. {
  81. #include "../../common/universal_hud_color_changer.hpp"
  82. };
  83. #include "../../common/universal_mfd.hpp"
  84. class Turrets: Turrets
  85. {
  86. class CopilotTurret: CopilotTurret
  87. {
  88. #include "common_copilot.hpp"
  89. };
  90. class GunnerTurret1:GunnerTurret1
  91. {
  92. #include "ball_turret_weapons.hpp"
  93. };
  94. class GunnerTurret2:GunnerTurret2
  95. {
  96. #include "ball_turret_weapons.hpp"
  97. };
  98. class CargoTurret_01:CargoTurret_01{};
  99. class CargoTurret_02:CargoTurret_02{};
  100. class CargoTurret_03:CargoTurret_03{};
  101. class CargoTurret_04:CargoTurret_04{};
  102. class CargoTurret_05:CargoTurret_05{};
  103. class CargoTurret_06:CargoTurret_06{};
  104. };
  105. };
  106. class macro_new_vehicle(laat,Mk4):swop_LAATmk2
  107. {
  108. scope=2;
  109. displayName="LAAT/I MK.IV";
  110. author="RD501"
  111. side=1;
  112. crew="SWOP_Clonetrooper_P1";
  113. transportSoldier=24;
  114. forceInGarage = 1;
  115. crewExplosionProtection = 0;
  116. crewCrashProtection = 0;
  117. slingLoadMemoryPoint = "slingLoad0";
  118. angleRangeHorizontal = 360;
  119. angleRangeVertical = 360;
  120. //typing hard
  121. #include "ace_stuff.hpp"
  122. #include "flight_model.hpp"
  123. #include "common_stuff.hpp"
  124. RD501_magclamp_small_1[] = {0.0,-2.0,-2.5};
  125. class UserActions
  126. {
  127. #include "user_action.hpp"
  128. class OpenCargoDoor
  129. {
  130. displayName = "<t color='#F64747'>[Open Doors]</t>";
  131. displayNameDefault = "<t color='#F64747'>[Open Doors]</t>";
  132. textToolTip = "<t color='#F64747'>[Open Doors]</t>";
  133. position = "pilotview";
  134. radius = 20;
  135. priority = 9999;
  136. onlyForPlayer = 1;
  137. condition = "this doorPhase ""Doors"" < 0.5 AND (alive this) AND (player in [gunner this, driver this])";
  138. statement = "this animateDoor ['Doors', 1];this animate ['DoorsHandler',1]";
  139. animPeriod = 5;
  140. };
  141. class CloseCargoDoor: OpenCargoDoor
  142. {
  143. displayName = "<t color='#009FD4'>[Close Doors]</t>";
  144. displayNameDefault = "<t color='#009FD4'>[Close Doors]</t>";
  145. textToolTip = "<t color='#009FD4'>[Close Doors]</t>";
  146. priority = 9999;
  147. condition = "this doorPhase ""Doors"" > 0.5 AND (alive this) AND (player in [gunner this, driver this])";
  148. statement = "this animateDoor ['Doors', 0];this animate ['DoorsHandler',0];";
  149. animPeriod = 5;
  150. };
  151. };
  152. class ACE_SelfActions:ACE_SelfActions
  153. {
  154. #include "../../common/universal_hud_color_changer.hpp"
  155. };
  156. #include "../../common/universal_mfd.hpp"
  157. class Turrets: Turrets
  158. {
  159. class CopilotTurret: CopilotTurret
  160. {
  161. #include "common_copilot.hpp"
  162. };
  163. class GunnerTurret1:GunnerTurret1
  164. {
  165. #include "ball_turret_weapons.hpp"
  166. };
  167. class GunnerTurret2:GunnerTurret2
  168. {
  169. #include "ball_turret_weapons.hpp"
  170. };
  171. };
  172. };
  173. #include "_mk4_reskin.hpp"
  174. class macro_new_vehicle(laat,cargo_Mk2):swop_LAAT_cargo
  175. {
  176. scope=2;
  177. displayName="LAAT/C MK.II";
  178. author="RD501"
  179. side=1;
  180. crew="SWOP_Clonetrooper_P1";
  181. //transportSoldier=24;
  182. smokeLauncherGrenadeCount = 48;
  183. smokeLauncherAngle = 360;
  184. forceInGarage = 1;
  185. faction = macro_republic_faction
  186. editorSubcategory = macro_editor_cat_air(Republic_heli)
  187. vehicleClass = macro_editor_vehicle_type_air(Republic)
  188. maximumLoad = 5000000000;
  189. slingLoadMaxCargoMass = 5000000000;
  190. //#include "flight_model.hpp"
  191. // cyclicAsideForceCoef = 1*1;
  192. // cyclicForwardForceCoef = 1*4;
  193. // backRotorForceCoef =1*1;
  194. // maxSpeed=200;
  195. // bodyFrictionCoef = 0.9*40;
  196. #include "ace_stuff.hpp"
  197. RD501_magclamp_small_1[] = {-7.0,-2.0,-2.5};
  198. RD501_magclamp_large[] = {0.0,-2.0,-2.0};
  199. RD501_magclamp_small_2[] = {7.0,-2.0,-2.5};
  200. class ACE_SelfActions
  201. {
  202. #include "../../common/universal_hud_color_changer.hpp"
  203. };
  204. #include "../../common/universal_mfd.hpp"
  205. //#include "flight_model.hpp"
  206. #include "sounds.hpp"
  207. class UserActions
  208. {
  209. #include "user_action.hpp"
  210. };
  211. class EventHandlers : DefaultEventhandlers {
  212. fired = "_this call (uinamespace getvariable 'BIS_fnc_effectFired');";
  213. init = "[_this select 0] call RD501_Main_fnc_laatc_lift";
  214. }
  215. weapons[]=
  216. {
  217. macro_new_weapon(cannon,laat),
  218. macro_new_weapon(wynd,a2a),
  219. "CMFlareLauncher",
  220. "SmokeLauncher",
  221. "Laserdesignator_pilotCamera"
  222. };
  223. magazines[]=
  224. {
  225. "300Rnd_CMFlare_Chaff_Magazine",
  226. "300Rnd_CMFlare_Chaff_Magazine",
  227. "300Rnd_CMFlare_Chaff_Magazine",
  228. macro_new_mag(a2a,4),
  229. macro_new_mag(a2a,4),
  230. "SmokeLauncherMag",
  231. macro_new_mag(laat_cannon,100),
  232. macro_new_mag(laat_cannon,100),
  233. macro_new_mag(laat_cannon,100),
  234. macro_new_mag(laat_cannon,100),
  235. macro_new_mag(laat_cannon,100),
  236. "SmokeLauncherMag",
  237. "SmokeLauncherMag",
  238. "SmokeLauncherMag",
  239. "SmokeLauncherMag",
  240. "SmokeLauncherMag",
  241. "SmokeLauncherMag",
  242. "Laserbatteries"
  243. };
  244. //#include "flight_model.hpp"
  245. };
  246. //mk4 reskins (with swop skins)
  247. reskined_laat_mk4_full_path(spec_ops,Spec Op,LAAT\textures\gunship_2_d.paa,LAAT\textures\gunship_1_spec.paa)
  248. reskined_laat_mk4_full_path(muunilinst,Muunilinst,LAAT\textures\gunship_2_arc_d.paa,LAAT\textures\gunship_1_arc_d.paa)
  249. reskined_laat_mk4_full_path(blue,Blue,LAAT\textures\gunship_2_blue.paa,LAAT\textures\gunship_1_blue.paa)
  250. };