config.cpp 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  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. class UserActions
  75. {
  76. #include "user_action.hpp"
  77. };
  78. class ACE_SelfActions:ACE_SelfActions
  79. {
  80. #include "../../common/universal_hud_color_changer.hpp"
  81. };
  82. #include "../../common/universal_mfd.hpp"
  83. class Turrets: Turrets
  84. {
  85. class CopilotTurret: CopilotTurret
  86. {
  87. #include "common_copilot.hpp"
  88. };
  89. class GunnerTurret1:GunnerTurret1
  90. {
  91. #include "ball_turret_weapons.hpp"
  92. };
  93. class GunnerTurret2:GunnerTurret2
  94. {
  95. #include "ball_turret_weapons.hpp"
  96. };
  97. class CargoTurret_01:CargoTurret_01{};
  98. class CargoTurret_02:CargoTurret_02{};
  99. class CargoTurret_03:CargoTurret_03{};
  100. class CargoTurret_04:CargoTurret_04{};
  101. class CargoTurret_05:CargoTurret_05{};
  102. class CargoTurret_06:CargoTurret_06{};
  103. };
  104. };
  105. class macro_new_vehicle(laat,Mk4):swop_LAATmk2
  106. {
  107. scope=2;
  108. displayName="LAAT/I MK.IV";
  109. author="RD501"
  110. side=1;
  111. crew="SWOP_Clonetrooper_P1";
  112. transportSoldier=24;
  113. forceInGarage = 1;
  114. crewExplosionProtection = 0;
  115. crewCrashProtection = 0;
  116. slingLoadMemoryPoint = "slingLoad0";
  117. angleRangeHorizontal = 360;
  118. angleRangeVertical = 360;
  119. //typing hard
  120. #include "ace_stuff.hpp"
  121. #include "flight_model.hpp"
  122. #include "common_stuff.hpp"
  123. class UserActions
  124. {
  125. #include "user_action.hpp"
  126. class OpenCargoDoor
  127. {
  128. displayName = "<t color='#F64747'>[Open Doors]</t>";
  129. displayNameDefault = "<t color='#F64747'>[Open Doors]</t>";
  130. textToolTip = "<t color='#F64747'>[Open Doors]</t>";
  131. position = "pilotview";
  132. radius = 20;
  133. priority = 9999;
  134. onlyForPlayer = 1;
  135. condition = "this doorPhase ""Doors"" < 0.5 AND (alive this) AND (player in [gunner this, driver this])";
  136. statement = "this animateDoor ['Doors', 1];this animate ['DoorsHandler',1]";
  137. animPeriod = 5;
  138. };
  139. class CloseCargoDoor: OpenCargoDoor
  140. {
  141. displayName = "<t color='#009FD4'>[Close Doors]</t>";
  142. displayNameDefault = "<t color='#009FD4'>[Close Doors]</t>";
  143. textToolTip = "<t color='#009FD4'>[Close Doors]</t>";
  144. priority = 9999;
  145. condition = "this doorPhase ""Doors"" > 0.5 AND (alive this) AND (player in [gunner this, driver this])";
  146. statement = "this animateDoor ['Doors', 0];this animate ['DoorsHandler',0];";
  147. animPeriod = 5;
  148. };
  149. };
  150. class ACE_SelfActions:ACE_SelfActions
  151. {
  152. #include "../../common/universal_hud_color_changer.hpp"
  153. };
  154. #include "../../common/universal_mfd.hpp"
  155. class Turrets: Turrets
  156. {
  157. class CopilotTurret: CopilotTurret
  158. {
  159. #include "common_copilot.hpp"
  160. };
  161. class GunnerTurret1:GunnerTurret1
  162. {
  163. #include "ball_turret_weapons.hpp"
  164. };
  165. class GunnerTurret2:GunnerTurret2
  166. {
  167. #include "ball_turret_weapons.hpp"
  168. };
  169. };
  170. };
  171. #include "_mk4_reskin.hpp"
  172. class macro_new_vehicle(laat,cargo_Mk2):swop_LAAT_cargo
  173. {
  174. scope=2;
  175. displayName="LAAT/C MK.II";
  176. author="RD501"
  177. side=1;
  178. crew="SWOP_Clonetrooper_P1";
  179. //transportSoldier=24;
  180. smokeLauncherGrenadeCount = 48;
  181. smokeLauncherAngle = 360;
  182. forceInGarage = 1;
  183. faction = macro_republic_faction
  184. editorSubcategory = macro_editor_cat_air(Republic_heli)
  185. vehicleClass = macro_editor_vehicle_type_air(Republic)
  186. maximumLoad = 5000000000;
  187. slingLoadMaxCargoMass = 5000000000;
  188. //#include "flight_model.hpp"
  189. // cyclicAsideForceCoef = 1*1;
  190. // cyclicForwardForceCoef = 1*4;
  191. // backRotorForceCoef =1*1;
  192. // maxSpeed=200;
  193. // bodyFrictionCoef = 0.9*40;
  194. #include "ace_stuff.hpp"
  195. class ACE_SelfActions
  196. {
  197. #include "../../common/universal_hud_color_changer.hpp"
  198. };
  199. #include "../../common/universal_mfd.hpp"
  200. //#include "flight_model.hpp"
  201. #include "sounds.hpp"
  202. class UserActions
  203. {
  204. #include "user_action.hpp"
  205. };
  206. class EventHandlers : DefaultEventhandlers {
  207. fired = "_this call (uinamespace getvariable 'BIS_fnc_effectFired');";
  208. init = "[_this select 0] call RD501_Main_fnc_laatc_lift";
  209. }
  210. weapons[]=
  211. {
  212. macro_new_weapon(cannon,laat),
  213. macro_new_weapon(wynd,a2a),
  214. "CMFlareLauncher",
  215. "SmokeLauncher",
  216. "Laserdesignator_pilotCamera"
  217. };
  218. magazines[]=
  219. {
  220. "300Rnd_CMFlare_Chaff_Magazine",
  221. "300Rnd_CMFlare_Chaff_Magazine",
  222. "300Rnd_CMFlare_Chaff_Magazine",
  223. macro_new_mag(a2a,4),
  224. macro_new_mag(a2a,4),
  225. "SmokeLauncherMag",
  226. macro_new_mag(laat_cannon,100),
  227. macro_new_mag(laat_cannon,100),
  228. macro_new_mag(laat_cannon,100),
  229. macro_new_mag(laat_cannon,100),
  230. macro_new_mag(laat_cannon,100),
  231. "SmokeLauncherMag",
  232. "SmokeLauncherMag",
  233. "SmokeLauncherMag",
  234. "SmokeLauncherMag",
  235. "SmokeLauncherMag",
  236. "SmokeLauncherMag",
  237. "Laserbatteries"
  238. };
  239. //#include "flight_model.hpp"
  240. };
  241. //mk4 reskins (with swop skins)
  242. reskined_laat_mk4_full_path(spec_ops,Spec Op,LAAT\textures\gunship_2_d.paa,LAAT\textures\gunship_1_spec.paa)
  243. reskined_laat_mk4_full_path(muunilinst,Muunilinst,LAAT\textures\gunship_2_arc_d.paa,LAAT\textures\gunship_1_arc_d.paa)
  244. reskined_laat_mk4_full_path(blue,Blue,LAAT\textures\gunship_2_blue.paa,LAAT\textures\gunship_1_blue.paa)
  245. };