Merge branch 'acemod:master' into master

This commit is contained in:
lambdatiger 2024-03-21 20:26:38 -05:00 committed by GitHub
commit e1d085cbd7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
34 changed files with 356 additions and 133 deletions

View File

@ -2,35 +2,6 @@
if (!hasInterface) exitWith {}; if (!hasInterface) exitWith {};
["baseline", {
private _fatigue = ACE_player getVariable [QGVAR(aimFatigue), 0];
switch (stance ACE_player) do {
case ("CROUCH"): {
(1.0 + _fatigue ^ 2 * 0.1)
};
case ("PRONE"): {
(1.0 + _fatigue ^ 2 * 2.0)
};
default {
(1.5 + _fatigue ^ 2 * 3.0)
};
};
}, QUOTE(ADDON)] call EFUNC(common,addSwayFactor);
["multiplier", {
switch (true) do {
case (isWeaponRested ACE_player): {
GVAR(swayFactor) * GVAR(restedSwayFactor)
};
case (isWeaponDeployed ACE_player): {
GVAR(swayFactor) * GVAR(deployedSwayFactor)
};
default {
GVAR(swayFactor)
};
};
}, QUOTE(ADDON)] call EFUNC(common,addSwayFactor);
// recheck weapon inertia after weapon swap, change of attachments or switching unit // recheck weapon inertia after weapon swap, change of attachments or switching unit
["weapon", {[ACE_player] call FUNC(getWeaponInertia)}, true] call CBA_fnc_addPlayerEventHandler; ["weapon", {[ACE_player] call FUNC(getWeaponInertia)}, true] call CBA_fnc_addPlayerEventHandler;
["loadout", {[ACE_player] call FUNC(getWeaponInertia)}, true] call CBA_fnc_addPlayerEventHandler; ["loadout", {[ACE_player] call FUNC(getWeaponInertia)}, true] call CBA_fnc_addPlayerEventHandler;
@ -39,6 +10,35 @@ if (!hasInterface) exitWith {};
["CBA_settingsInitialized", { ["CBA_settingsInitialized", {
if (!GVAR(enabled)) exitWith {}; if (!GVAR(enabled)) exitWith {};
["baseline", {
private _fatigue = ACE_player getVariable [QGVAR(aimFatigue), 0];
switch (stance ACE_player) do {
case ("CROUCH"): {
(1.0 + _fatigue ^ 2 * 0.1)
};
case ("PRONE"): {
(1.0 + _fatigue ^ 2 * 2.0)
};
default {
(1.5 + _fatigue ^ 2 * 3.0)
};
};
}, QUOTE(ADDON)] call EFUNC(common,addSwayFactor);
["multiplier", {
switch (true) do {
case (isWeaponRested ACE_player): {
GVAR(swayFactor) * GVAR(restedSwayFactor)
};
case (isWeaponDeployed ACE_player): {
GVAR(swayFactor) * GVAR(deployedSwayFactor)
};
default {
GVAR(swayFactor)
};
};
}, QUOTE(ADDON)] call EFUNC(common,addSwayFactor);
// - Post process effect ------------------------------------------------------ // - Post process effect ------------------------------------------------------
GVAR(ppeBlackout) = ppEffectCreate ["ColorCorrections", 4220]; GVAR(ppeBlackout) = ppEffectCreate ["ColorCorrections", 4220];
GVAR(ppeBlackout) ppEffectEnable true; GVAR(ppeBlackout) ppEffectEnable true;

View File

@ -66,7 +66,8 @@ _items = _items select {
_x isKindOf ["CBA_MiscItem", _cfgWeapons] && {getNumber (_configItemInfo >> "type") in [TYPE_MUZZLE, TYPE_OPTICS, TYPE_FLASHLIGHT, TYPE_BIPOD]} || _x isKindOf ["CBA_MiscItem", _cfgWeapons] && {getNumber (_configItemInfo >> "type") in [TYPE_MUZZLE, TYPE_OPTICS, TYPE_FLASHLIGHT, TYPE_BIPOD]} ||
{getNumber (_configItemInfo >> "type") in [TYPE_FIRST_AID_KIT, TYPE_MEDIKIT, TYPE_TOOLKIT]} || {getNumber (_configItemInfo >> "type") in [TYPE_FIRST_AID_KIT, TYPE_MEDIKIT, TYPE_TOOLKIT]} ||
{getText (_cfgWeapons >> _x >> "simulation") == "ItemMineDetector"} || {getText (_cfgWeapons >> _x >> "simulation") == "ItemMineDetector"} ||
{getNumber (_cfgMagazines >> _x >> "ACE_isUnique") == 1} {getNumber (_cfgMagazines >> _x >> "ACE_isUnique") == 1} ||
{getNumber (_cfgMagazines >> _x >> "ACE_asItem") == 1}
}; };
GVAR(customRightPanelButtons) set [_position, [_items apply {_x call EFUNC(common,getConfigName)}, _picture, _tooltip, _moveOnOverwrite]]; GVAR(customRightPanelButtons) set [_position, [_items apply {_x call EFUNC(common,getConfigName)}, _picture, _tooltip, _moveOnOverwrite]];

View File

@ -160,7 +160,7 @@ private _magazineMiscItems = createHashMap;
{ {
_magazineMiscItems set [configName _x, nil]; _magazineMiscItems set [configName _x, nil];
} forEach ((toString {getNumber (_x >> "ACE_isUnique") == 1}) configClasses _cfgMagazines); } forEach ((toString {getNumber (_x >> "ACE_isUnique") == 1 || getNumber (_x >> "ACE_asItem") == 1}) configClasses _cfgMagazines);
// Remove invalid/non-existent entries // Remove invalid/non-existent entries
_grenadeList deleteAt ""; _grenadeList deleteAt "";

View File

@ -13,6 +13,7 @@ PREP(addLineToDebugDraw);
PREP(addSwayFactor); PREP(addSwayFactor);
PREP(addToInventory); PREP(addToInventory);
PREP(addWeapon); PREP(addWeapon);
PREP(adjustMagazineAmmo);
PREP(assignedItemFix); PREP(assignedItemFix);
PREP(assignObjectsInList); PREP(assignObjectsInList);
PREP(ambientBrightness); PREP(ambientBrightness);

View File

@ -0,0 +1,107 @@
#include "..\script_component.hpp"
/*
* Author: Katalam, Blue, Brett Mayson, johnb43
* Handle adjusting a magazine's ammo
*
* Arguments:
* 0: Vehicle or Unit <OBJECT>
* 1: Item <STRING>
* 2: Ammo to adjust by <NUMBER> (default: -1)
*
* Return Value:
* How much the ammo was adjusted by <NUMBER>
*
* Example:
* [player, "30Rnd_556x45_Stanag", 1] call ace_common_fnc_adjustMagazineAmmo;
*
* Public: No
*/
params ["_unit", "_magazine", ["_count", -1]];
if (_count == 0) exitWith {0};
private _containers = if (_unit isKindOf "CAManBase") then {
[uniformContainer _unit, vestContainer _unit, backpackContainer _unit]
} else {
[_unit]
};
scopeName "main";
private _originalCount = _count;
private _container = objNull;
private _magazinesContainer = [];
private _newAmmoCount = 0;
private _removeAmmo = _count < 0;
private _maxMagazineAmmo = getNumber (configFile >> "CfgMagazines" >> _magazine >> "count");
{
_container = _x;
// Get all magazines of _magazine type
_magazinesContainer = (magazinesAmmoCargo _container) select {_x select 0 == _magazine};
// Get the ammo count, filter out magazines with 0 ammo
_magazinesContainer = (_magazinesContainer apply {_x select 1}) select {_x != 0};
// If there are none, skip to next container
if (_magazinesContainer isEqualTo []) then {
continue;
};
// Sort, smallest first when removing, largest first when adding
_magazinesContainer sort _removeAmmo;
if (_removeAmmo) then {
{
_count = _x + _count;
_container addMagazineAmmoCargo [_magazine, -1, _x];
if (_count >= 0) then {
// Only add magazine back if it's not empty
if (_count != 0) then {
_container addMagazineAmmoCargo [_magazine, 1, _count];
};
_originalCount breakOut "main";
};
} forEach _magazinesContainer;
} else {
// This loop only fills up partially filled magazines
{
// Fill the magazine to either its max or until all ammo has been added
_newAmmoCount = (_x + _count) min _maxMagazineAmmo;
if (_newAmmoCount <= _maxMagazineAmmo) then {
_container addMagazineAmmoCargo [_magazine, -1, _x];
_container addMagazineAmmoCargo [_magazine, 1, _newAmmoCount];
};
// Remove the ammo that was added
_count = _count - (_newAmmoCount - _x);
if (_count <= 0) then {
_originalCount breakOut "main";
};
} forEach (_magazinesContainer select {_x < _maxMagazineAmmo});
};
} forEach _containers;
// If there is still remaining ammo to add, try add it after having iterated through all containers
if (!_removeAmmo && _count > 0) then {
{
while {_count > 0 && {_x canAdd [_magazine, 1/* 2.18 , true*/]}} do {
_x addMagazineAmmoCargo [_magazine, 1, _count];
_count = _count - _maxMagazineAmmo;
};
} forEach _containers;
if (_count <= 0) then {
_originalCount breakOut "main";
};
};
_originalCount - _count

View File

@ -1,6 +1,6 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Author: Dedmen * Author: Dedmen, Blue, johnb43
* Return how many items of type _itemType the player has in his containers (Uniform, Vest, Backpack) * Return how many items of type _itemType the player has in his containers (Uniform, Vest, Backpack)
* Doesn't count assignedItems, weapons, weapon attachments, magazines in weapons * Doesn't count assignedItems, weapons, weapon attachments, magazines in weapons
* *
@ -19,13 +19,17 @@
params ["_unit", "_itemType"]; params ["_unit", "_itemType"];
private _countItemsInContainer = { private _count = 0;
(getItemCargo _this) params ["_itemTypes", "_itemCounts"]; private _isMagazine = isClass (configFile >> "CfgMagazines" >> _itemType);
private _index = _itemTypes find _itemType; {
_itemCounts param [_index, 0] (if (_isMagazine) then {
}; getMagazineCargo _x
} else {
getItemCargo _x
}) params ["_itemTypes", "_itemCounts"];
((uniformContainer _unit) call _countItemsInContainer) + _count = _count + (_itemCounts param [_itemTypes find _itemType, 0]);
((vestContainer _unit) call _countItemsInContainer) + } forEach [uniformContainer _unit, vestContainer _unit, backpackContainer _unit];
((backpackContainer _unit) call _countItemsInContainer)
_count

View File

@ -1,37 +1,84 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Author: mharis001 * Author: mharis001, Blue, Brett Mayson
* Returns list of unique items in a unit's inventory. * Returns list of unique items in the target's inventory.
* Items are cached if unit is ACE_player.
* *
* Arguments: * Arguments:
* 0: Unit <OBJECT> * 0: Target <OBJECT>
* 1: Include magazines <NUMBER>
* 0: No (default)
* 1: Yes
* 2: Only magazines
* *
* Return Value: * Return Value:
* Items <ARRAY> * Items <ARRAY>
* *
* Example: * Example:
* [player] call ace_common_fnc_uniqueItems * [player, 2] call ace_common_fnc_uniqueItems
* *
* Public: No * Public: No
*/ */
params ["_unit"]; params ["_target", ["_includeMagazines", 0]];
private _fnc_getItems = { private _fnc_getItems = {
private _items = (getItemCargo uniformContainer _unit) select 0; private _items = [];
_items append ((getItemCargo vestContainer _unit) select 0);
_items append ((getItemCargo backpackContainer _unit) select 0); private _inventoryItems = (getItemCargo uniformContainer _target) select 0;
_inventoryItems append ((getItemCargo vestContainer _target) select 0);
_inventoryItems append ((getItemCargo backpackContainer _target) select 0);
_items set [0, _inventoryItems];
_items set [1, magazines _target];
_items arrayIntersect _items _items arrayIntersect _items
}; };
// Use cached items list if unit is ACE_player // Cache items list if unit is ACE_player
if (_unit isEqualTo ACE_player) then { if (_target isEqualTo ACE_player) then {
if (isNil QGVAR(uniqueItemsCache)) then { if (isNil QGVAR(uniqueItemsCache)) then {
GVAR(uniqueItemsCache) = call _fnc_getItems; GVAR(uniqueItemsCache) = call _fnc_getItems;
}; };
+GVAR(uniqueItemsCache)
switch (_includeMagazines) do {
case 0: {
GVAR(uniqueItemsCache) select 0
};
case 1: {
(GVAR(uniqueItemsCache) select 1) + (GVAR(uniqueItemsCache) select 0)
};
case 2: {
GVAR(uniqueItemsCache) select 1
};
};
} else { } else {
call _fnc_getItems; if (_target isKindOf "CAManBase") then {
private _items = call _fnc_getItems;
switch (_includeMagazines) do {
case 0: {
_items select 0
};
case 1: {
(_items select 1) + (_items select 0)
};
case 2: {
_items select 1
};
};
} else {
private _items = switch (_includeMagazines) do {
case 0: {
itemCargo _target
};
case 1: {
(magazineCargo _target) + (itemCargo _target)
};
case 2: {
magazineCargo _target
};
};
_items arrayIntersect _items
};
}; };

View File

@ -179,7 +179,7 @@
<Italian>Scorta di munizioni</Italian> <Italian>Scorta di munizioni</Italian>
<Korean>탄약 보관</Korean> <Korean>탄약 보관</Korean>
<Polish>Magazyn amunicji</Polish> <Polish>Magazyn amunicji</Polish>
<Japanese>弾薬の格納場所</Japanese> <Japanese>弾薬保管位置</Japanese>
<Chinesesimp>弹药存储</Chinesesimp> <Chinesesimp>弹药存储</Chinesesimp>
<Russian>Хранилище боеприпасов</Russian> <Russian>Хранилище боеприпасов</Russian>
<Spanish>Almacenamiento de munición</Spanish> <Spanish>Almacenamiento de munición</Spanish>
@ -192,7 +192,7 @@
<Italian>Determina se ulteriori caricatori verranno stoccati sul suolo o in una cassa di munizioni.</Italian> <Italian>Determina se ulteriori caricatori verranno stoccati sul suolo o in una cassa di munizioni.</Italian>
<Korean>여분의 탄약을 지면 또는 탄약 상자에 넣을 지 결정합니다.</Korean> <Korean>여분의 탄약을 지면 또는 탄약 상자에 넣을 지 결정합니다.</Korean>
<Polish>Decyduje, czy dodatkowe magazynki przechowywane są na ziemi, czy w skrzynce z amunicją.</Polish> <Polish>Decyduje, czy dodatkowe magazynki przechowywane są na ziemi, czy w skrzynce z amunicją.</Polish>
<Japanese>追加の弾倉を地面に配置するか、弾薬箱内に保管するかを設定します。</Japanese> <Japanese>追加の弾倉を地面に直接配置するか、弾薬箱内に保管するかを設定します。</Japanese>
<Chinesesimp>设置多余的弹夹是存放在地面上还是弹药箱内</Chinesesimp> <Chinesesimp>设置多余的弹夹是存放在地面上还是弹药箱内</Chinesesimp>
<Russian>Определяет будут ли дополнительные магазины лежать на земле или внутри хранилища</Russian> <Russian>Определяет будут ли дополнительные магазины лежать на земле или внутри хранилища</Russian>
<Spanish>Determina si los cargadores extra son almacenados en el suelo o en una caja de munición</Spanish> <Spanish>Determina si los cargadores extra son almacenados en el suelo o en una caja de munición</Spanish>

View File

@ -6,7 +6,7 @@
<Polish>Nieśmiertelnik</Polish> <Polish>Nieśmiertelnik</Polish>
<Russian>Жетон</Russian> <Russian>Жетон</Russian>
<Czech>Identifikační známka</Czech> <Czech>Identifikační známka</Czech>
<Japanese>認識票</Japanese> <Japanese>ドッグタグ</Japanese>
<German>Erkennungsmarke</German> <German>Erkennungsmarke</German>
<Korean>군번줄</Korean> <Korean>군번줄</Korean>
<French>Plaque d'identification</French> <French>Plaque d'identification</French>
@ -22,7 +22,7 @@
<Polish>Sprawdź nieśmiertelnik</Polish> <Polish>Sprawdź nieśmiertelnik</Polish>
<Russian>Проверить жетон</Russian> <Russian>Проверить жетон</Russian>
<Czech>Zkontrolovat známku</Czech> <Czech>Zkontrolovat známku</Czech>
<Japanese>認識票を確認</Japanese> <Japanese>ドッグタグを確認</Japanese>
<German>Erkennungsmarke prüfen</German> <German>Erkennungsmarke prüfen</German>
<Korean>군번줄 확인</Korean> <Korean>군번줄 확인</Korean>
<French>Vérifier la plaque d'identification</French> <French>Vérifier la plaque d'identification</French>
@ -54,7 +54,7 @@
<Polish>Zabierz</Polish> <Polish>Zabierz</Polish>
<Russian>Взять</Russian> <Russian>Взять</Russian>
<Czech>Vezmi</Czech> <Czech>Vezmi</Czech>
<Japanese>取る</Japanese> <Japanese>拾う</Japanese>
<German>Nehmen</German> <German>Nehmen</German>
<Korean>회수</Korean> <Korean>회수</Korean>
<French>Prendre</French> <French>Prendre</French>
@ -70,7 +70,7 @@
<Polish>Zabrałeś nieśmiertelnik %1...</Polish> <Polish>Zabrałeś nieśmiertelnik %1...</Polish>
<Russian>Жетон снят с %1...</Russian> <Russian>Жетон снят с %1...</Russian>
<Czech>Sebral jsem známku od %1...</Czech> <Czech>Sebral jsem známku od %1...</Czech>
<Japanese>%1 から認識票を取っています・・・</Japanese> <Japanese>%1 からドッグタグを回収しています・・・</Japanese>
<German>Erkennungsmarke von %1 genommen...</German> <German>Erkennungsmarke von %1 genommen...</German>
<Korean>%1(으)로부터 군번줄을 회수했습니다...</Korean> <Korean>%1(으)로부터 군번줄을 회수했습니다...</Korean>
<French>Plaque d'identification prise sur %1...</French> <French>Plaque d'identification prise sur %1...</French>
@ -86,7 +86,7 @@
<Polish>Ktoś już zabrał ten nieśmiertelnik...</Polish> <Polish>Ktoś już zabrał ten nieśmiertelnik...</Polish>
<Russian>Кто-то уже забрал жетон...</Russian> <Russian>Кто-то уже забрал жетон...</Russian>
<Czech>Někdo jiný už vzal identifikační známku...</Czech> <Czech>Někdo jiný už vzal identifikační známku...</Czech>
<Japanese>誰かが既に認識票を取ったようだ・・・</Japanese> <Japanese>既に誰かがドッグタグを回収したようだ・・・</Japanese>
<German>Jemand anderes hat bereits die Erkennungsmarke genommen...</German> <German>Jemand anderes hat bereits die Erkennungsmarke genommen...</German>
<Korean>누군가 이미 군번줄을 회수해갔습니다...</Korean> <Korean>누군가 이미 군번줄을 회수해갔습니다...</Korean>
<French>Quelqu'un d'autre a déjà pris la plaque d'identification...</French> <French>Quelqu'un d'autre a déjà pris la plaque d'identification...</French>
@ -102,7 +102,7 @@
<German>Anzeige um Erkennungsmarke zu überprüfen</German> <German>Anzeige um Erkennungsmarke zu überprüfen</German>
<Chinese>在畫面中顯示檢查兵籍牌</Chinese> <Chinese>在畫面中顯示檢查兵籍牌</Chinese>
<Chinesesimp>在画面中显示检查兵籍牌</Chinesesimp> <Chinesesimp>在画面中显示检查兵籍牌</Chinesesimp>
<Japanese>確認中の認識票を画面上に表示します</Japanese> <Japanese>確認中のドッグタグを画面上に表示します</Japanese>
<Italian>Indicatore su schermo per il controllo delle piastrine</Italian> <Italian>Indicatore su schermo per il controllo delle piastrine</Italian>
<Polish>Wyświetlacz ekranowy dla sprawdzania nieśmiertelników</Polish> <Polish>Wyświetlacz ekranowy dla sprawdzania nieśmiertelników</Polish>
<Russian>Экран для проверки жетонов</Russian> <Russian>Экран для проверки жетонов</Russian>

View File

@ -31,6 +31,9 @@ if !(_target getVariable [QGVAR(ignoreWeightCarry), false]) then {
// Exit if object weight is over global var value // Exit if object weight is over global var value
if (_weight > GETMVAR(ACE_maxWeightCarry,1E11)) exitWith { if (_weight > GETMVAR(ACE_maxWeightCarry,1E11)) exitWith {
// Release claim on object
[objNull, _target, true] call EFUNC(common,claim);
[LLSTRING(UnableToDrag)] call EFUNC(common,displayTextStructured); [LLSTRING(UnableToDrag)] call EFUNC(common,displayTextStructured);
}; };

View File

@ -55,8 +55,8 @@ if (_target isKindOf "CAManBase") then {
TRACE_4("timeout",_unit,_target,_timeOut,CBA_missionTime); TRACE_4("timeout",_unit,_target,_timeOut,CBA_missionTime);
_idPFH call CBA_fnc_removePerFrameHandler; _idPFH call CBA_fnc_removePerFrameHandler;
private _draggedObject = _unit getVariable [QGVAR(draggedObject), objNull]; private _carriedObject = _unit getVariable [QGVAR(carriedObject), objNull];
[_unit, _draggedObject] call FUNC(dropObject_carry); [_unit, _carriedObject] call FUNC(dropObject_carry);
}; };
// Wait for the unit to stand up // Wait for the unit to stand up

View File

@ -31,6 +31,9 @@ if !(_target getVariable [QGVAR(ignoreWeightDrag), false]) then {
// Exit if object weight is over global var value // Exit if object weight is over global var value
if (_weight > GETMVAR(ACE_maxWeightDrag,1E11)) exitWith { if (_weight > GETMVAR(ACE_maxWeightDrag,1E11)) exitWith {
// Release claim on object
[objNull, _target, true] call EFUNC(common,claim);
[LLSTRING(UnableToDrag)] call EFUNC(common,displayTextStructured); [LLSTRING(UnableToDrag)] call EFUNC(common,displayTextStructured);
}; };

View File

@ -3,8 +3,8 @@
[QGVAR(burn), FUNC(burn)] call CBA_fnc_addEventHandler; [QGVAR(burn), FUNC(burn)] call CBA_fnc_addEventHandler;
[QGVAR(playScream), { [QGVAR(playScream), {
params ["_scream", "_source"]; params ["_scream", "_source"];
// only play sound if enabled in settings // only play sound if enabled in settings and enabled for the unit
if (GVAR(enableScreams)) then { if (GVAR(enableScreams) && {_source getVariable [QGVAR(enableScreams), true]}) then {
_source say3D _scream; _source say3D _scream;
}; };
}] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler;
@ -35,4 +35,3 @@
GVAR(fireSources) = [[], nil] call CBA_fnc_hashCreate; GVAR(fireSources) = [[], nil] call CBA_fnc_hashCreate;
}; };
}] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler;

View File

@ -38,7 +38,7 @@ private _perframeCheck = {
_args params ["_unit", "_side", "_typeOf", "_posASL", "_vectorDir", "_vectorUp", "_cost"]; _args params ["_unit", "_side", "_typeOf", "_posASL", "_vectorDir", "_vectorUp", "_cost"];
// Animation loop (required for longer constructions) // Animation loop (required for longer constructions)
if (animationState _unit isNotEqualTo "AinvPknlMstpSnonWnonDnon_medic4") then { if (_totalTime != 0 && {animationState _unit != "AinvPknlMstpSnonWnonDnon_medic4"}) then {
// Perform animation // Perform animation
[_unit, "AinvPknlMstpSnonWnonDnon_medic4"] call EFUNC(common,doAnimation); [_unit, "AinvPknlMstpSnonWnonDnon_medic4"] call EFUNC(common,doAnimation);
}; };
@ -55,4 +55,3 @@ private _perframeCheck = {
LLSTRING(progressBarTitle), LLSTRING(progressBarTitle),
_perframeCheck _perframeCheck
] call EFUNC(common,progressBar); ] call EFUNC(common,progressBar);

View File

@ -23,6 +23,8 @@ GVAR(lastPlayerVehicle) = objNull;
// Spawn volume updating process // Spawn volume updating process
[LINKFUNC(updateVolume), 1, [false]] call CBA_fnc_addPerFrameHandler; [LINKFUNC(updateVolume), 1, [false]] call CBA_fnc_addPerFrameHandler;
[QGVAR(updateVolume), LINKFUNC(updateVolume)] call CBA_fnc_addEventHandler;
// Update veh attunation when player veh changes // Update veh attunation when player veh changes
["vehicle", { ["vehicle", {
params ["_player", "_vehicle"]; params ["_player", "_vehicle"];

View File

@ -12,7 +12,8 @@ PREP_RECOMPILE_END;
params ["_unit", "_loadout", "_extendedInfo"]; params ["_unit", "_loadout", "_extendedInfo"];
if (_extendedInfo getOrDefault ["ace_earplugs", false]) then { if (_extendedInfo getOrDefault ["ace_earplugs", false]) then {
_unit setVariable ["ACE_hasEarPlugsIn", true, true]; _unit setVariable ["ACE_hasEarPlugsIn", true, true];
[[true]] remoteExec [QFUNC(updateVolume), _unit];
[QGVAR(updateVolume), [[true]], _unit] call CBA_fnc_targetEvent;
}; };
}] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler;

View File

@ -15,14 +15,14 @@
* Public: No * Public: No
*/ */
params ["_unit"];
TRACE_2("params",_unit,typeOf _unit);
// only run this after the settings are initialized // only run this after the settings are initialized
if !(EGVAR(common,settingsInitFinished)) exitWith { if !(EGVAR(common,settingsInitFinished)) exitWith {
EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(addEarPlugs), _this]; EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(addEarPlugs), _this];
}; };
params ["_unit"];
TRACE_2("params",_unit,typeOf _unit);
// Exit if hearing is disabled OR autoAdd is disabled OR soldier has earplugs already in (persistence scenarios) // Exit if hearing is disabled OR autoAdd is disabled OR soldier has earplugs already in (persistence scenarios)
if (!GVAR(enableCombatDeafness) || {!GVAR(autoAddEarplugsToUnits)} || {[_unit] call FUNC(hasEarPlugsIn)}) exitWith {}; if (!GVAR(enableCombatDeafness) || {!GVAR(autoAddEarplugsToUnits)} || {[_unit] call FUNC(hasEarPlugsIn)}) exitWith {};
@ -38,16 +38,20 @@ if ((primaryWeapon _unit) == "") exitWith {};
(primaryWeaponMagazine _unit) params [["_magazine", ""]]; (primaryWeaponMagazine _unit) params [["_magazine", ""]];
if (_magazine == "") exitWith {}; if (_magazine == "") exitWith {};
private _initSpeed = getNumber (configFile >> "CfgMagazines" >> _magazine >> "initSpeed"); private _cfgMagazine = configFile >> "CfgMagazines" >> _magazine;
private _ammo = getText (configFile >> "CfgMagazines" >> _magazine >> "ammo");
private _count = getNumber (configFile >> "CfgMagazines" >> _magazine >> "count");
private _caliber = getNumber (configFile >> "CfgAmmo" >> _ammo >> "ACE_caliber"); private _initSpeed = getNumber (_cfgMagazine >> "initSpeed");
private _ammo = getText (_cfgMagazine >> "ammo");
private _count = getNumber (_cfgMagazine >> "count");
private _cfgAmmo = configFile >> "CfgAmmo";
private _caliber = getNumber (_cfgAmmo >> _ammo >> "ACE_caliber");
_caliber = call { _caliber = call {
if (_ammo isKindOf ["ShellBase", (configFile >> "CfgAmmo")]) exitWith { 80 }; if (_ammo isKindOf ["ShellBase", _cfgAmmo]) exitWith { 80 };
if (_ammo isKindOf ["RocketBase", (configFile >> "CfgAmmo")]) exitWith { 200 }; if (_ammo isKindOf ["RocketBase", _cfgAmmo]) exitWith { 200 };
if (_ammo isKindOf ["MissileBase", (configFile >> "CfgAmmo")]) exitWith { 600 }; if (_ammo isKindOf ["MissileBase", _cfgAmmo]) exitWith { 600 };
if (_ammo isKindOf ["SubmunitionBase", (configFile >> "CfgAmmo")]) exitWith { 80 }; if (_ammo isKindOf ["SubmunitionBase", _cfgAmmo]) exitWith { 80 };
[_caliber, 6.5] select (_caliber <= 0); [_caliber, 6.5] select (_caliber <= 0);
}; };
private _loudness = (_caliber ^ 1.25 / 10) * (_initspeed / 1000) / 5; private _loudness = (_caliber ^ 1.25 / 10) * (_initspeed / 1000) / 5;

View File

@ -9,10 +9,6 @@ class CfgPatches {
authors[] = {"xrufix"}; authors[] = {"xrufix"};
url = ECSTRING(main,URL); url = ECSTRING(main,URL);
VERSION_CONFIG; VERSION_CONFIG;
ammo[] = {
QGVAR(L),
"ace_kh25ml"
};
magazines[] = { magazines[] = {
QGVAR(L_magazine_x1), QGVAR(L_magazine_x1),
QGVAR(L_pylonmissile_x1), QGVAR(L_pylonmissile_x1),

View File

@ -42,12 +42,27 @@ private _vehicle = [_patientVehicle, _medicVehicle] select (!isNull _medicVehicl
if (!isNull _vehicle) then { if (!isNull _vehicle) then {
_vehicleCount = 0; _vehicleCount = 0;
(getItemCargo _vehicle) params ["_itemTypes", "_itemCounts"]; private _magazineItems = [];
private _itemItems = [];
{ {
private _item = _x; if (isClass (configFile >> "CfgMagazines" >> _x)) then {
private _index = _itemTypes find _item; _magazineItems pushBack _x;
_vehicleCount = _vehicleCount + (_itemCounts param [_index, 0]); } else {
_itemItems pushBack _x;
};
} forEach _items; } forEach _items;
if (_magazineItems isNotEqualTo []) then {
(getMagazineCargo _vehicle) params ["_itemTypes", "_itemCounts"];
{
_vehicleCount = _vehicleCount + (_itemCounts param [_itemTypes find _x, 0]);
} forEach _magazineItems;
};
if (_itemItems isNotEqualTo []) then {
(getItemCargo _vehicle) params ["_itemTypes", "_itemCounts"];
{
_vehicleCount = _vehicleCount + (_itemCounts param [_itemTypes find _x, 0]);
} forEach _itemItems;
};
}; };
[_medicCount, _patientCount, _vehicleCount] [_medicCount, _patientCount, _vehicleCount]

View File

@ -0,0 +1,16 @@
class CfgMagazines {
class CA_Magazine;
class ACE_painkillers: CA_Magazine {
scope = 2;
author = ECSTRING(common,ACETeam);
displayName = CSTRING(painkillers_Display);
model = "\A3\Structures_F_EPA\Items\Medical\PainKillers_F.p3d";
picture = QPATHTOF(ui\painkillers_ca.paa);
descriptionShort = CSTRING(painkillers_Desc_Short);
descriptionUse = CSTRING(painkillers_Desc_Use);
ACE_isMedicalItem = 1;
ACE_asItem = 1;
count = 10;
mass = 1;
};
};

View File

@ -290,8 +290,8 @@ class CfgVehicles {
displayName = CSTRING(painkillers_Display); displayName = CSTRING(painkillers_Display);
author = "Alganthe"; author = "Alganthe";
vehicleClass = "Items"; vehicleClass = "Items";
class TransportItems { class TransportMagazines {
MACRO_ADDITEM(ACE_painkillers,1); MACRO_ADDMAGAZINE(ACE_painkillers,1);
}; };
}; };
@ -313,9 +313,11 @@ class CfgVehicles {
model = QPATHTOF(data\ace_medcrate.p3d); model = QPATHTOF(data\ace_medcrate.p3d);
editorPreview = QPATHTOF(data\ACE_medicalSupplyCrate.jpg); editorPreview = QPATHTOF(data\ACE_medicalSupplyCrate.jpg);
author = ECSTRING(common,ACETeam); author = ECSTRING(common,ACETeam);
class TransportMagazines {
MACRO_ADDMAGAZINE(ACE_painkillers,25);
};
class TransportItems { class TransportItems {
MACRO_ADDITEM(ACE_fieldDressing,50); MACRO_ADDITEM(ACE_fieldDressing,50);
MACRO_ADDITEM(ACE_painkillers,25);
MACRO_ADDITEM(ACE_morphine,25); MACRO_ADDITEM(ACE_morphine,25);
MACRO_ADDITEM(ACE_epinephrine,25); MACRO_ADDITEM(ACE_epinephrine,25);
MACRO_ADDITEM(ACE_bloodIV,15); MACRO_ADDITEM(ACE_bloodIV,15);
@ -357,13 +359,15 @@ class CfgVehicles {
}; };
class ACE_medicalSupplyCrate_advanced: ACE_medicalSupplyCrate { class ACE_medicalSupplyCrate_advanced: ACE_medicalSupplyCrate {
displayName = CSTRING(medicalSupplyCrate_advanced); displayName = CSTRING(medicalSupplyCrate_advanced);
class TransportMagazines {
MACRO_ADDMAGAZINE(ACE_painkillers,15);
};
class TransportItems { class TransportItems {
MACRO_ADDITEM(ACE_fieldDressing,25); MACRO_ADDITEM(ACE_fieldDressing,25);
MACRO_ADDITEM(ACE_packingBandage,25); MACRO_ADDITEM(ACE_packingBandage,25);
MACRO_ADDITEM(ACE_elasticBandage,25); MACRO_ADDITEM(ACE_elasticBandage,25);
MACRO_ADDITEM(ACE_tourniquet,15); MACRO_ADDITEM(ACE_tourniquet,15);
MACRO_ADDITEM(ACE_splint,15); MACRO_ADDITEM(ACE_splint,15);
MACRO_ADDITEM(ACE_painkillers,15);
MACRO_ADDITEM(ACE_morphine,15); MACRO_ADDITEM(ACE_morphine,15);
MACRO_ADDITEM(ACE_adenosine,15); MACRO_ADDITEM(ACE_adenosine,15);
MACRO_ADDITEM(ACE_epinephrine,15); MACRO_ADDITEM(ACE_epinephrine,15);

View File

@ -310,17 +310,4 @@ class CfgWeapons {
hiddenSelectionsTextures[] = {QPATHTOF(data\bodybagItem_white_co.paa)}; hiddenSelectionsTextures[] = {QPATHTOF(data\bodybagItem_white_co.paa)};
GVAR(bodyBagObject) = "ACE_bodyBagObject_white"; GVAR(bodyBagObject) = "ACE_bodyBagObject_white";
}; };
class ACE_painkillers: ACE_ItemCore {
scope = 2;
author = "Alganthe";
displayName = CSTRING(painkillers_Display);
model = "\A3\Structures_F_EPA\Items\Medical\PainKillers_F.p3d";
picture = QPATHTOF(ui\painkillers_ca.paa);
descriptionShort = CSTRING(painkillers_Desc_Short);
descriptionUse = CSTRING(painkillers_Desc_Use);
ACE_isMedicalItem = 1;
class ItemInfo: CBA_MiscItem_ItemInfo {
mass = 1;
};
};
}; };

View File

@ -30,5 +30,6 @@ class CfgPatches {
#include "CfgVehicles.hpp" #include "CfgVehicles.hpp"
#include "CfgWeapons.hpp" #include "CfgWeapons.hpp"
#include "Cfg3DEN.hpp" #include "Cfg3DEN.hpp"
#include "CfgMagazines.hpp"
#endif #endif

View File

@ -8,7 +8,9 @@
* 1: Patient <OBJECT> * 1: Patient <OBJECT>
* 2: Body Part <STRING> * 2: Body Part <STRING>
* 3: Treatment <STRING> * 3: Treatment <STRING>
* 4: Bandage effectiveness coefficient <NUMBER> (default: 1) * 4: Item User <OBJECT>
* 5: Used Item <STRING>
* 6: Bandage effectiveness coefficient <NUMBER> (default: 1)
* *
* Return Value: * Return Value:
* None * None
@ -19,10 +21,10 @@
* Public: No * Public: No
*/ */
_this set [4, _this param [4, 1]]; // set default Bandage effectiveness coefficient _this set [6, _this param [6, 1]]; // set default Bandage effectiveness coefficient
[QGVAR(bandaged), _this] call CBA_fnc_localEvent; // Raise event with reference so mods can modify this [QGVAR(bandaged), _this] call CBA_fnc_localEvent; // Raise event with reference so mods can modify this
params ["_medic", "_patient", "_bodyPart", "_classname", "_bandageEffectiveness"]; params ["_medic", "_patient", "_bodyPart", "_classname", "", "", "_bandageEffectiveness"];
[_patient, "activity", LSTRING(Activity_bandagedPatient), [[_medic, false, true] call EFUNC(common,getName)]] call FUNC(addToLog); [_patient, "activity", LSTRING(Activity_bandagedPatient), [[_medic, false, true] call EFUNC(common,getName)]] call FUNC(addToLog);

View File

@ -25,10 +25,11 @@ params ["_medic", "_patient", "_items"];
private _fnc_checkItems = { private _fnc_checkItems = {
params ["_unit"]; params ["_unit"];
private _unitItems = _unit call EFUNC(common,uniqueItems); private _unitItems = [_unit, 1] call EFUNC(common,uniqueItems);
private _unitVehicle = objectParent _unit; private _unitVehicle = objectParent _unit;
if (!isNull _unitVehicle) then { if (!isNull _unitVehicle) then {
_unitItems append (itemCargo _unitVehicle); _unitItems append (itemCargo _unitVehicle);
_unitItems append (magazineCargo _unitVehicle);
}; };
_items findIf {_x in _unitItems} != -1 _items findIf {_x in _unitItems} != -1
}; };

View File

@ -23,6 +23,7 @@
params ["_medic", "_patient", "_bodyPart", "_classname", "", "_usedItem"]; params ["_medic", "_patient", "_bodyPart", "_classname", "", "_usedItem"];
[_patient, _usedItem] call FUNC(addToTriageCard); [_patient, _usedItem] call FUNC(addToTriageCard);
[_patient, "activity", LSTRING(Activity_usedItem), [[_medic, false, true] call EFUNC(common,getName), getText (configFile >> "CfgWeapons" >> _usedItem >> "displayName")]] call FUNC(addToLog); private _cfg = ["CfgWeapons", "CfgMagazines"] select (isClass (configFile >> "CfgMagazines" >> _usedItem));
[_patient, "activity", LSTRING(Activity_usedItem), [[_medic, false, true] call EFUNC(common,getName), getText (configFile >> _cfg >> _usedItem >> "displayName")]] call FUNC(addToLog);
[QGVAR(medicationLocal), [_patient, _bodyPart, _classname], _patient] call CBA_fnc_targetEvent; [QGVAR(medicationLocal), [_patient, _bodyPart, _classname], _patient] call CBA_fnc_targetEvent;

View File

@ -23,7 +23,11 @@ _args params ["_medic", "_patient", "_bodyPart", "_classname", "_itemUser", "_us
// Return used item to user (if used) // Return used item to user (if used)
if (!isNull _itemUser) then { if (!isNull _itemUser) then {
[_itemUser, _usedItem] call EFUNC(common,addToInventory); if (isClass (configFile >> "CfgMagazines" >> _usedItem)) then {
[_itemUser, _usedItem, 1] call EFUNC(common,adjustMagazineAmmo);
} else {
[_itemUser, _usedItem] call EFUNC(common,addToInventory);
};
}; };
// Switch medic to end animation immediately // Switch medic to end animation immediately

View File

@ -29,18 +29,31 @@ scopeName "Main";
private _useOrder = [[_patient, _medic], [_medic, _patient], [_medic]] select GVAR(allowSharedEquipment); private _useOrder = [[_patient, _medic], [_medic, _patient], [_medic]] select GVAR(allowSharedEquipment);
{ {
private _unit = _x; private _unit = _x;
private _unitVehicle = objectParent _unit; private _unitVehicle = objectParent _unit;
private _unitItems = _x call EFUNC(common,uniqueItems); private _unitItems = [_x, 0] call EFUNC(common,uniqueItems);
private _unitMagazines = [_x, 2] call EFUNC(common,uniqueItems);
private _vehicleItems = itemCargo _unitVehicle; // [] for objNull
private _vehicleMagazines = magazineCargo _unitVehicle; // same
{ {
if (!isNull _unitVehicle && {_x in (itemCargo _unitVehicle)}) then { switch (true) do {
_unitVehicle addItemCargoGlobal [_x, -1]; case (_x in _vehicleItems): {
[_unit, _x] breakOut "Main"; _unitVehicle addItemCargoGlobal [_x, -1];
}; [_unit, _x] breakOut "Main";
if (_x in _unitItems) then { };
_unit removeItem _x; case (_x in _vehicleMagazines): {
[_unit, _x] breakOut "Main"; [_unitVehicle, _x] call EFUNC(common,adjustMagazineAmmo);
[_unit, _x] breakOut "Main";
};
case (_x in _unitItems): {
_unit removeItem _x;
[_unit, _x] breakOut "Main";
};
case (_x in _unitMagazines): {
[_unit, _x] call EFUNC(common,adjustMagazineAmmo);
[_unit, _x] breakOut "Main";
};
}; };
} forEach _items; } forEach _items;
} forEach _useOrder; } forEach _useOrder;

View File

@ -957,7 +957,7 @@
</Key> </Key>
<Key ID="STR_ACE_Medical_Treatment_LocationIV_DisplayName"> <Key ID="STR_ACE_Medical_Treatment_LocationIV_DisplayName">
<English>Locations IV Transfusion</English> <English>Locations IV Transfusion</English>
<Japanese>IV 輸液の場所制限</Japanese> <Japanese>IV輸液の可能な場所</Japanese>
<Spanish>Ubicación para transfusiones IV</Spanish> <Spanish>Ubicación para transfusiones IV</Spanish>
<French>Lieux perfusions IV</French> <French>Lieux perfusions IV</French>
<Russian>Места введения пакетов внутривенного переливания</Russian> <Russian>Места введения пакетов внутривенного переливания</Russian>

View File

@ -30,7 +30,9 @@ private _cswCarryMagazines = [];
private _vehicleActions = []; private _vehicleActions = [];
{ {
private _vehicle = _x; private _vehicle = _x;
private _displayName = getText (configOf _vehicle >> "displayName");
private _distanceStr = (ACE_player distance _vehicle) toFixed 1;
private _actionName = format ["%1 (%2m)", _displayName, _distanceStr];
// Array of magazines that can be rearmed in the vehicle // Array of magazines that can be rearmed in the vehicle
private _needRearmMags = ([_vehicle] call FUNC(getNeedRearmMagazines)) apply {_x select 0}; private _needRearmMags = ([_vehicle] call FUNC(getNeedRearmMagazines)) apply {_x select 0};
@ -57,7 +59,7 @@ private _vehicleActions = [];
// [Level 0] adds a single action to rearm the entire vic // [Level 0] adds a single action to rearm the entire vic
private _action = [ private _action = [
_vehicle, _vehicle,
getText(configOf _vehicle >> "displayName"), _actionName,
_icon, _icon,
{_this call FUNC(rearmEntireVehicle)}, {_this call FUNC(rearmEntireVehicle)},
{true}, {true},
@ -84,7 +86,7 @@ private _vehicleActions = [];
private _action = [ private _action = [
_vehicle, _vehicle,
getText(configOf _vehicle >> "displayName"), _actionName,
_icon, _icon,
{}, {},
{true}, {true},

View File

@ -314,7 +314,7 @@
<Spanish>Lugares de reparación completa</Spanish> <Spanish>Lugares de reparación completa</Spanish>
<Italian>Luoghi Riparazione Completa</Italian> <Italian>Luoghi Riparazione Completa</Italian>
<French>Endroits pour réparation complète</French> <French>Endroits pour réparation complète</French>
<Japanese>完全修理できる場所</Japanese> <Japanese>完全修理可能な場所</Japanese>
<Korean>완전수리 구역</Korean> <Korean>완전수리 구역</Korean>
<Chinesesimp>完整维修地点</Chinesesimp> <Chinesesimp>完整维修地点</Chinesesimp>
<Chinese>完整維修地點</Chinese> <Chinese>完整維修地點</Chinese>
@ -2225,7 +2225,7 @@
</Key> </Key>
<Key ID="STR_ACE_Repair_patchWheelMaximumRepair_Description"> <Key ID="STR_ACE_Repair_patchWheelMaximumRepair_Description">
<English>Maximum damage to which a wheel can be patched.\n0% means all damage can be repaired.</English> <English>Maximum damage to which a wheel can be patched.\n0% means all damage can be repaired.</English>
<Japanese>タイヤを補修できる最大の度合い。/n 0% は、すべてのダメージが修復可能であることを意味します</Japanese> <Japanese>タイヤをのダメージ補修できる最大の度合い。/n 0%は、すべてのダメージが修復可能であることを意味します</Japanese>
<Polish>Maksymalny poziom, do którego koło może zostać załatane.\n0% oznacza że każde uszkodzenia mogą być naprawione.</Polish> <Polish>Maksymalny poziom, do którego koło może zostać załatane.\n0% oznacza że każde uszkodzenia mogą być naprawione.</Polish>
<Italian>Livello di integrità massimo di una ruota rattoppata.</Italian> <Italian>Livello di integrità massimo di una ruota rattoppata.</Italian>
<German>Maximales Level, bis zu dem ein Rad geflickt werden kann.\n0% bedeutet, dass das Rad vollständig repariert werden kann.</German> <German>Maximales Level, bis zu dem ein Rad geflickt werden kann.\n0% bedeutet, dass das Rad vollständig repariert werden kann.</German>
@ -2235,7 +2235,7 @@
</Key> </Key>
<Key ID="STR_ACE_Repair_patchWheelLocation_DisplayName"> <Key ID="STR_ACE_Repair_patchWheelLocation_DisplayName">
<English>Wheel Patch Location</English> <English>Wheel Patch Location</English>
<Japanese>タイヤ補修場所</Japanese> <Japanese>タイヤ補修可能な場所</Japanese>
<Polish>Miejsce Łatania Koła</Polish> <Polish>Miejsce Łatania Koła</Polish>
<Italian>Luoghi rattoppamento ruote</Italian> <Italian>Luoghi rattoppamento ruote</Italian>
<German>Räder Flick Ort</German> <German>Räder Flick Ort</German>
@ -2245,7 +2245,7 @@
</Key> </Key>
<Key ID="STR_ACE_Repair_patchWheelLocation_Description"> <Key ID="STR_ACE_Repair_patchWheelLocation_Description">
<English>Where the wheel can be patched.</English> <English>Where the wheel can be patched.</English>
<Japanese>タイヤを補修できる場所。</Japanese> <Japanese>タイヤを補修することが出来る場所。</Japanese>
<Polish>Gdzie można załatać koło.</Polish> <Polish>Gdzie można załatać koło.</Polish>
<Italian>In quali luoghi è possibile rattoppare una ruota?</Italian> <Italian>In quali luoghi è possibile rattoppare una ruota?</Italian>
<German>Wo das Rad geflickt werden kann.</German> <German>Wo das Rad geflickt werden kann.</German>

View File

@ -138,6 +138,7 @@ ACE Arsenal uses 2 existing config entries to sort and display items.
- `baseWeapon`: Class name that is used to display an item in the arsenal, used for weapon/attachment variants that are not normally shown to the player (AI variants, PIP optics, and so on). This property can be applied to any weapon or weapon attachment in `CfgWeapons`. Items using CBA or RHS' Scripted Optics systems, or CBA Switchable Attachments do not need this property explictly set, and will automatically use their player-accessible class. - `baseWeapon`: Class name that is used to display an item in the arsenal, used for weapon/attachment variants that are not normally shown to the player (AI variants, PIP optics, and so on). This property can be applied to any weapon or weapon attachment in `CfgWeapons`. Items using CBA or RHS' Scripted Optics systems, or CBA Switchable Attachments do not need this property explictly set, and will automatically use their player-accessible class.
- `ACE_isUnique`: Classes in `CfgMagazines` with this property set to `1` will be treated and shown by the Arsenal as Misc. Items. Used for items with attached data that needs to be kept track of, such as Notepads or Spare Barrels. - `ACE_isUnique`: Classes in `CfgMagazines` with this property set to `1` will be treated and shown by the Arsenal as Misc. Items. Used for items with attached data that needs to be kept track of, such as Notepads or Spare Barrels.
- `ACE_asItem`: Classes in `CfgMagazines` with this property set to `1` will be treated and shown by the Arsenal as Items. Used for magazines that are not meant to be used in a weapon, such as Painkillers.
### 3.2 New config entries ### 3.2 New config entries
@ -159,7 +160,7 @@ ACE Medical Treatment and ACE Field Rations also add their own sub-categories, i
- `ACE_isMedicalItem`: Items with this property set to `1` will be sorted to the ACE Medical Tab. - `ACE_isMedicalItem`: Items with this property set to `1` will be sorted to the ACE Medical Tab.
- `ACE_isFieldRationItem`: Items with this property set to `1` will be sorted to the ACE Field Rations Tab. - `ACE_isFieldRationItem`: Items with this property set to `1` will be sorted to the ACE Field Rations Tab.
Only Misc. Items will be checked for these properties. Magazines must have ACE_isUnique property. Only Misc. Items will be checked for these properties. Magazines must have `ACE_isUnique` or `ACE_asItem` property.
## 4. Default loadouts ## 4. Default loadouts

View File

@ -37,3 +37,12 @@ Use `CBA_fnc_serverEvent` to use the following features. Events are defined only
| Arguments | Type | Optional (default value) | Arguments | Type | Optional (default value)
---| --------- | ---- | ------------------------ ---| --------- | ---- | ------------------------
0 | Fire source ID | Any | Required 0 | Fire source ID | Any | Required
## 2. Variables
Screams can be disabled for an individual unit by setting the `ace_fire_enableScreams` variable on the unit, which can be synced across machines.
```sqf
_unit setVariable ["ace_fire_enableScreams", false, _isGlobal];
```

View File

@ -116,8 +116,8 @@ The Fortify budget can be updated for any side using the function.
Event Name | Passed Parameter(s) | Locality | Description Event Name | Passed Parameter(s) | Locality | Description
---------- | ----------- | ------------------- | -------- ---------- | ----------- | ------------------- | --------
`acex_fortify_objectPlaced` | [player, side, objectPlaced] | Global | Foritfy object placed `acex_fortify_objectPlaced` | [player, side, objectPlaced] | Global | Fortify object placed
`acex_fortify_objectDeleted` | [player, side, objectDeleted] | Global | Foritfy object deleted `acex_fortify_objectDeleted` | [player, side, objectDeleted] | Global | Fortify object deleted
`acex_fortify_onDeployStart` | [player, object, cost] | Local | Player starts placing object `acex_fortify_onDeployStart` | [player, object, cost] | Local | Player starts placing object
`ace_fortify_deployFinished` | [player, side, configName, posASL, vectorDir, vectorUp] | Local | Player successfully finishes building object `ace_fortify_deployFinished` | [[player, side, configName, posASL, vectorDir, vectorUp, cost], elapsedTime, totalTime, errorCode] | Local | Player successfully finishes building object
`ace_fortify_deployCanceled` | [player, side, configName, posASL, vectorDir, vectorUp] | Local | Player cancels building object `ace_fortify_deployCanceled` | [[player, side, configName, posASL, vectorDir, vectorUp, cost], elapsedTime, totalTime, errorCode] | Local | Player cancels building object