1
0

XEH_postinit.sqf 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. #include "config_macros.hpp"
  2. #include "\a3\editor_f\Data\Scripts\dikCodes.h"
  3. //Run the jumppack script
  4. [] spawn {
  5. [] spawn compile preprocessFileLineNumbers 'macro_mod_script_path\jumppack\jumppack.sqf';
  6. sleep 0.5;
  7. call compile preprocessFileLineNumbers 'macro_mod_script_path\jumppack\jumppack_effects.sqf';
  8. };
  9. // Add nightvision event handler
  10. call macro_fnc_name(nightvision);
  11. #define QWEAP_NOFAM(name) macro_quote(macro_new_weapon_nofam(name))
  12. #define QWEAP_LAUNCH(name) macro_quote(macro_new_weapon(launcher,name))
  13. // Drone Recharge
  14. RD501_DRONE_BATTERY = "RD501_r2_charge_pack_x10_mag";
  15. private _refuelAction = [
  16. "RD501_Drone_Refuel",
  17. "Refuel Drone",
  18. "",
  19. { _this call rd501_fnc_refuelUAVDrone },
  20. { _this call rd501_fnc_canRefuel }
  21. ] call ACE_interact_menu_fnc_createAction;
  22. ["RD501_drone_Clone_Recon_Droid", 0, ["ACE_MainActions"], _refuelAction] call ACE_interact_menu_fnc_addActionToClass;
  23. //Force Walk
  24. RD501_FORCE_WALK_WEAPONS = [macro_quote(macro_new_weapon_nofam(z1000))];
  25. ["weapon", macro_fnc_name(heavyWeaponHandlePlayerWeaponChanged)] call CBA_fnc_addPlayerEventHandler;
  26. //Auto Reload On Equip
  27. RD501_AUTO_RELOAD_ON_EQUIP = [QWEAP_NOFAM(z1000),QWEAP_LAUNCH(rps1)];
  28. ["weapon", macro_fnc_name(reloadWeaponOnFirstSelected)] call CBA_fnc_addPlayerEventHandler;
  29. // Magclamp
  30. call macro_fnc_name(magclamp);
  31. // Flip Backpack
  32. rd501_flip_vehicle_validBackpacks = ["RD501_JLTS_Clone_Flip_backpack"];
  33. ["rd501_external_reload", { _this call rd501_fnc_onReloadExternalHandler }, []] call CBA_fnc_addEventHandlerArgs;
  34. // Fortify Tool Adjustments
  35. call macro_fnc_name(fortify_tool);
  36. // Medical CCP Building
  37. rd501_medical_ccp_building = "Land_Medevac_house_V1_F";
  38. rd501_medical_ccp_classes = ["Land_Medevac_house_V1_F"];
  39. rd501_medical_ccp_truck = "rd501_mash_truck";
  40. rd501_medical_ccp_stitchDurationSeconds = 5;
  41. rd501_medical_ccp_bandageDurationSeconds = 5;
  42. ["rd501_medical_ccp_incrementStitch",{
  43. _this call rd501_fnc_incrementStitchProgress
  44. }] call CBA_fnc_addEventHandler;
  45. ["rd501_medical_ccp_incrementBandage",{
  46. _this call rd501_fnc_incrementBandageProgress
  47. }] call CBA_fnc_addEventHandler;
  48. ["rd501_medical_ccp_deployCCPLocal", {
  49. _this call rd501_fnc_deployCCPLocal;
  50. }] call CBA_fnc_addEventHandler;
  51. ["rd501_medical_ccp_deployCCPServer", {
  52. _this call rd501_fnc_deployCCPServer;
  53. }] call CBA_fnc_addEventHandler;
  54. ["rd501_medical_ccp_packupCCPServer", {
  55. _this call rd501_fnc_packupCCPServer;
  56. }] call CBA_fnc_addEventHandler;
  57. if(!isDedicated) then {
  58. [
  59. "RD501 Miscellaneous",
  60. "rd501_misc",
  61. [
  62. "Mark Dot",
  63. "Place a black dot in global at your current position"
  64. ],
  65. {
  66. [] call rd501_fnc_placeDotMarkerAtSelf;
  67. },
  68. "",
  69. [
  70. DIK_CALCULATOR,
  71. [false,false,false]
  72. ],
  73. false
  74. ] call cba_fnc_addKeybind;
  75. };
  76. // Surrender stun
  77. call macro_fnc_name(stun);
  78. // Jammers
  79. ["rd501_jammersClear", {
  80. _this call rd501_fnc_jammersClear;
  81. }] call CBA_fnc_addEventHandler;
  82. ["rd501_jammersAddServer", {
  83. _this call rd501_fnc_jammersAddServer;
  84. }] call CBA_fnc_addEventHandler;
  85. ["rd501_jammersRemoveServer", {
  86. _this call rd501_fnc_jammersRemoveServer;
  87. }] call CBA_fnc_addEventHandler;
  88. ["rd501_jammersUpdateLocal", {
  89. _this call rd501_fnc_jammersUpdateLocal;
  90. }] call CBA_fnc_addEventHandler;
  91. // Fired Deployables
  92. if(isServer) then {
  93. ["rd501_fired_deployable_deployServer", {
  94. _this call rd501_fnc_fired_deployable_deployServer
  95. }] call CBA_fnc_addEventHandler;
  96. ["rd501_fired_deployable_personalShieldDeployServer", {
  97. _this call rd501_fnc_fired_deployable_personalShieldDeployServer
  98. }] call CBA_fnc_addEventHandler;
  99. };
  100. if(hasInterface) then {
  101. ["ace_firedPlayer", {
  102. _this call rd501_fnc_fired_deployable_firedHandler
  103. }] call CBA_fnc_addEventHandler;
  104. ["rd501_fired_deployable_soundLoop", {
  105. _this call rd501_fnc_fired_deployable_loopSoundLocal
  106. }] call CBA_fnc_addEventHandler;
  107. ["rd501_fired_deployable_soundEnd", {
  108. _this call rd501_fnc_fired_deployable_endSoundLocal
  109. }] call CBA_fnc_addEventHandler;
  110. };
  111. // Volatile
  112. ["rd501_volatile_destroy", {
  113. _this call rd501_fnc_volatile_destroy;
  114. }] call CBA_fnc_addEventHandler;
  115. ["rd501_volatile_create", {
  116. _this call rd501_fnc_volatile_create;
  117. }] call CBA_fnc_addEventHandler;
  118. // Shield
  119. ["rd501_shield_destroy", {
  120. _this call rd501_fnc_shield_onDestroy;
  121. }] call CBA_fnc_addEventHandler;
  122. ["rd501_shield_lowHealth", {
  123. _this call rd501_fnc_shield_onLowHealth;
  124. }] call CBA_fnc_addEventHandler;
  125. ["rd501_shield_normalHealth", {
  126. _this call rd501_fnc_shield_onNormalHealth;
  127. }] call CBA_fnc_addEventHandler;
  128. // Vehicle EMP
  129. ["All", "HitPart", {
  130. _this call rd501_fnc_emp_hitHandler;
  131. }] call CBA_fnc_addClassEventHandler;
  132. ["rd501_emp_vehicle_hit", {
  133. _this call rd501_fnc_emp_hitVehicle;
  134. }] call CBA_fnc_addEventHandler;