mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Changed: IVs are now synced and medics can see a unit is receiving an IV
This commit is contained in:
parent
89015c94d4
commit
7ffd690a71
@ -61,6 +61,18 @@ if (_show) then {
|
||||
_genericMessages pushback [localize "STR_ACE_MEDICAL_STATUS_PAIN", [1, 1, 1, 1]];
|
||||
};
|
||||
|
||||
_totalIvVolume = 0;
|
||||
{
|
||||
private "_value";
|
||||
_value = _target getvariable _x;
|
||||
if !(isnil "_value") then {
|
||||
_totalIvVolume = _totalIvVolume + (_target getvariable [_x, 0]);
|
||||
};
|
||||
}foreach GVAR(IVBags);
|
||||
if (_totalIvVolume >= 1) then {
|
||||
_genericMessages pushback [format[localize "STR_ACE_MEDICAL_receivingIvVolume", floor _totalIvVolume], [1, 1, 1, 1]];
|
||||
};
|
||||
|
||||
_selectionBloodLoss = [0,0,0,0,0,0];
|
||||
if (GVAR(level) >= 2) then {
|
||||
_openWounds = _target getvariable [QGVAR(openWounds), []];
|
||||
|
@ -44,6 +44,12 @@ if (_bloodVolume < 100.0) then {
|
||||
_unit setvariable [_x,_ivVolume];
|
||||
};
|
||||
}foreach GVAR(IVBags);
|
||||
} else {
|
||||
{
|
||||
if ((_unit getvariable [_x, 0]) > 0) then {
|
||||
_unit setvariable [_x, 0]; // lets get rid of exessive IV volume
|
||||
};
|
||||
}foreach GVAR(IVBags);
|
||||
};
|
||||
|
||||
_bloodVolumeChange;
|
||||
|
@ -167,4 +167,15 @@ if (GVAR(level) >= 2) then {
|
||||
[_unit] call FUNC(setCardiacArrest);
|
||||
};
|
||||
};
|
||||
|
||||
// syncing any remaining values
|
||||
if (_syncValues) then {
|
||||
{
|
||||
private "_value";
|
||||
_value = _unit getvariable _x;
|
||||
if !(isnil "_value") then {
|
||||
_unit setvariable [_x,(_unit getvariable [_x, 0]), true];
|
||||
};
|
||||
}foreach GVAR(IVBags);
|
||||
};
|
||||
};
|
||||
|
@ -19,6 +19,9 @@ private ["_target", "_ivItem", "_config", "_volumeAdded", "_typeOf", "_varName"]
|
||||
_target = _this select 0;
|
||||
_ivItem = _this select 1;
|
||||
|
||||
_bloodVolume = _target getvariable [QGVAR(bloodVolume), 100];
|
||||
if (_bloodVolume >= 100) exitwith {};
|
||||
|
||||
// Find the proper attributes for the used IV
|
||||
_config = (configFile >> "ACE_Medical_Advanced" >> "Treatment" >> "IV");
|
||||
_volumeAdded = getNumber (_config >> "volume");
|
||||
@ -31,7 +34,7 @@ if (isClass (_config >> _className)) then {
|
||||
};
|
||||
|
||||
_varName = format["ACE_Medical_IVVolume_%1",_typeOf];
|
||||
_target setvariable [_varName, (_target getvariable [_varName, 0]) + _volumeAdded];
|
||||
_target setvariable [_varName, (_target getvariable [_varName, 0]) + _volumeAdded, true];
|
||||
|
||||
if !(_varName in GVAR(IVBags)) then {
|
||||
GVAR(IVBags) pushback _varName;
|
||||
|
@ -336,6 +336,9 @@
|
||||
<French>Garot [CAT]</French>
|
||||
<Polish>Opaska uciskowa [CAT]</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_MEDICAL_receivingIvVolume">
|
||||
<English>Receiving IV [%1ml]</English>
|
||||
</Key>
|
||||
</Container>
|
||||
<Container name="CfgWeapons">
|
||||
<Key ID="STR_ACE_MEDICAL_BANDAGE_BASIC_DISPLAY">
|
||||
|
Loading…
Reference in New Issue
Block a user