Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overheating - Fix errors, improve documentation, change ACEX references for integration #8522

Merged
merged 11 commits into from
Oct 17, 2021
2 changes: 1 addition & 1 deletion addons/overheating/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ if (hasInterface) then {
_CoolWeaponWithWaterSourceAction = [
QGVAR(CoolWeaponWithWaterSource),
LLSTRING(CoolWeaponWithWaterSource),
"\z\acex\addons\field_rations\ui\icon_water_tap.paa",
"\z\ace\addons\field_rations\ui\icon_water_tap.paa",
Drofseh marked this conversation as resolved.
Show resolved Hide resolved
{
private _waterSource = _target getVariable ["acex_field_rations_waterSource", objNull];
[_player, _waterSource] call FUNC(coolWeaponWithWaterSource);
Expand Down
2 changes: 1 addition & 1 deletion addons/overheating/functions/fnc_jamWeapon.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ _unit setVariable [QGVAR(jammedWeapons), _jammedWeapons];
private _temp = 1 max (_unit getVariable [format [QGVAR(%1_temp), _weapon], 0]);
private _jamTypesAllowed = getArray (configFile >> 'CfgWeapons' >> currentWeapon _player >> QGVAR(jamTypesAllowed));
Drofseh marked this conversation as resolved.
Show resolved Hide resolved

if (_jamTypesAllowed == []) then {
if (_jamTypesAllowed isEqualTo []) then {
_jamTypesAllowed = ["Eject", 1, "Extract", 1, "Feed", 1, "Fire", 1, "Dud", (5 / (_temp / 5))];
} else {
for "_i" from count _jamTypesAllowed to 1 step -1 do {
Expand Down
10 changes: 7 additions & 3 deletions docs/wiki/feature/overheating.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ version:

### 1.1 Weapon Jamming

Adds a probability to jam a weapon when firing. Jams can be cleared by reloading, using the clear jam-key, or using the self interaction menu.
Adds a probability to jam a weapon when firing. The hotter a weapon gets, the more likely a jam is to occur.

### 1.2 Temperature simulation

Expand All @@ -28,13 +28,17 @@ Hot weapons can also cause chambered ammunition to spontaneously ignite. The hig

### 1.4 Spare barrels

Adds the ability to changes barrels on machine guns to compensate for those effects. Changing the barrel can also unjam the gun.
Adds the ability to change barrels on machine guns to compensate for those effects. When a barrel is changed, the coolest barrel available is always selected.

## 2. Usage

### 2.1 Clearing a jammed weapon

- To clear a jammed weapon, press <kbd>SHIFT</kbd> + <kbd>R</kbd> (ACE3 default key bind `Clear jam`).
Jams can be cleared in the following ways:
- Press <kbd>SHIFT</kbd> + <kbd>R</kbd> (ACE3 default key bind `Clear jam`).
- Press self interaction <kbd>Ctrl</kbd> + <kbd>⊞&nbsp;Win</kbd> (ACE3 default key bind `Self Interaction Key`), select `Equipment`, select 'Clear Jam'
- Reload (setting dependant)
- Swap barrels (setting dependant)
Drofseh marked this conversation as resolved.
Show resolved Hide resolved

### 2.2 Swapping barrels

Expand Down
11 changes: 7 additions & 4 deletions docs/wiki/framework/overheating-framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ version:

```cpp
class CfgWeapons {
class MyMG {
class Rifle_Long_Base_F ;

class MyMG : Rifle_Long_Base_F {
ace_overheating_mrbs = 3000; //Mean Rounds Between Stoppages (this will be scaled based on the barrel temp)
ace_overheating_slowdownFactor = 1; //Slowdown Factor (this will be scaled based on the barrel temp)
ace_overheating_slowdownFactor = 1; //Slowdown Factor, reduces the velocity of the projectile (this will be scaled based on the barrel temp)
ace_overheating_allowSwapBarrel = 1; // 1 to enable barrel swap. 0 to disable. Meant for machine guns where you can easily swap the barrel without dismantling the whole weapon.
ace_overheating_dispersion = 0.75; //Dispersion Factor (this will be scaled based on the barrel temp)
ace_overheating_dispersion = 0.75; //Dispersion Factor, increases the dispersion of the projectile (this will be scaled based on the barrel temp)
};
};
```
Expand All @@ -33,8 +35,9 @@ class CfgWeapons {
class CfgWeapons {
class Pistol_Base_F;
class MyRevolver : Pistol_Base_F {
ace_overheating_jamTypesAllowed = ["Fire","Dud"]; //Allowed and default values are ["Eject", "Extract", "Feed", "Fire", "Dud"]. In the example here a revolver does not eject, extract, or feed on each shot to those values are removed.
ace_overheating_jamTypesAllowed = ["Fire","Dud"]; //Allowed and default values are ["Eject", "Extract", "Feed", "Fire", "Dud"]. In the example here a revolver does not eject, extract, or feed on each shot so those values are removed.
};
};
```
### 1.3 Custom jam clearing animation

Expand Down