1
0

config.cpp 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441
  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. "3AS_LAAT"
  33. };
  34. requiredVersion=0.1;
  35. units[]=
  36. {
  37. macro_new_vehicle(laat,Mk1),
  38. macro_new_vehicle(laat,Mk1_lights),
  39. macro_new_vehicle(laat,Mk2),
  40. macro_new_vehicle(laat,Mk2_lights),
  41. macro_new_vehicle(laat,LE),
  42. macro_new_vehicle(laat,C)
  43. };
  44. weapons[]=
  45. {
  46. };
  47. };
  48. };
  49. #include "../../common/sensor_templates.hpp"
  50. class DefaultEventhandlers;
  51. class CfgVehicles
  52. {
  53. #include "inheritance.hpp"
  54. class macro_new_vehicle(laat,Mk1):3as_LAAT_Mk1
  55. {
  56. displayName="LAAT/I MK.I";
  57. #include "common_stuff_tcw.hpp"
  58. RD501_magclamp_small_1[] = {0.0,1.0,-1.0};
  59. class UserActions: UserActions
  60. {
  61. #include "user_action.hpp"
  62. };
  63. hiddenSelectionsTextures[]=
  64. {
  65. "RD501_Vehicles\textures\LAAT\laat_wings_doors_basecolor.paa",
  66. "RD501_Vehicles\textures\LAAT\laat_base_basecolor.paa",
  67. "3AS\3as_Laat\LAATI\Textures\LAAT_guns_CO.paa",
  68. "3AS\3as_Laat\LAATI\Textures\LAAT_Inside_CO.paa"
  69. };
  70. class Turrets: Turrets
  71. {
  72. class Gunner: Copilot
  73. {
  74. minelev=-60;
  75. minturn=-240;
  76. maxelev=40;
  77. maxturn=-120;
  78. #include "../../common/common_optics.hpp"
  79. weapons[]=
  80. {
  81. macro_new_weapon(generic,republic_aircraft_cannon),
  82. "Laserdesignator_pilotCamera"
  83. };
  84. magazines[]=
  85. {
  86. "Laserbatteries",
  87. macro_new_mag(generic_aircraft_gun_green,1000),
  88. macro_new_mag(generic_aircraft_gun_green,1000),
  89. macro_new_mag(generic_aircraft_gun_green,1000)
  90. };
  91. #include "../../common/common_optics.hpp"
  92. memorypointgunneroptics="FIXME";
  93. };
  94. class LeftDoorgun: LeftDoorgun
  95. {
  96. weapons[]=
  97. {
  98. macro_new_weapon(turret,laat_ball_beam_l),
  99. "Laserdesignator_pilotCamera"
  100. };
  101. magazines[]=
  102. {
  103. "Laserbatteries",
  104. macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300),
  105. macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300),
  106. macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300)
  107. };
  108. #include "../../common/common_optics.hpp"
  109. memorypointgunneroptics="FIXME";
  110. };
  111. class RightDoorGun: RightDoorGun
  112. {
  113. weapons[]=
  114. {
  115. macro_new_weapon(turret,laat_ball_beam_r),
  116. "Laserdesignator_pilotCamera"
  117. };
  118. magazines[]=
  119. {
  120. "Laserbatteries",
  121. macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300),
  122. macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300),
  123. macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300),macro_new_mag(laat_ball_beam,300)
  124. };
  125. #include "../../common/common_optics.hpp"
  126. memorypointgunneroptics="FIXME";
  127. };
  128. class CargoTurret_01: CargoTurret_01{};
  129. class CargoTurret_02: CargoTurret_02{};
  130. class CargoTurret_03: CargoTurret_03{};
  131. class CargoTurret_04: CargoTurret_04{};
  132. class CargoTurret_05: CargoTurret_05{};
  133. class CargoTurret_06: CargoTurret_06{};
  134. };
  135. };
  136. class macro_new_vehicle(laat,Mk1_lights):3as_LAAT_Mk1Lights
  137. {
  138. displayName="LAAT/I MK.I (Lights)";
  139. #include "common_stuff_tcw.hpp"
  140. RD501_magclamp_small_1[] = {0.0,1.0,-1.0};
  141. class UserActions: UserActions
  142. {
  143. #include "user_action.hpp"
  144. };
  145. hiddenSelectionsTextures[]=
  146. {
  147. "RD501_Vehicles\textures\LAAT\laat_wings_doors_basecolor.paa",
  148. "RD501_Vehicles\textures\LAAT\laat_base_basecolor.paa",
  149. "3AS\3as_Laat\LAATI\Textures\LAAT_guns_CO.paa",
  150. "3AS\3as_Laat\LAATI\Textures\LAAT_Inside_CO.paa"
  151. };
  152. class Turrets: Turrets
  153. {
  154. class Gunner: Copilot
  155. {
  156. minelev=-60;
  157. minturn=-240;
  158. maxelev=40;
  159. maxturn=-120;
  160. weapons[]=
  161. {
  162. macro_new_weapon(generic,republic_aircraft_cannon),
  163. "Laserdesignator_pilotCamera"
  164. };
  165. magazines[]=
  166. {
  167. "Laserbatteries",
  168. macro_new_mag(generic_aircraft_gun_green,1000),
  169. macro_new_mag(generic_aircraft_gun_green,1000),
  170. macro_new_mag(generic_aircraft_gun_green,1000)
  171. };
  172. #include "../../common/common_optics.hpp"
  173. };
  174. class CargoTurret_01: CargoTurret_01{};
  175. class CargoTurret_02: CargoTurret_02{};
  176. class CargoTurret_03: CargoTurret_03{};
  177. class CargoTurret_04: CargoTurret_04{};
  178. class CargoTurret_05: CargoTurret_05{};
  179. class CargoTurret_06: CargoTurret_06{};
  180. };
  181. };
  182. class macro_new_vehicle(laat,Mk2):3as_LAAT_Mk2
  183. {
  184. displayName="LAAT/I MK.II";
  185. #include "common_stuff_tcw.hpp"
  186. RD501_magclamp_small_1[] = {0.0,1.0,-1.0};
  187. class UserActions: UserActions
  188. {
  189. #include "user_action.hpp"
  190. };
  191. hiddenSelectionsTextures[]=
  192. {
  193. "RD501_Vehicles\textures\LAAT\laat_wings_doors_basecolor.paa",
  194. "RD501_Vehicles\textures\LAAT\laat_base_basecolor.paa",
  195. "3AS\3as_Laat\LAATI\Textures\LAAT_guns_CO.paa",
  196. "3AS\3as_Laat\LAATI\Textures\LAAT_Inside_CO.paa"
  197. };
  198. class Turrets: Turrets
  199. {
  200. class Gunner: Copilot
  201. {
  202. minelev=-60;
  203. minturn=-240;
  204. maxelev=40;
  205. maxturn=-120;
  206. weapons[]=
  207. {
  208. macro_new_weapon(generic,republic_aircraft_cannon),
  209. "Laserdesignator_pilotCamera"
  210. };
  211. magazines[]=
  212. {
  213. "Laserbatteries",
  214. macro_new_mag(generic_aircraft_gun_green,1000),
  215. macro_new_mag(generic_aircraft_gun_green,1000),
  216. macro_new_mag(generic_aircraft_gun_green,1000)
  217. };
  218. #include "../../common/common_optics.hpp"
  219. };
  220. class CargoTurret_01: CargoTurret_01{};
  221. class CargoTurret_02: CargoTurret_02{};
  222. };
  223. };
  224. class macro_new_vehicle(laat,Mk2_lights):3as_LAAT_Mk2Lights
  225. {
  226. displayName="LAAT/I MK.II (Lights)";
  227. #include "common_stuff_tcw.hpp"
  228. RD501_magclamp_small_1[] = {0.0,1.0,-1.0};
  229. class UserActions: UserActions
  230. {
  231. #include "user_action.hpp"
  232. };
  233. hiddenSelectionsTextures[]=
  234. {
  235. "RD501_Vehicles\textures\LAAT\laat_wings_doors_basecolor.paa",
  236. "RD501_Vehicles\textures\LAAT\laat_base_basecolor.paa",
  237. "3AS\3as_Laat\LAATI\Textures\LAAT_guns_CO.paa",
  238. "3AS\3as_Laat\LAATI\Textures\LAAT_Inside_CO.paa"
  239. };
  240. class Turrets: Turrets
  241. {
  242. class Gunner: Copilot
  243. {
  244. minelev=-60;
  245. minturn=-240;
  246. maxelev=40;
  247. maxturn=-120;
  248. weapons[]=
  249. {
  250. macro_new_weapon(generic,republic_aircraft_cannon),
  251. "Laserdesignator_pilotCamera"
  252. };
  253. magazines[]=
  254. {
  255. "Laserbatteries",
  256. macro_new_mag(generic_aircraft_gun_green,1000),
  257. macro_new_mag(generic_aircraft_gun_green,1000),
  258. macro_new_mag(generic_aircraft_gun_green,1000)
  259. };
  260. #include "../../common/common_optics.hpp"
  261. };
  262. class CargoTurret_01: CargoTurret_01{};
  263. class CargoTurret_02: CargoTurret_02{};
  264. };
  265. };
  266. class macro_new_vehicle(laat,LE):3AS_Patrol_LAAT_Republic
  267. {
  268. displayName="Republic LAAT/LE";
  269. scope=2;
  270. author="RD501";
  271. forceInGarage = 1;
  272. RD501_magclamp_large_offset[] = {0.0, 0.0, -4.5};
  273. RD501_magclamp_small_offset[] = {0.0, 0.0, -4.5};
  274. faction = macro_republic_faction
  275. editorSubcategory = macro_editor_cat_air(Republic_heli)
  276. vehicleClass = macro_editor_vehicle_type_air(Republic)
  277. transportSoldier=14;
  278. class UserActions
  279. {
  280. class ThrusterEngage
  281. {
  282. displayName = "";
  283. displayNameDefault = "";
  284. textToolTip = "";
  285. position = "pilotview";
  286. radius = 20;
  287. priority = 0;
  288. onlyForPlayer = 1;
  289. condition = "((player == driver this) AND (alive this))";
  290. statement = "this execVM ""\RD501_Main\functions\impulse\fnc_impulseIncrease_LE.sqf""";
  291. shortcut="User19"
  292. };
  293. class ThrusterDisengage: ThrusterEngage
  294. {
  295. priority = 0;
  296. displayName = "";
  297. displayNameDefault = "";
  298. textToolTip = "";
  299. condition = "((player == driver this) AND (alive this))";
  300. statement = "this execVM ""\RD501_Main\functions\impulse\fnc_impulseDecrease_LE.sqf""";
  301. shortcut="User20"
  302. };
  303. };
  304. RD501_magclamp_small_1[] = {0.0,1.0,-1.0};
  305. enableManualFire=1;
  306. weapons[]=
  307. {
  308. macro_new_weapon(generic,republic_aircraft_cannon),
  309. "Bomb_Leaflets",
  310. macro_new_weapon(wynd,ugm),
  311. macro_basic_air_weapons
  312. };
  313. magazines[]=
  314. {
  315. macro_basic_air_mags,
  316. "1Rnd_Leaflets_Civ_F",
  317. "1Rnd_Leaflets_Civ_F",
  318. "1Rnd_Leaflets_Civ_F",
  319. "1Rnd_Leaflets_Civ_F",
  320. macro_new_mag(ugm,10),
  321. macro_new_mag(generic_aircraft_gun_green,1000)
  322. };
  323. class Turrets: Turrets
  324. {
  325. class Gunner: Copilot
  326. {
  327. outGunnerMayFire=1;
  328. commanding=-1;
  329. primaryGunner=1;
  330. weapons[]=
  331. {
  332. macro_new_weapon(generic,republic_aircraft_cannon),
  333. "Laserdesignator_pilotCamera"
  334. };
  335. magazines[]=
  336. {
  337. "Laserbatteries",
  338. macro_new_mag(generic_aircraft_gun_green,1000)
  339. };
  340. #include "../../common/common_optics.hpp"
  341. };
  342. };
  343. };
  344. class macro_new_vehicle(laat,C):3AS_LAATC
  345. {
  346. displayName="Republic LAAT/C";
  347. scope=2;
  348. author="RD501";
  349. forceInGarage = 1;
  350. faction = macro_republic_faction
  351. editorSubcategory = macro_editor_cat_air(Republic_heli)
  352. vehicleClass = macro_editor_vehicle_type_air(Republic)
  353. class UserActions
  354. {
  355. class ThrusterEngage
  356. {
  357. displayName = "";
  358. displayNameDefault = "";
  359. textToolTip = "";
  360. position = "pilotview";
  361. radius = 20;
  362. priority = 0;
  363. onlyForPlayer = 1;
  364. condition = "((player == driver this) AND (alive this))";
  365. statement = "this execVM ""\RD501_Main\functions\impulse\fnc_impulseIncrease.sqf""";
  366. shortcut="User19"
  367. };
  368. class ThrusterDisengage: ThrusterEngage
  369. {
  370. priority = 0;
  371. displayName = "";
  372. displayNameDefault = "";
  373. textToolTip = "";
  374. condition = "((player == driver this) AND (alive this))";
  375. statement = "this execVM ""\RD501_Main\functions\impulse\fnc_impulseDecrease.sqf""";
  376. shortcut="User20"
  377. };
  378. };
  379. RD501_magclamp_small_1[] = {-7.0,-2.0,-4.5};
  380. RD501_magclamp_large[] = {0.0,-2.0,-4.0};
  381. RD501_magclamp_small_2[] = {7.0,-2.0,-4.5};
  382. RD501_magclamp_small_forbidden = 1;
  383. RD501_magclamp_large_offset[] = {0.0,1.0,-4.5};
  384. enableManualFire=1;
  385. weapons[]=
  386. {
  387. macro_new_weapon(generic,republic_aircraft_cannon),
  388. macro_new_weapon(cannon,laat),
  389. macro_basic_air_weapons
  390. };
  391. magazines[]=
  392. {
  393. macro_basic_air_mags,
  394. macro_new_mag(generic_aircraft_gun_green,1000),
  395. macro_new_mag(laat_cannon,100),
  396. };
  397. };
  398. };