mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
99c85e3c12
* move overheating cookoff into separate function * move heatCoef and require mission restart for setting change - move heatCoef to a more sensible place - require mission restart for heatCoef setting change (it gets cached per ammo type) * add exit to ammo temp loop if cookoffCoef is changed to 0 mid-mission - add exit to ammo temp loop if cookoffCoef is changed to 0 mid-mission, this prevents an issue where all weapon cookoff regardless of temp, because required temp gets multiplied by cookoffCoef which has been set to 0. * file end new line * update header for ace_overheating_fnc_cookoffWeapon * use ambientTemperature as floor for weapon and ammo temp * add coolingCoef setting * improve feature documentation * add fnc_cookoffWeapon to XEH_PREP * add type of jam to ace_weaponJammed local event - add type of jam to ace_weaponJammed local event - fix #8637 * fix misspelling Co-authored-by: TyroneMF <TyroneMF@hotmail.com> * clear all weapon heat on death * Update addons/overheating/functions/fnc_updateTemperature.sqf Co-authored-by: GhostIsSpooky <69561145+Salluci@users.noreply.github.com> * deprecate ace_overheating_fnc_getBarrelMass, cache weapon bolt and barrel mass values - cache closed bolt value by moving config look up to ace_overheating_fnc_getWeaponData - cache barrel mass value by moving calculation from ace_overheating_fnc_getBarrelMass to ace_overheating_fnc_getWeaponData - deprecate ace_overheating_fnc_getBarrelMass to be a wrapper for ace_overheating_fnc_getWeaponData that only returns barrel mass * add public functions to get and set weapon and ammo temperature * add `canCoolWeaponWithItem` function, workaround for #8657 * Apply suggestions from code review Co-authored-by: PabstMirror <pabstmirror@gmail.com> * add coef setting for addition heat from suppressor * Update fnc_overheat.sqf * improve fnc_canCoolWeaponWithItem * remove extra ( * Move canCoolWeaponWithItem action code to function * Use hashmaps and reset on settings change * Apply suggestions from code review Co-authored-by: jonpas <jonpas33@gmail.com> Co-authored-by: TyroneMF <TyroneMF@hotmail.com> Co-authored-by: GhostIsSpooky <69561145+Salluci@users.noreply.github.com> Co-authored-by: PabstMirror <pabstmirror@gmail.com> Co-authored-by: jonpas <jonpas33@gmail.com>
146 lines
6.0 KiB
C++
146 lines
6.0 KiB
C++
class CfgVehicles {
|
|
class Man;
|
|
|
|
class CAManBase: Man {
|
|
class ACE_SelfActions {
|
|
class ACE_Equipment {
|
|
class GVAR(UnJam) {
|
|
displayName = CSTRING(UnjamWeapon);
|
|
condition = QUOTE( GVAR(enabled) && {[_player] call FUNC(canUnjam)} );
|
|
exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
|
|
statement = QUOTE( [ARR_2(_player, currentMuzzle _player)] call FUNC(clearJam); );
|
|
showDisabled = 0;
|
|
icon = QPATHTOEF(common,UI\repack_ca.paa);
|
|
};
|
|
class GVAR(SwapBarrel) {
|
|
displayName = CSTRING(SwapBarrel);
|
|
condition = QUOTE( [ARR_2(_player, currentWeapon _player)] call FUNC(canSwapBarrel) );
|
|
exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
|
|
statement = QUOTE( [ARR_3(_player, _player, currentWeapon _player)] call FUNC(swapBarrel); );
|
|
showDisabled = 0;
|
|
icon = QPATHTOF(UI\spare_barrel_ca.paa);
|
|
};
|
|
class GVAR(CheckTemperature) {
|
|
displayName = CSTRING(CheckTemperatureShort);
|
|
condition = QUOTE( GVAR(enabled) && {switch (currentWeapon _player) do {case (''): {false}; case (primaryWeapon _player); case (handgunWeapon _player): {true}; default {false}}} );
|
|
exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
|
|
statement = QUOTE( [ARR_3(_player, _player, currentWeapon _player)] call FUNC(checkTemperature); );
|
|
showDisabled = 0;
|
|
icon = QPATHTOF(UI\temp_ca.paa);
|
|
};
|
|
class GVAR(CheckTemperatureSpareBarrels) {
|
|
displayName = CSTRING(CheckTemperatureSpareBarrelsShort);
|
|
condition = QUOTE((_player) call FUNC(canCheckSpareBarrelsTemperatures) );
|
|
exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
|
|
statement = QUOTE( [_player] call FUNC(checkSpareBarrelsTemperatures); );
|
|
showDisabled = 0;
|
|
icon = QUOTE(PATHTOF(UI\temp_ca.paa));
|
|
};
|
|
class GVAR(CoolWeaponWithItem) {
|
|
displayName = CSTRING(CoolWeaponWithItem);
|
|
condition = QUOTE(call FUNC(canCoolWeaponWithItem));
|
|
exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
|
|
statement = "true";
|
|
showDisabled = 0;
|
|
insertChildren = QUOTE(_player call FUNC(getConsumableChildren));
|
|
icon = QPATHTOF(UI\pour_water_ca.paa);
|
|
};
|
|
};
|
|
};
|
|
|
|
class ACE_Actions {
|
|
class ACE_Weapon {
|
|
class GVAR(SwapBarrel) {
|
|
displayName = CSTRING(SwapBarrel);
|
|
condition = QUOTE( [ARR_2(_player, currentWeapon _target)] call FUNC(canSwapBarrel) );
|
|
statement = QUOTE([ARR_3(_player, _target, currentWeapon _target)] call FUNC(swapBarrelAssistant););
|
|
exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
|
|
icon = QUOTE(PATHTOF(UI\spare_barrel_ca.paa));
|
|
};
|
|
class GVAR(CheckTemperature) {
|
|
displayName = CSTRING(CheckTemperatureShort);
|
|
condition = QUOTE( GVAR(enabled) && {switch (currentWeapon _target) do {case ('ACE_FakePrimaryWeapon'); case (''): {false}; case (primaryWeapon _target); case (handgunWeapon _target): {true}; default {false}}} );
|
|
exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
|
|
statement = QUOTE( [ARR_3(_player, _target, currentWeapon _target)] call FUNC(checkTemperature); );
|
|
icon = QUOTE(PATHTOF(UI\temp_ca.paa));
|
|
};
|
|
class GVAR(CoolWeaponWithItem) {
|
|
displayName = CSTRING(CoolWeaponWithItem);
|
|
condition = QUOTE(call FUNC(canCoolWeaponWithItem));
|
|
exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
|
|
statement = "true";
|
|
showDisabled = 0;
|
|
insertChildren = QUOTE(_player call FUNC(getConsumableChildren));
|
|
icon = QPATHTOF(UI\pour_water_ca.paa);
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
class ReammoBox_F;
|
|
class NATO_Box_Base;
|
|
class EAST_Box_Base;
|
|
class IND_Box_Base;
|
|
class FIA_Box_Base_F;
|
|
|
|
class Box_NATO_Support_F: NATO_Box_Base {
|
|
class TransportMagazines {
|
|
MACRO_ADDMAGAZINE(ACE_SpareBarrel,2);
|
|
};
|
|
};
|
|
|
|
class B_supplyCrate_F: ReammoBox_F {
|
|
class TransportMagazines {
|
|
MACRO_ADDMAGAZINE(ACE_SpareBarrel,2);
|
|
};
|
|
};
|
|
|
|
class Box_East_Support_F: EAST_Box_Base {
|
|
class TransportMagazines {
|
|
MACRO_ADDMAGAZINE(ACE_SpareBarrel,2);
|
|
};
|
|
};
|
|
|
|
class O_supplyCrate_F: B_supplyCrate_F {
|
|
class TransportMagazines {
|
|
MACRO_ADDMAGAZINE(ACE_SpareBarrel,2);
|
|
};
|
|
};
|
|
|
|
class Box_IND_Support_F: IND_Box_Base {
|
|
class TransportMagazines {
|
|
MACRO_ADDMAGAZINE(ACE_SpareBarrel,2);
|
|
};
|
|
};
|
|
|
|
class Box_FIA_Support_F: FIA_Box_Base_F {
|
|
class TransportMagazines {
|
|
MACRO_ADDMAGAZINE(ACE_SpareBarrel,2);
|
|
};
|
|
};
|
|
|
|
class I_supplyCrate_F: B_supplyCrate_F {
|
|
class TransportMagazines {
|
|
MACRO_ADDMAGAZINE(ACE_SpareBarrel,2);
|
|
};
|
|
};
|
|
|
|
class IG_supplyCrate_F: ReammoBox_F {
|
|
class TransportMagazines {
|
|
MACRO_ADDMAGAZINE(ACE_SpareBarrel,2);
|
|
};
|
|
};
|
|
|
|
class C_supplyCrate_F: ReammoBox_F {
|
|
class TransportMagazines {
|
|
MACRO_ADDMAGAZINE(ACE_SpareBarrel,2);
|
|
};
|
|
};
|
|
|
|
class ACE_Box_Misc: Box_NATO_Support_F {
|
|
class TransportMagazines {
|
|
MACRO_ADDMAGAZINE(ACE_SpareBarrel,6);
|
|
};
|
|
};
|
|
};
|