config.cpp 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  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,red_krayt),
  38. macro_new_vehicle(laat,medic_krayt),
  39. macro_new_vehicle(laat,stealth_blue_krayt),
  40. macro_new_vehicle(laat,stealth_red_krayt),
  41. macro_new_vehicle(laat,stealth_white_krayt),
  42. macro_new_vehicle(laat,blue_krayt),
  43. macro_new_vehicle(laat,ranger_enforcer),
  44. macro_new_vehicle(laat,Mk4),
  45. macro_new_vehicle(laat,spec_ops),
  46. macro_new_vehicle(laat,muunilinst),
  47. macro_new_vehicle(laat,cargo_Mk2),
  48. macro_new_vehicle(laat,blue),
  49. macro_new_vehicle(laat,vtol_test),
  50. macro_new_vehicle(laat,mk4_skin),
  51. macro_new_vehicle(laat,mk4_501st_cxc),
  52. macro_new_vehicle(laat,mk4_501st_cxx),
  53. macro_new_vehicle(laat,mk4_501st_cxp),
  54. macro_new_vehicle(laat,mk4_501st_cxs),
  55. macro_new_vehicle(laat,mk4_501st_cx)
  56. };
  57. weapons[]=
  58. {
  59. };
  60. };
  61. };
  62. class DefaultEventhandlers;
  63. class CfgVehicles
  64. {
  65. #include "inheritance.hpp"
  66. class macro_new_vehicle(laat,Mk3):swop_LAAT
  67. {
  68. scope=2;
  69. displayName="LAAT/I MK.III";
  70. author="RD501"
  71. side=1;
  72. crew="SWOP_Clonetrooper_P1";
  73. transportSoldier=24;
  74. smokeLauncherGrenadeCount = 48;
  75. smokeLauncherAngle = 360;
  76. forceInGarage = 1;
  77. crewExplosionProtection = 0;
  78. crewCrashProtection = 0;
  79. slingLoadMemoryPoint = "slingload0";
  80. //hiddenSelectionsMaterials[] = {"RD501_Laat\textures\laat\g1.rvmat","RD501_Laat\textures\laat\g2.rvmat"};
  81. //typing hard
  82. #include "ace_stuff.hpp"
  83. #include "flight_model.hpp"
  84. #include "common_stuff_mk3.hpp"
  85. class UserActions
  86. {
  87. #include "user_action.hpp"
  88. };
  89. class EventHandlers : DefaultEventhandlers {
  90. init="[_this select 0] execVM 'RD501_Main\functions\autocrate\autocrate.sqf';[_this select 0] execVM 'RD501_Main\functions\vehicle_lift\laat_lift_3.sqf';";
  91. fired = "_this call (uinamespace getvariable 'BIS_fnc_effectFired');";
  92. }
  93. class ACE_SelfActions:ACE_SelfActions
  94. {
  95. #include "../../common/universal_hud_color_changer.hpp"
  96. };
  97. #include "../../common/universal_mfd.hpp"
  98. class Turrets: Turrets
  99. {
  100. class CopilotTurret: CopilotTurret
  101. {
  102. #include "common_copilot.hpp"
  103. };
  104. class GunnerTurret1:GunnerTurret1
  105. {
  106. #include "ball_turret_weapons.hpp"
  107. };
  108. class GunnerTurret2:GunnerTurret2
  109. {
  110. #include "ball_turret_weapons.hpp"
  111. };
  112. class CargoTurret_01:CargoTurret_01{};
  113. class CargoTurret_02:CargoTurret_02{};
  114. class CargoTurret_03:CargoTurret_03{};
  115. class CargoTurret_04:CargoTurret_04{};
  116. class CargoTurret_05:CargoTurret_05{};
  117. class CargoTurret_06:CargoTurret_06{};
  118. };
  119. };
  120. class macro_new_vehicle(laat,Mk4):swop_LAATmk2
  121. {
  122. scope=2;
  123. displayName="LAAT/I MK.IV";
  124. author="RD501"
  125. side=1;
  126. crew="SWOP_Clonetrooper_P1";
  127. transportSoldier=24;
  128. smokeLauncherGrenadeCount = 48;
  129. smokeLauncherAngle = 360;
  130. forceInGarage = 1;
  131. crewExplosionProtection = 0;
  132. crewCrashProtection = 0;
  133. slingLoadMemoryPoint = "slingLoad0";
  134. angleRangeHorizontal = 360;
  135. angleRangeVertical = 360;
  136. //typing hard
  137. #include "ace_stuff.hpp"
  138. #include "flight_model.hpp"
  139. #include "common_stuff.hpp"
  140. class UserActions
  141. {
  142. #include "user_action.hpp"
  143. class OpenCargoDoor
  144. {
  145. displayName = "<t color='#F64747'>[Open Doors]</t>";
  146. displayNameDefault = "<t color='#F64747'>[Open Doors]</t>";
  147. textToolTip = "<t color='#F64747'>[Open Doors]</t>";
  148. position = "pilotview";
  149. radius = 20;
  150. priority = 9999;
  151. onlyForPlayer = 1;
  152. condition = "this doorPhase ""Doors"" < 0.5 AND (alive this) AND (player in [gunner this, driver this])";
  153. statement = "this animateDoor ['Doors', 1];this animate ['DoorsHandler',1]";
  154. animPeriod = 5;
  155. };
  156. class CloseCargoDoor: OpenCargoDoor
  157. {
  158. displayName = "<t color='#009FD4'>[Close Doors]</t>";
  159. displayNameDefault = "<t color='#009FD4'>[Close Doors]</t>";
  160. textToolTip = "<t color='#009FD4'>[Close Doors]</t>";
  161. priority = 9999;
  162. condition = "this doorPhase ""Doors"" > 0.5 AND (alive this) AND (player in [gunner this, driver this])";
  163. statement = "this animateDoor ['Doors', 0];this animate ['DoorsHandler',0];";
  164. animPeriod = 5;
  165. };
  166. };
  167. class EventHandlers : DefaultEventhandlers {
  168. fired = "_this call (uinamespace getvariable 'BIS_fnc_effectFired');";
  169. init="[_this select 0] execVM 'RD501_Main\functions\autocrate\autocrate.sqf';[_this select 0] execVM 'RD501_Main\functions\vehicle_lift\laat_lift_3.sqf';";
  170. }
  171. class ACE_SelfActions:ACE_SelfActions
  172. {
  173. #include "../../common/universal_hud_color_changer.hpp"
  174. };
  175. #include "../../common/universal_mfd.hpp"
  176. class Turrets: Turrets
  177. {
  178. class CopilotTurret: CopilotTurret
  179. {
  180. #include "common_copilot.hpp"
  181. };
  182. class GunnerTurret1:GunnerTurret1
  183. {
  184. #include "ball_turret_weapons.hpp"
  185. };
  186. class GunnerTurret2:GunnerTurret2
  187. {
  188. #include "ball_turret_weapons.hpp"
  189. };
  190. };
  191. };
  192. #include "_mk4_reskin.hpp"
  193. class macro_new_vehicle(laat,cargo_Mk2):swop_LAAT_cargo
  194. {
  195. scope=2;
  196. displayName="LAAT/C MK.II";
  197. author="RD501"
  198. side=1;
  199. crew="SWOP_Clonetrooper_P1";
  200. //transportSoldier=24;
  201. smokeLauncherGrenadeCount = 48;
  202. smokeLauncherAngle = 360;
  203. forceInGarage = 1;
  204. faction = macro_republic_faction
  205. editorSubcategory = macro_editor_cat_air(Republic_heli)
  206. vehicleClass = macro_editor_vehicle_type_air(Republic)
  207. maximumLoad = 5000000000;
  208. slingLoadMaxCargoMass = 5000000000;
  209. //#include "flight_model.hpp"
  210. // cyclicAsideForceCoef = 1*1;
  211. // cyclicForwardForceCoef = 1*4;
  212. // backRotorForceCoef =1*1;
  213. // maxSpeed=200;
  214. // bodyFrictionCoef = 0.9*40;
  215. #include "ace_stuff.hpp"
  216. class ACE_SelfActions
  217. {
  218. #include "../../common/universal_hud_color_changer.hpp"
  219. };
  220. #include "../../common/universal_mfd.hpp"
  221. //#include "flight_model.hpp"
  222. #include "sounds.hpp"
  223. class UserActions
  224. {
  225. #include "user_action.hpp"
  226. };
  227. class EventHandlers : DefaultEventhandlers {
  228. fired = "_this call (uinamespace getvariable 'BIS_fnc_effectFired');";
  229. init = "[_this select 0] call RD501_Main_fnc_laatc_lift";
  230. }
  231. weapons[]=
  232. {
  233. macro_new_weapon(cannon,laat),
  234. macro_new_weapon(wynd,a2a),
  235. "CMFlareLauncher",
  236. "SmokeLauncher",
  237. "Laserdesignator_pilotCamera"
  238. };
  239. magazines[]=
  240. {
  241. "300Rnd_CMFlare_Chaff_Magazine",
  242. "300Rnd_CMFlare_Chaff_Magazine",
  243. "300Rnd_CMFlare_Chaff_Magazine",
  244. macro_new_mag(a2a,4),
  245. macro_new_mag(a2a,4),
  246. "SmokeLauncherMag",
  247. macro_new_mag(laat_cannon,100),
  248. macro_new_mag(laat_cannon,100),
  249. macro_new_mag(laat_cannon,100),
  250. macro_new_mag(laat_cannon,100),
  251. macro_new_mag(laat_cannon,100),
  252. "SmokeLauncherMag",
  253. "SmokeLauncherMag",
  254. "SmokeLauncherMag",
  255. "SmokeLauncherMag",
  256. "SmokeLauncherMag",
  257. "SmokeLauncherMag",
  258. "Laserbatteries"
  259. };
  260. //#include "flight_model.hpp"
  261. };
  262. //mk4 reskins (with swop skins)
  263. reskined_laat_mk4_full_path(spec_ops,Spec Op,LAAT\textures\gunship_2_d.paa,LAAT\textures\gunship_1_spec.paa)
  264. reskined_laat_mk4_full_path(muunilinst,Muunilinst,LAAT\textures\gunship_2_arc_d.paa,LAAT\textures\gunship_1_arc_d.paa)
  265. reskined_laat_mk4_full_path(blue,Blue,LAAT\textures\gunship_2_blue.paa,LAAT\textures\gunship_1_blue.paa)
  266. //mk3 reskins
  267. // reskined_laat_mk3(red_krayt,Red Krayt,krayt_red\LaatKraytBodyRed.paa,krayt_red\LaatKraytWingRed.paa)
  268. // reskined_laat_mk3(blue_krayt,Blue Krayt,krayt_blue\LaatKraytBodyBlue.paa,krayt_blue\LaatKraytWingBlue.paa)
  269. // reskined_laat_mk3(medic_krayt,Medic Krayt,medic_red\redMedicLaatBody.paa,medic_red\redMedicLaatWing.paa)
  270. // reskined_laat_mk3(stealth_blue_krayt,Stealth Blue Krayt,krayt_black_blue\LaatKraytBodyBlackBlue.paa,krayt_black_blue\LaatKraytWingBlackBlue.paa)
  271. // reskined_laat_mk3(stealth_red_krayt,Stealth Red Krayt,krayt_black_red\LaatKraytBodyBlackRed.paa,krayt_black_red\LaatKraytWingBlackRed.paa)
  272. // reskined_laat_mk3(stealth_white_krayt,Stealth White Krayt,krayt_black_white\LaatKraytBodyBlackWhite.paa,krayt_black_white\LaatKraytWingBlackWhite.paa)
  273. // reskined_laat_mk3(ranger_enforcer,Ranger Enforcer,ranger_enforcer_Laat\reBody.paa,ranger_enforcer_Laat\reWing.paa)
  274. };