XEH_postinit.sqf 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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_addJammerLocal", {
  83. _this call rd501_fnc_addJammerLocal
  84. }] call CBA_fnc_addEventHandler;
  85. ["rd501_clearAllJammers", {
  86. _this call rd501_fnc_clearAllJammers
  87. }] call CBA_fnc_addEventHandler;
  88. ["rd501_jammerServerPFH", {
  89. [{
  90. _this call rd501_fnc_jammersServerPFH
  91. }, 1] call CBA_fnc_addPerFrameHandler;
  92. }] call CBA_fnc_addEventHandler;
  93. // Fired Deployables
  94. if(isServer) then {
  95. ["rd501_fired_deployable_deployServer", {
  96. _this call rd501_fnc_fired_deployable_deployServer
  97. }] call CBA_fnc_addEventHandler;
  98. ["rd501_fired_deployable_personalShieldDeployServer", {
  99. _this call rd501_fnc_fired_deployable_personalShieldDeployServer
  100. }] call CBA_fnc_addEventHandler;
  101. };
  102. if(hasInterface) then {
  103. ["ace_firedPlayer", {
  104. _this call rd501_fnc_fired_deployable_firedHandler
  105. }] call CBA_fnc_addEventHandler;
  106. ["rd501_fired_deployable_soundLoop", {
  107. _this call rd501_fnc_fired_deployable_loopSoundLocal
  108. }] call CBA_fnc_addEventHandler;
  109. ["rd501_fired_deployable_soundEnd", {
  110. _this call rd501_fnc_fired_deployable_endSoundLocal
  111. }] call CBA_fnc_addEventHandler;
  112. };
  113. // Volatile
  114. ["rd501_volatile_destroy", {
  115. _this call rd501_fnc_volatile_destroy;
  116. }] call CBA_fnc_addEventHandler;
  117. ["rd501_volatile_create", {
  118. _this call rd501_fnc_volatile_create;
  119. }] call CBA_fnc_addEventHandler;