XEH_postinit.sqf 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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. //Force Walk
  16. RD501_FORCE_WALK_WEAPONS = [macro_quote(macro_new_weapon_nofam(z1000))];
  17. ["weapon", macro_fnc_name(heavyWeaponHandlePlayerWeaponChanged)] call CBA_fnc_addPlayerEventHandler;
  18. //Auto Reload On Equip
  19. RD501_AUTO_RELOAD_ON_EQUIP = [QWEAP_NOFAM(z1000),QWEAP_LAUNCH(rps1)];
  20. ["weapon", macro_fnc_name(reloadWeaponOnFirstSelected)] call CBA_fnc_addPlayerEventHandler;
  21. // Magclamp
  22. call macro_fnc_name(magclamp);
  23. // Check every second for if the Loading Screen is still up and forcibly end it.
  24. _fnc_endLoadingScreen = {
  25. params ["_args", "_handle"];
  26. systemChat format["Ending LoadingScreen [Handle %1]", _handle];
  27. endLoadingScreen;
  28. _stillLoading = call BIS_fnc_isLoading;
  29. if(!_stillLoading) exitWith {
  30. [_handle] call CBA_fnc_removePerFrameHandler;
  31. };
  32. };
  33. [_fnc_endLoadingScreen, 5, []] call CBA_fnc_addPerFrameHandler;
  34. // Flip Backpack
  35. rd501_flip_vehicle_validBackpacks = ["RD501_JLTS_Clone_Flip_backpack"];
  36. ["rd501_external_reload", { _this call rd501_fnc_onReloadExternalHandler }, []] call CBA_fnc_addEventHandlerArgs;
  37. // Fortify Tool Adjustments
  38. call macro_fnc_name(fortify_tool);
  39. // Medical CCP Building
  40. rd501_medical_ccp_building = "Land_Medevac_house_V1_F";
  41. rd501_medical_ccp_classes = ["Land_Medevac_house_V1_F"];
  42. rd501_medical_ccp_truck = "rd501_mash_truck";
  43. rd501_medical_ccp_stitchDurationSeconds = 5;
  44. rd501_medical_ccp_bandageDurationSeconds = 5;
  45. ["rd501_medical_ccp_incrementStitch",{
  46. _this call rd501_fnc_incrementStitchProgress
  47. }] call CBA_fnc_addEventHandler;
  48. ["rd501_medical_ccp_incrementBandage",{
  49. _this call rd501_fnc_incrementBandageProgress
  50. }] call CBA_fnc_addEventHandler;
  51. ["rd501_medical_ccp_deployCCPLocal", {
  52. _this call rd501_fnc_deployCCPLocal;
  53. }] call CBA_fnc_addEventHandler;
  54. ["rd501_medical_ccp_deployCCPServer", {
  55. _this call rd501_fnc_deployCCPServer;
  56. }] call CBA_fnc_addEventHandler;
  57. ["rd501_medical_ccp_packupCCPServer", {
  58. _this call rd501_fnc_packupCCPServer;
  59. }] call CBA_fnc_addEventHandler;
  60. if(!isDedicated) then {
  61. [
  62. "RD501 Miscellaneous",
  63. "rd501_misc",
  64. [
  65. "Mark Dot",
  66. "Place a black dot in global at your current position"
  67. ],
  68. {
  69. [] call rd501_fnc_placeDotMarkerAtSelf;
  70. },
  71. "",
  72. [
  73. DIK_CALCULATOR,
  74. [false,false,false]
  75. ],
  76. false
  77. ] call cba_fnc_addKeybind;
  78. };
  79. // Surrender stun
  80. call macro_fnc_name(stun);
  81. // Jammers
  82. ["rd501_jammersClear", {
  83. _this call rd501_fnc_jammersClear;
  84. }] call CBA_fnc_addEventHandler;
  85. ["rd501_jammersAddServer", {
  86. _this call rd501_fnc_jammersAddServer;
  87. }] call CBA_fnc_addEventHandler;
  88. ["rd501_jammersRemoveServer", {
  89. _this call rd501_fnc_jammersRemoveServer;
  90. }] call CBA_fnc_addEventHandler;
  91. ["rd501_jammersUpdateLocal", {
  92. _this call rd501_fnc_jammersUpdateLocal;
  93. }] call CBA_fnc_addEventHandler;
  94. // Fired Deployables
  95. if(isServer) then {
  96. ["rd501_fired_deployable_deployServer", {
  97. _this call rd501_fnc_fired_deployable_deployServer
  98. }] call CBA_fnc_addEventHandler;
  99. ["rd501_fired_deployable_personalShieldDeployServer", {
  100. _this call rd501_fnc_fired_deployable_personalShieldDeployServer
  101. }] call CBA_fnc_addEventHandler;
  102. };
  103. if(hasInterface) then {
  104. ["ace_firedPlayer", {
  105. _this call rd501_fnc_fired_deployable_firedHandler
  106. }] call CBA_fnc_addEventHandler;
  107. ["rd501_fired_deployable_soundLoop", {
  108. _this call rd501_fnc_fired_deployable_loopSoundLocal
  109. }] call CBA_fnc_addEventHandler;
  110. ["rd501_fired_deployable_soundEnd", {
  111. _this call rd501_fnc_fired_deployable_endSoundLocal
  112. }] call CBA_fnc_addEventHandler;
  113. };
  114. // Volatile
  115. ["rd501_volatile_destroy", {
  116. _this call rd501_fnc_volatile_destroy;
  117. }] call CBA_fnc_addEventHandler;
  118. ["rd501_volatile_create", {
  119. _this call rd501_fnc_volatile_create;
  120. }] call CBA_fnc_addEventHandler;
  121. // Shield
  122. ["rd501_shield_destroy", {
  123. _this call rd501_fnc_shield_onDestroy;
  124. }] call CBA_fnc_addEventHandler;
  125. ["rd501_shield_lowHealth", {
  126. _this call rd501_fnc_shield_onLowHealth;
  127. }] call CBA_fnc_addEventHandler;
  128. ["rd501_shield_normalHealth", {
  129. _this call rd501_fnc_shield_onNormalHealth;
  130. }] call CBA_fnc_addEventHandler;