Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Field Rations - Add CBA events for consuming items and refilling bottles #159

Merged
merged 4 commits into from
Dec 28, 2018
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
1 change: 1 addition & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ Coren <coren4@gmail.com>
Crusty
Dharma Bellamkonda <dharma.bellamkonda@gmail.com>
Dimaslg <dimaslg@telecable.es>
diwako
dixon13 <dixonbegay@gmail.com>
Drill <drill87@gmail.com>
Dudakov aka [OMCB]Kaban <dudakov.s@gmail.com>
Expand Down
2 changes: 2 additions & 0 deletions addons/field_rations/functions/fnc_consumeItem.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ private _fnc_onSuccess = {
_player setVariable [QGVAR(hunger), (_hunger - _hungerSatiated) max 0];
};

["acex_rationConsumed", [_player, _consumeItem, _replacementItem, _thirstQuenched, _hungerSatiated]] call CBA_fnc_localEvent;

_player setVariable [QGVAR(previousAnim), nil];
};

Expand Down
2 changes: 2 additions & 0 deletions addons/field_rations/functions/fnc_refillItem.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ private _fnc_onSuccess = {
[_source, _waterInSource] call FUNC(setRemainingWater);
};

["acex_rationRefilled", [_source, _player, _item, _refillItem, _refillAmount]] call CBA_fnc_localEvent;

// Show refilled item hint
private _picture = getText (configFile >> "CfgWeapons" >> _refillItem >> "picture");
[LSTRING(ItemRefilled), _picture] call ACEFUNC(common,displayTextPicture);
Expand Down