Skip to content

Commit 1102ddd

Browse files
committed
1.0 release
1 parent 876e261 commit 1102ddd

14 files changed

Lines changed: 697 additions & 39 deletions

File tree

.hemtt/project.toml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@ mainprefix = "z"
1010
[files]
1111
include = [
1212
"mod.cpp",
13-
# "README.md",
14-
# "LICENSE.md",
15-
# "KAMLogoLowRes.paa",
16-
# "KAMLogoHighRes.paa",
17-
# "AUTHORS.txt"
13+
"README.md",
14+
"LICENSE.md",
15+
"Icon.paa",
1816
]
1917

2018
[version]

Icon.paa

41.4 KB
Binary file not shown.

addons/main/XEH_postInit.sqf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include "script_component.hpp"
2-
#include "\a3\ui_f\hpp\defineDIKCodes.inc"
2+
#include "\a3\ui_f\hpp\defineDIKCodes.inc"
33

44
//////////////////////////////////////////////////
55
// CBA key input handling
@@ -16,9 +16,13 @@ GVAR(deviceKeyCurrentIndex) = -1;
1616
// Conditions:
1717
if !([ACE_player, objNull, ["isNotInside"]] call ACEFUNC(common,canInteractWith)) exitWith {false};
1818

19+
private _allowedWeapons = ['AssaultRifle', 'Handgun', 'Rifle', 'SubmachineGun', 'SniperRifle'];
1920
private _currentWeapon = currentWeapon ACE_player;
21+
private _currentWeaponType = _currentWeapon call BIS_fnc_itemType;
2022
if !(_currentWeapon != primaryWeapon _unit && {_currentWeapon != handgunWeapon _unit} && {_currentWeapon != secondaryWeapon _unit}) exitWith {false};
2123

24+
if (!((_currentWeaponType select 1) in _allowedWeapons) && !(missionNamespace getVariable [QGVAR(allowAllWeapons), false])) exitWith {false};
25+
2226
private _currentMuzzle = currentMuzzle ACE_player;
2327
private _currentAmmoCount = ACE_player ammo _currentMuzzle;
2428
if (_currentAmmoCount < 1) exitWith {false};

addons/main/XEH_preInit.sqf

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,17 @@ PREP_RECOMPILE_END;
88

99
#define CBA_SETTINGS_CHEM "DiGii - FastReload"
1010

11-
/*
1211
[
13-
QGVAR(availGasmask),
14-
"EDITBOX",
15-
[LLSTRING(SETTING_AVAIL_GASMASK), LLSTRING(SETTING_AVAIL_GASMASK_DISC)],
12+
QGVAR(allowAllWeapons),
13+
"CHECKBOX",
14+
["Allow all Weapons","If enabled you can fast realod any weapon you can carry."],
1615
CBA_SETTINGS_CHEM,
17-
"'G_AirPurifyingRespirator_01_F'",
18-
1,
16+
false,
17+
true,
1918
{
20-
private _array = [_this, "CfgGlasses"] call FUNC(getList);
21-
missionNamespace setVariable [QGVAR(availGasmaskList), _array, true];
22-
},
23-
true
24-
] call CBA_Settings_fnc_init;*/
19+
missionNamespace setVariable [QGVAR(allowAllWeapons), _this, true];
20+
}
21+
] call CBA_Settings_fnc_init;
2522

2623

2724
ADDON = true;

addons/main/functions/fnc_fastReload.sqf

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,38 +13,39 @@
1313
* None
1414
*
1515
* Example:
16-
* [ACE_player, currentWeapon ACE_player, currentMuzzle ACE_player, 23] call digii_main_fnc_fastReload;
16+
* [player, currentWeapon player, currentMuzzle player, 23] call digii_main_fnc_fastReload;
1717
*
1818
* Public: No
1919
*/
2020

2121

2222
params ["_unit", "_weapon", ["_muzzle", _weapon], ["_ammoCount", _unit ammo _muzzle ]];
2323

24-
private _delay = 2;
24+
private _delay = 1.8;
2525
[_unit, "ReloadMagazine", 1] call ACEFUNC(common,doGesture);
2626

27-
[{
28-
params ["_unit", "_weapon", "_ammoCount", "_muzzle"];
29-
30-
// remove weapon item
31-
private _magazineClass = currentMagazine _unit;
32-
33-
switch true do {
34-
case (_weapon == primaryWeapon _unit): {
35-
_unit removePrimaryWeaponItem _magazineClass;
36-
};
37-
case (_weapon == handgunWeapon _unit): {
38-
_unit removeHandgunItem _magazineClass;
39-
};
40-
case (_weapon == secondaryWeapon _unit): {
41-
_unit removeSecondaryWeaponItem _magazineClass;
42-
};
27+
// remove weapon item
28+
private _magazineClass = currentMagazine _unit;
29+
30+
switch true do {
31+
case (_weapon == primaryWeapon _unit): {
32+
_unit removePrimaryWeaponItem _magazineClass;
33+
};
34+
case (_weapon == handgunWeapon _unit): {
35+
_unit removeHandgunItem _magazineClass;
36+
};
37+
case (_weapon == secondaryWeapon _unit): {
38+
_unit removeSecondaryWeaponItem _magazineClass;
4339
};
40+
};
41+
42+
private _weaponHolder = createVehicle ["Weapon_Empty", getPosATL _unit, [], 0, "CAN_COLLIDE"];
43+
_weaponHolder addMagazineAmmoCargo [_magazineClass, 1, _ammoCount];
44+
45+
[{
46+
params ["_unit", "_weapon", "_ammoCount", "_muzzle"];
4447

45-
private _weaponHolder = createVehicle ["Weapon_Empty", getPosATL _unit, [], 0, "CAN_COLLIDE"];
46-
_weaponHolder addMagazineAmmoCargo [_magazineClass, 1, _ammoCount];
47-
48+
_unit switchAction "";
4849

4950
private _currentMagazines = magazinesAmmo _unit;
5051
private _compatibleMagazines = compatibleMagazines _weapon;

addons/main/functions/fnc_init.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* NONE
1010
*
1111
* Example:
12-
* [] call kat_chemical_fnc_init;
12+
* [] call digii_main_fnc_init;
1313
*
1414
* Public: No
1515
*/

mod.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name = "DIGii - Fast Reload";
2+
dir = "@digii_fastreload";
3+
picture = "Icon.paa";
4+
actionName = "Github";
5+
action = "https://github.com/AtrixZockt/DiGii-FastReload";
6+
logo = "Icon.paa";
7+
logoOver = "Icon.paa";
8+
tooltip = "DiGii - Fast Reload";
9+
tooltipOwned = "DiGii - Fast Reload";
10+
overview = "";
11+
author = "DiGii";
12+
overviewPicture = "Icon.paa";
13+
overviewText = "DiGii - Fast Reload";
14+
overviewFootnote = "";
41.4 KB
Binary file not shown.

0 commit comments

Comments
 (0)