mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Code Cleanup Medical Module (Part 3).
This commit is contained in:
parent
10127ed957
commit
ff6c8a31be
@ -13,5 +13,5 @@
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
[_this, QUOTE(DFUNC(actionCheckBloodPressureLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||
params ["_caller", "_target"];
|
||||
[[_caller, _target], QUOTE(DFUNC(actionCheckBloodPressureLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||
|
@ -17,9 +17,10 @@
|
||||
private ["_bloodPressure", "_logOutPut", "_output"];
|
||||
params ["_caller", "_target"];
|
||||
|
||||
_bloodPressure = [_target] call FUNC(getBloodPressure);
|
||||
if (!alive _target) then {
|
||||
_bloodPressure = [0,0];
|
||||
_bloodPressure = if (!alive _target) then {
|
||||
[0,0]
|
||||
} else {
|
||||
[_target] call FUNC(getBloodPressure)
|
||||
};
|
||||
_bloodPressure params ["_bloodPressureLow", "_bloodPressureLow"];
|
||||
_output = "";
|
||||
|
@ -13,5 +13,5 @@
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
[_this, QUOTE(DFUNC(actionCheckPulseLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||
params ["_caller","_target"];
|
||||
[[_caller, _target], QUOTE(DFUNC(actionCheckPulseLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||
|
@ -18,14 +18,13 @@ private "_vehicle";
|
||||
params ["_caller", "_target"];
|
||||
|
||||
if ([_target] call EFUNC(common,isAwake)) exitwith {
|
||||
// TODO localization
|
||||
["displayTextStructured", [_caller], [["This person (%1) is awake and cannot be loaded", [_target] call EFUNC(common,getName)], 1.5, _caller]] call EFUNC(common,targetEvent);
|
||||
["displayTextStructured", [_caller], [[localize LSTRING(CanNotLoaded), [_target] call EFUNC(common,getName)], 1.5, _caller]] call EFUNC(common,targetEvent);
|
||||
};
|
||||
if ([_target] call FUNC(isBeingCarried)) then {
|
||||
_this call EFUNC(dragging,dropObject_carry);
|
||||
["_caller", "_target"] call EFUNC(dragging,dropObject_carry);
|
||||
};
|
||||
if ([_target] call FUNC(isBeingDragged)) then {
|
||||
_this call EFUNC(dragging,dropObject);
|
||||
["_caller", "_target"] call EFUNC(dragging,dropObject);
|
||||
};
|
||||
|
||||
_vehicle = _this call EFUNC(common,loadPerson);
|
||||
_vehicle = ["_caller", "_target"] call EFUNC(common,loadPerson);
|
||||
|
@ -24,7 +24,7 @@ _tourniquets = _target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]];
|
||||
|
||||
// Check if there is a tourniquet on this bodypart
|
||||
if ((_tourniquets select _part) == 0) exitwith {
|
||||
_output = "There is no tourniquet on this body part!";
|
||||
_output = localize LSTRING(noTourniquetOnBodyPart);
|
||||
["displayTextStructured", [_caller], [_output, 1.5, _caller]] call EFUNC(common,targetEvent);
|
||||
};
|
||||
|
||||
|
@ -17,13 +17,13 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_moment", "_logVarName", "_log","_newLog", "_logs"];
|
||||
params ["_unit", "_type", "_allMapMarkers", "_arguments"];
|
||||
params ["_unit", "_type", "_message", "_arguments"];
|
||||
|
||||
if (!local _unit) exitwith {
|
||||
[_this, QUOTE(DFUNC(addToLog)), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||
[_this, QFUNC(addToLog), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||
};
|
||||
|
||||
date params ["_minute", "_hour"];
|
||||
date params ["", "", "", "_minute", "_hour"];
|
||||
|
||||
_moment = if (_minute < 10) then {
|
||||
format["%1:0%2", _hour, _minute]
|
||||
|
@ -27,7 +27,7 @@ _actions = [];
|
||||
str(_unit),
|
||||
[_unit, true] call EFUNC(common,getName),
|
||||
"",
|
||||
{[_player, _parameters select 0] call FUNC(actionUnloadUnit);},
|
||||
{[_player, (_this select 2) select 0] call FUNC(actionUnloadUnit);},
|
||||
{true},
|
||||
{},
|
||||
[_unit]
|
||||
|
@ -28,4 +28,4 @@ call {
|
||||
if (_typeOfProjectile isKindOf "BombCore") exitWith {"explosive"};
|
||||
if (_typeOfProjectile isKindOf "Grenade") exitWith {"grenade"};
|
||||
toLower _typeOfProjectile
|
||||
};
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ if (diag_frameno > (_unit getVariable [QGVAR(frameNo_damageCaching), -3]) + 2) t
|
||||
[{
|
||||
private ["_args", "_params"];
|
||||
params ["_args", "_idPFH"];
|
||||
params ["_unit", "_frameno"];
|
||||
_args params ["_unit", "_frameno"];
|
||||
if (diag_frameno > _frameno + 2) then {
|
||||
_unit setDamage 0;
|
||||
|
||||
|
@ -3617,5 +3617,10 @@
|
||||
<English>Distance to %1 has become to far for treatment</English>
|
||||
<Polish>%1 odszedł zbyt daleko, nie można kontynuować leczenia</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_CanNotLoaded">
|
||||
<English>This person (%1) is awake and cannot be loaded</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_noTourniquetOnBodyPart">
|
||||
<English>There is no tourniquet on this body part!</English>
|
||||
</Package>
|
||||
</Project>
|
||||
</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user