Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion addons/flags/functions/fnc_carryFlag.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@
params ["_unit", "_item"];
TRACE_2("Carry flag",_unit,_item);

(GVAR(flagItemCache) get _item) params ["", "_texture"];
(GVAR(flagItemCache) get _item) params ["", "_texture", "", "", "", "_mass"];
_unit forceFlagTexture _texture;

_unit setVariable [QGVAR(carryingFlag), _item, true];
_unit removeItem _item;

if ("ace_movement" call EFUNC(common,isModLoaded)) then {
[_unit, _unit, _mass] call EFUNC(movement,addLoadToUnitContainer);
};
5 changes: 5 additions & 0 deletions addons/flags/functions/fnc_furlFlag.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,8 @@ _unit setVariable [QGVAR(carryingFlag), nil, true];
_unit forceFlagTexture ""; // Remove flag

[_unit, _item] call EFUNC(common,addToInventory);

if ("ace_movement" call EFUNC(common,isModLoaded)) then {
private _mass = (GVAR(flagItemCache) get _item) select 5;
[_unit, _unit, -_mass] call EFUNC(movement,addLoadToUnitContainer);
};
3 changes: 2 additions & 1 deletion addons/flags/functions/fnc_scanConfig.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ private _carrierItemMapping = createHashMap;
private _carrier = getText (_x >> QGVAR(carrier));
private _actionIconPlace = getText (_x >> QGVAR(actionIconPlace));
private _actionIconCarry = getText (_x >> QGVAR(actionIconCarry));
private _mass = getNumber (_x >> "ItemInfo" >> "mass");

_flagItemCache set [_name, [_displayName, _texture, _carrier, _actionIconPlace, _actionIconCarry]];
_flagItemCache set [_name, [_displayName, _texture, _carrier, _actionIconPlace, _actionIconCarry, _mass]];
_carrierItemMapping set [_carrier, _name];
} forEach _flagItems;

Expand Down