mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Advanced - Bloodbag lookup by treatment not item
This commit is contained in:
parent
d752dd50d0
commit
d82fcd1f96
@ -27,6 +27,6 @@ _items = _this select 4;
|
||||
if (count _items == 0) exitwith {};
|
||||
|
||||
_removeItem = _items select 0;
|
||||
[[_target, _removeItem], QUOTE(DFUNC(treatmentIVLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||
[[_target, _className], QUOTE(DFUNC(treatmentIVLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||
[_target, _removeItem] call FUNC(addToTriageCard);
|
||||
[_target, "activity", "STR_ACE_Medical_Activity_gaveIV", [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog);
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The medic <OBJECT>
|
||||
* 1: Item used classname <STRING>
|
||||
* 1: Treatment classname <STRING>
|
||||
*
|
||||
*
|
||||
* Return Value:
|
||||
@ -15,9 +15,9 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_target", "_ivItem", "_config", "_volumeAdded", "_typeOf", "_varName", "_bloodVolume"];
|
||||
private ["_target", "_treatmentClassname", "_config", "_volumeAdded", "_typeOf", "_varName", "_bloodVolume"];
|
||||
_target = _this select 0;
|
||||
_ivItem = _this select 1;
|
||||
_treatmentClassname = _this select 1;
|
||||
|
||||
_bloodVolume = _target getvariable [QGVAR(bloodVolume), 100];
|
||||
if (_bloodVolume >= 100) exitwith {};
|
||||
@ -27,10 +27,12 @@ _config = (configFile >> "ACE_Medical_Advanced" >> "Treatment" >> "IV");
|
||||
_volumeAdded = getNumber (_config >> "volume");
|
||||
_typeOf = getText (_config >> "type");
|
||||
|
||||
if (isClass (_config >> _ivItem)) then {
|
||||
_config = (_config >> _ivItem);
|
||||
if (isClass (_config >> _treatmentClassname)) then {
|
||||
_config = (_config >> _treatmentClassname);
|
||||
if (isNumber (_config >> "volume")) then { _volumeAdded = getNumber (_config >> "volume");};
|
||||
if (isText (_config >> "type")) then { _typeOf = getText (_config >> "type"); };
|
||||
} else {
|
||||
ERROR("IV Treatment Classname not found");
|
||||
};
|
||||
|
||||
_varName = format["ACE_Medical_IVVolume_%1",_typeOf];
|
||||
|
Loading…
Reference in New Issue
Block a user