XEH_postinit.sqf 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. #include "config_macros.hpp"
  2. //Run the jumppack script
  3. [] spawn {
  4. [] spawn compile preprocessFileLineNumbers 'macro_mod_script_path\jumppack\jumppack.sqf';
  5. sleep 0.5;
  6. call compile preprocessFileLineNumbers 'macro_mod_script_path\jumppack\jumppack_effects.sqf';
  7. };
  8. // Add nightvision event handler
  9. call macro_fnc_name(nightvision);
  10. #define QWEAP_NOFAM(name) macro_quote(macro_new_weapon_nofam(name))
  11. #define QWEAP_LAUNCH(name) macro_quote(macro_new_weapon(launcher,name))
  12. // Drone Recharge
  13. RD501_DRONE_BATTERY = "RD501_r2_charge_pack_x10_mag";
  14. //Force Walk
  15. RD501_FORCE_WALK_WEAPONS = [macro_quote(macro_new_weapon_nofam(z1000))];
  16. ["weapon", macro_fnc_name(heavyWeaponHandlePlayerWeaponChanged)] call CBA_fnc_addPlayerEventHandler;
  17. //Auto Reload On Equip
  18. RD501_AUTO_RELOAD_ON_EQUIP = [QWEAP_NOFAM(z1000),QWEAP_LAUNCH(rps1)];
  19. ["weapon", macro_fnc_name(reloadWeaponOnFirstSelected)] call CBA_fnc_addPlayerEventHandler;
  20. // Magclamp
  21. call macro_fnc_name(magclamp);
  22. // Check every second for if the Loading Screen is still up and forcibly end it.
  23. _fnc_endLoadingScreen = {
  24. params ["_args", "_handle"];
  25. systemChat format["Ending LoadingScreen [Handle %1]", _handle];
  26. endLoadingScreen;
  27. _stillLoading = call BIS_fnc_isLoading;
  28. if(!_stillLoading) exitWith {
  29. [_handle] call CBA_fnc_removePerFrameHandler;
  30. };
  31. };
  32. [_fnc_endLoadingScreen, 5, []] call CBA_fnc_addPerFrameHandler;
  33. // Flip Backpack
  34. rd501_flip_vehicle_validBackpacks = ["RD501_JLTS_Clone_Flip_backpack"];
  35. ["rd501_external_reload", { _this call rd501_fnc_onReloadExternalHandler }, []] call CBA_fnc_addEventHandlerArgs;
  36. // Fortify Tool Adjustments
  37. call macro_fnc_name(fortify_tool);
  38. // Medical CCP Building
  39. rd501_medical_ccp_building = "Land_Medevac_house_V1_F";
  40. rd501_medical_ccp_classes = ["Land_Medevac_house_V1_F"];
  41. rd501_medical_ccp_stitchDurationSeconds = 10;
  42. rd501_medical_ccp_bandageDurationSeconds = 10;
  43. ["rd501_medical_ccp_incrementStitch",{
  44. _this call rd501_fnc_incrementStitchProgress
  45. }] call CBA_fnc_addEventHandler;
  46. ["rd501_medical_ccp_incrementBandage",{
  47. _this call rd501_fnc_incrementBandageProgress
  48. }] call CBA_fnc_addEventHandler;
  49. ["rd501_medical_ccp_deployCCPLocal", {
  50. _this call rd501_fnc_deployCCPLocal;
  51. }] call CBA_fnc_addEventHandler;
  52. ["rd501_medical_ccp_deployCCPServer", {
  53. _this call rd501_fnc_deployCCPServer;
  54. }] call CBA_fnc_addEventHandler;
  55. // Surrender stun
  56. call macro_fnc_name(stun);
  57. // Jammers
  58. ["rd501_addJammerLocal", {
  59. _this call rd501_fnc_addJammerLocal
  60. }] call CBA_fnc_addEventHandler;
  61. ["rd501_clearAllJammers", {
  62. _this call rd501_fnc_clearAllJammers
  63. }] call CBA_fnc_addEventHandler;
  64. ["rd501_jammerServerPFH", {
  65. [{
  66. _this call rd501_fnc_jammersServerPFH
  67. }, 1] call CBA_fnc_addPerFrameHandler;
  68. }] call CBA_fnc_addEventHandler;
  69. // Fired Deployables
  70. if(isServer) then {
  71. ["rd501_fired_deployable_deployServer", {
  72. _this call rd501_fnc_fired_deployable_deployServer
  73. }] call CBA_fnc_addEventHandler;
  74. ["rd501_fired_deployable_personalShieldDeployServer", {
  75. _this call rd501_fnc_fired_deployable_personalShieldDeployServer
  76. }] call CBA_fnc_addEventHandler;
  77. };
  78. if(hasInterface) then {
  79. ["ace_firedPlayer", {
  80. _this call rd501_fnc_fired_deployable_firedHandler
  81. }] call CBA_fnc_addEventHandler;
  82. ["rd501_fired_deployable_soundLoop", {
  83. _this call rd501_fnc_fired_deployable_loopSoundLocal
  84. }] call CBA_fnc_addEventHandler;
  85. ["rd501_fired_deployable_soundEnd", {
  86. _this call rd501_fnc_fired_deployable_endSoundLocal
  87. }] call CBA_fnc_addEventHandler;
  88. };
  89. // Volatile
  90. ["rd501_volatile_destroy", {
  91. _this call rd501_fnc_volatile_destroy;
  92. }] call CBA_fnc_addEventHandler;
  93. ["rd501_volatile_create", {
  94. _this call rd501_fnc_volatile_create;
  95. }] call CBA_fnc_addEventHandler;