config.cpp 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  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. };
  42. weapons[]=
  43. {
  44. };
  45. };
  46. };
  47. #include "../../common/sensor_templates.hpp"
  48. class DefaultEventhandlers;
  49. class CfgVehicles
  50. {
  51. #include "inheritance.hpp"
  52. class macro_new_vehicle(laat,Mk1):3as_LAAT_Mk1
  53. {
  54. displayName="LAAT/I MK.I";
  55. #include "common_stuff_tcw.hpp"
  56. RD501_magclamp_small_1[] = {0.0,1.0,-1.0};
  57. class UserActions: UserActions
  58. {
  59. #include "user_action.hpp"
  60. };
  61. hiddenSelectionsTextures[]=
  62. {
  63. "RD501_Vehicles\textures\LAAT\laat_wings_doors_basecolor.paa",
  64. "RD501_Vehicles\textures\LAAT\laat_base_basecolor.paa"
  65. };
  66. class Turrets: Turrets
  67. {
  68. class Gunner: Copilot
  69. {
  70. minelev=-60;
  71. minturn=-240;
  72. maxelev=40;
  73. maxturn=-120;
  74. #include "../../common/common_optics.hpp"
  75. };
  76. class LeftDoorgun: LeftDoorgun
  77. {
  78. weapons[]=
  79. {
  80. macro_new_weapon(turret,laat_ball_beam_l),
  81. "Laserdesignator_pilotCamera"
  82. };
  83. magazines[]=
  84. {
  85. "Laserbatteries",
  86. 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),
  87. 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),
  88. 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)
  89. };
  90. #include "../../common/common_optics.hpp"
  91. memorypointgunneroptics="FIXME";
  92. };
  93. class RightDoorGun: RightDoorGun
  94. {
  95. weapons[]=
  96. {
  97. macro_new_weapon(turret,laat_ball_beam_r),
  98. "Laserdesignator_pilotCamera"
  99. };
  100. magazines[]=
  101. {
  102. "Laserbatteries",
  103. 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),
  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. };
  107. #include "../../common/common_optics.hpp"
  108. memorypointgunneroptics="FIXME";
  109. };
  110. class CargoTurret_01: CargoTurret_01{};
  111. class CargoTurret_02: CargoTurret_02{};
  112. class CargoTurret_03: CargoTurret_03{};
  113. class CargoTurret_04: CargoTurret_04{};
  114. class CargoTurret_05: CargoTurret_05{};
  115. class CargoTurret_06: CargoTurret_06{};
  116. };
  117. };
  118. class macro_new_vehicle(laat,Mk1_lights):3as_LAAT_Mk1Lights
  119. {
  120. displayName="LAAT/I MK.I (Lights)";
  121. #include "common_stuff_tcw.hpp"
  122. RD501_magclamp_small_1[] = {0.0,1.0,-1.0};
  123. class UserActions: UserActions
  124. {
  125. #include "user_action.hpp"
  126. };
  127. hiddenSelectionsTextures[]=
  128. {
  129. "RD501_Vehicles\textures\LAAT\laat_wings_doors_basecolor.paa",
  130. "RD501_Vehicles\textures\LAAT\laat_base_basecolor.paa"
  131. };
  132. class Turrets: Turrets
  133. {
  134. class Gunner: Copilot
  135. {
  136. minelev=-60;
  137. minturn=-240;
  138. maxelev=40;
  139. maxturn=-120;
  140. #include "../../common/common_optics.hpp"
  141. };
  142. class CargoTurret_01: CargoTurret_01{};
  143. class CargoTurret_02: CargoTurret_02{};
  144. class CargoTurret_03: CargoTurret_03{};
  145. class CargoTurret_04: CargoTurret_04{};
  146. class CargoTurret_05: CargoTurret_05{};
  147. class CargoTurret_06: CargoTurret_06{};
  148. };
  149. };
  150. class macro_new_vehicle(laat,Mk2):3as_LAAT_Mk2
  151. {
  152. displayName="LAAT/I MK.II";
  153. #include "common_stuff_tcw.hpp"
  154. RD501_magclamp_small_1[] = {0.0,1.0,-1.0};
  155. class UserActions: UserActions
  156. {
  157. #include "user_action.hpp"
  158. };
  159. hiddenSelectionsTextures[]=
  160. {
  161. "RD501_Vehicles\textures\LAAT\laat_wings_doors_basecolor.paa",
  162. "RD501_Vehicles\textures\LAAT\laat_base_basecolor.paa"
  163. };
  164. class Turrets: Turrets
  165. {
  166. class Gunner: Copilot
  167. {
  168. minelev=-60;
  169. minturn=-240;
  170. maxelev=40;
  171. maxturn=-120;
  172. #include "../../common/common_optics.hpp"
  173. };
  174. class CargoTurret_01: CargoTurret_01{};
  175. class CargoTurret_02: CargoTurret_02{};
  176. };
  177. };
  178. class macro_new_vehicle(laat,Mk2_lights):3as_LAAT_Mk2Lights
  179. {
  180. displayName="LAAT/I MK.II (Lights)";
  181. #include "common_stuff_tcw.hpp"
  182. RD501_magclamp_small_1[] = {0.0,1.0,-1.0};
  183. class UserActions: UserActions
  184. {
  185. #include "user_action.hpp"
  186. };
  187. hiddenSelectionsTextures[]=
  188. {
  189. "RD501_Vehicles\textures\LAAT\laat_wings_doors_basecolor.paa",
  190. "RD501_Vehicles\textures\LAAT\laat_base_basecolor.paa"
  191. };
  192. class Turrets: Turrets
  193. {
  194. class Gunner: Copilot
  195. {
  196. minelev=-60;
  197. minturn=-240;
  198. maxelev=40;
  199. maxturn=-120;
  200. #include "../../common/common_optics.hpp"
  201. };
  202. class CargoTurret_01: CargoTurret_01{};
  203. class CargoTurret_02: CargoTurret_02{};
  204. };
  205. };
  206. class macro_new_vehicle(laat,cargo_Mk2):swop_LAAT_cargo
  207. {
  208. scope=2;
  209. displayName="LAAT/C MK.II";
  210. author="RD501"
  211. side=1;
  212. crew="SWOP_Clonetrooper_P1";
  213. //transportSoldier=24;
  214. smokeLauncherGrenadeCount = 48;
  215. smokeLauncherAngle = 360;
  216. forceInGarage = 1;
  217. faction = macro_republic_faction
  218. editorSubcategory = macro_editor_cat_air(Republic_heli)
  219. vehicleClass = macro_editor_vehicle_type_air(Republic)
  220. maximumLoad = 5000000000;
  221. slingLoadMaxCargoMass = 5000000000;
  222. //#include "flight_model.hpp"
  223. // cyclicAsideForceCoef = 1*1;
  224. // cyclicForwardForceCoef = 1*4;
  225. // backRotorForceCoef =1*1;
  226. // maxSpeed=200;
  227. // bodyFrictionCoef = 0.9*40;
  228. #include "ace_stuff.hpp"
  229. RD501_magclamp_small_1[] = {-7.0,-2.0,-2.5};
  230. RD501_magclamp_large[] = {0.0,-2.0,-2.0};
  231. RD501_magclamp_small_2[] = {7.0,-2.0,-2.5};
  232. RD501_magclamp_small_forbidden=1;
  233. RD501_magclamp_large_offset[]={0.0,1.0,-4.5};
  234. class ACE_SelfActions
  235. {
  236. #include "../../common/universal_hud_color_changer.hpp"
  237. };
  238. #include "../../common/helicopter_mfd.hpp"
  239. //#include "../../common/universal_mfd.hpp"
  240. //#include "flight_model.hpp"
  241. #include "sounds.hpp"
  242. class UserActions
  243. {
  244. class StartRefuel
  245. {
  246. displayName = "<t color='#07CC0C'>[Start Refueling]</t>";
  247. displayNameDefault = "<t color='#07CC0C'>[Start Refueling]</t>";
  248. textToolTip = "<t color='#07CC0C'>[Start Refueling]</t>";
  249. position = "pilotview";
  250. radius = 20;
  251. priority = 21;
  252. onlyForPlayer = 1;
  253. condition = "this call RD501_fnc_mc_canRefuel";
  254. statement = "this call RD501_fnc_mc_startRefuel;";
  255. };
  256. class StopRefuel
  257. {
  258. displayName = "<t color='#BC0404'>[Stop Refueling]</t>";
  259. displayNameDefault = "<t color='#BC0404'>[Stop Refueling]</t>";
  260. textToolTip = "<t color='#BC0404'>[Stop Refueling]</t>";
  261. position = "pilotview";
  262. radius = 20;
  263. priority = 21;
  264. onlyForPlayer = 1;
  265. condition = "this call RD501_fnc_mc_canStopRefuel";
  266. statement = "_vehicle setVariable['RD501_mc_stop_refuel',true,true];";
  267. };
  268. class ThrusterEngage
  269. {
  270. displayName = "";
  271. displayNameDefault = "";
  272. textToolTip = "";
  273. position = "pilotview";
  274. radius = 20;
  275. priority = 0;
  276. onlyForPlayer = 1;
  277. condition = "((player == driver this) AND (alive this))";
  278. statement = "this execVM ""\RD501_Main\functions\impulse\fnc_impulseIncrease.sqf""";
  279. shortcut="User19"
  280. };
  281. class ThrusterDisengage: ThrusterEngage
  282. {
  283. priority = 0;
  284. displayName = "";
  285. displayNameDefault = "";
  286. textToolTip = "";
  287. condition = "((player == driver this) AND (alive this))";
  288. statement = "this execVM ""\RD501_Main\functions\impulse\fnc_impulseDecrease.sqf""";
  289. shortcut="User20"
  290. };
  291. };
  292. class EventHandlers : DefaultEventhandlers {
  293. fired = "_this call (uinamespace getvariable 'BIS_fnc_effectFired');";
  294. //init = "[_this select 0] call RD501_Main_fnc_laatc_lift";
  295. }
  296. weapons[]=
  297. {
  298. macro_new_weapon(cannon,laat),
  299. macro_new_weapon(wynd,a2a),
  300. "CMFlareLauncher",
  301. "SmokeLauncher",
  302. "Laserdesignator_pilotCamera"
  303. };
  304. magazines[]=
  305. {
  306. "300Rnd_CMFlare_Chaff_Magazine",
  307. "300Rnd_CMFlare_Chaff_Magazine",
  308. "300Rnd_CMFlare_Chaff_Magazine",
  309. macro_new_mag(a2a,4),
  310. macro_new_mag(a2a,4),
  311. "SmokeLauncherMag",
  312. macro_new_mag(laat_cannon,100),
  313. macro_new_mag(laat_cannon,100),
  314. macro_new_mag(laat_cannon,100),
  315. macro_new_mag(laat_cannon,100),
  316. macro_new_mag(laat_cannon,100),
  317. "SmokeLauncherMag",
  318. "SmokeLauncherMag",
  319. "SmokeLauncherMag",
  320. "SmokeLauncherMag",
  321. "SmokeLauncherMag",
  322. "SmokeLauncherMag",
  323. "Laserbatteries"
  324. };
  325. //#include "flight_model.hpp"
  326. };
  327. };