Skip to content
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.

Commit

Permalink
Medical menu is now working for iv stands
Browse files Browse the repository at this point in the history
  • Loading branch information
Katalam committed Mar 21, 2019
1 parent f95af29 commit 529b6bd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
12 changes: 6 additions & 6 deletions addons/kat_acemisc/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,20 +394,20 @@ class ACE_Medical_Actions {
class SalineIV_Stand: SalineIV {
displayName = "$STR_kat_aceMisc_Display_IVStand";
requiredMedic = 0;
condition = "[_player, 1000] call kat_aceMisc_fnc_conditionIV";
condition = "params ['_player'];[_player, 1000] call kat_aceMisc_fnc_conditionIV"; // no idea why here is a params needed
items[] = {};
callbackSuccess = "[_player, _target, _selectionName, 'SalineIV'] call kat_aceMisc_fnc_treatmentIV";
callbackSuccess = "[_player, _target, _selectionName, 'SalineIV', ['ACE_salineIV']] call kat_aceMisc_fnc_treatmentIV";
itemConsumed = 0;
};
class SalineIV_Stand_500: SalineIV_Stand {
displayName = "$STR_kat_aceMisc_Display_IVStand_500";
condition = "[_player, 500] call kat_aceMisc_fnc_conditionIV";
callbackSuccess = "[_player, _target, _selectionName, 'SalineIV_500'] call kat_aceMisc_fnc_treatmentIV";
condition = "params ['_player'];[_player, 500] call kat_aceMisc_fnc_conditionIV";
callbackSuccess = "[_player, _target, _selectionName, 'SalineIV_500', ['ACE_salineIV_500']] call kat_aceMisc_fnc_treatmentIV";
};
class SalineIV_Stand_250: SalineIV_Stand {
displayName = "$STR_kat_aceMisc_Display_IVStand_250";
condition = "[_player, 250] call kat_aceMisc_fnc_conditionIV";
callbackSuccess = "[_player, _target, _selectionName, 'SalineIV_250'] call kat_aceMisc_fnc_treatmentIV";
condition = "params ['_player'];[_player, 250] call kat_aceMisc_fnc_conditionIV";
callbackSuccess = "[_player, _target, _selectionName, 'SalineIV_250', ['ACE_salineIV_250']] call kat_aceMisc_fnc_treatmentIV";
};
class PersonalAidKit;
class LimitWounds: PersonalAidKit {
Expand Down
3 changes: 2 additions & 1 deletion addons/kat_acemisc/functions/fn_conditionIV.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ params [
if !(kat_aceMisc_enable) exitWith {false};

private _object = nearestObjects [_player, ['Land_IntravenStand_01_1bag_F', 'Land_IntravenStand_01_2bags_F'], 10, false];
if (isNil "_object") exitWith {false};
_object = _object select {_ml in (_x getVariable ["kat_aceMisc_stand", []])};
_object = _object select 0;
if (isNil "_object") exitWith {false};
_object = _object select 0;
if (_object distance _player <= 10) exitWith {true};
false;
4 changes: 2 additions & 2 deletions addons/kat_acemisc/functions/fn_treatmentIV.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* Public: No
*/

params ["_player", "_target", "_selectionName", "_className"];
params ["_player", "_target", "_selectionName", "_className", "_item"];

private _value = 0;

Expand All @@ -30,4 +30,4 @@ switch (_className) do {
};
};
[_player, _value] call kat_aceMisc_fnc_removeIVbag;
[_player, _target, _selectionName, _className] call ace_medical_fnc_treatmentIV;
[_player, _target, _selectionName, _className, _item] call ace_medical_fnc_treatmentIV;

0 comments on commit 529b6bd

Please sign in to comment.