mirror of
https://github.com/acemod/ACE3.git
synced 2025-07-25 04:42:48 +00:00
formating
This commit is contained in:
@ -20,3 +20,4 @@ if (isServer) then {
|
|||||||
// action events
|
// action events
|
||||||
[QGVAR(actionCheckPulseLocal), FUNC(actionCheckPulseLocal)] call CBA_fnc_addEventHandler;
|
[QGVAR(actionCheckPulseLocal), FUNC(actionCheckPulseLocal)] call CBA_fnc_addEventHandler;
|
||||||
[QGVAR(actionCheckBloodPressureLocal), FUNC(actionCheckBloodPressureLocal)] call CBA_fnc_addEventHandler;
|
[QGVAR(actionCheckBloodPressureLocal), FUNC(actionCheckBloodPressureLocal)] call CBA_fnc_addEventHandler;
|
||||||
|
[QGVAR(actionPlaceInBodyBag), FUNC(actionPlaceInBodyBag)] call CBA_fnc_addEventHandler;
|
||||||
|
@ -11,20 +11,22 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
params ["_caller", "_target"];
|
params ["_caller", "_target"];
|
||||||
|
|
||||||
if ([_target] call EFUNC(common,isAwake)) exitWith {
|
if (_target call EFUNC(common,isAwake)) exitWith {
|
||||||
[QEGVAR(common,displayTextStructured), [[ELSTRING(medical,CanNotLoaded), [_target] call EFUNC(common,getName)], 1.5, _caller], [_caller]] call CBA_fnc_targetEvent;
|
[QEGVAR(common,displayTextStructured), [[ELSTRING(medical,CanNotLoaded), _target call EFUNC(common,getName)], 1.5, _caller], _caller] call CBA_fnc_targetEvent;
|
||||||
};
|
};
|
||||||
if ([_target] call FUNC(isBeingCarried)) then {
|
|
||||||
|
if (_target call FUNC(isBeingCarried)) then {
|
||||||
[_caller, _target] call EFUNC(dragging,dropObject_carry);
|
[_caller, _target] call EFUNC(dragging,dropObject_carry);
|
||||||
};
|
};
|
||||||
if ([_target] call FUNC(isBeingDragged)) then {
|
|
||||||
|
if (_target call FUNC(isBeingDragged)) then {
|
||||||
[_caller, _target] call EFUNC(dragging,dropObject);
|
[_caller, _target] call EFUNC(dragging,dropObject);
|
||||||
};
|
};
|
||||||
|
|
||||||
private _vehicle = [_caller, _target] call EFUNC(common,loadPerson);
|
private _vehicle = [_caller, _target] call EFUNC(common,loadPerson);
|
||||||
_vehicle;
|
|
||||||
|
_vehicle
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
*
|
*
|
||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
params ["_caller", "_target"];
|
params ["_caller", "_target"];
|
||||||
@ -22,13 +21,13 @@ TRACE_2("params",_caller,_target);
|
|||||||
|
|
||||||
if (!local _target) exitWith {
|
if (!local _target) exitWith {
|
||||||
TRACE_1("running where local",local _target);
|
TRACE_1("running where local",local _target);
|
||||||
[QGVAR(actionPlaceInBodyBag), [_caller, _target], [_target]] call CBA_fnc_targetEvent;
|
[QGVAR(actionPlaceInBodyBag), [_caller, _target], _target] call CBA_fnc_targetEvent;
|
||||||
objNull
|
objNull
|
||||||
};
|
};
|
||||||
|
|
||||||
if (alive _target) then {
|
if (alive _target) then {
|
||||||
TRACE_1("manually killing with setDead",_target);
|
TRACE_1("manually killing with setDead",_target);
|
||||||
[_target, true] call EFUNC(medical,setDead);
|
[_target, true, "buried_alive"] call EFUNC(medical,setDead);
|
||||||
};
|
};
|
||||||
|
|
||||||
private _position = (getPosASL _target) vectorAdd [0, 0, 0.2];
|
private _position = (getPosASL _target) vectorAdd [0, 0, 0.2];
|
||||||
|
@ -12,13 +12,12 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
params ["_caller", "_target", ["_drag", false]];
|
params ["_caller", "_target", ["_drag", false]];
|
||||||
|
|
||||||
// cannot unload a unit not in a vehicle.
|
// cannot unload a unit not in a vehicle.
|
||||||
if (vehicle _target == _target) exitWith {};
|
if (vehicle _target == _target) exitWith {};
|
||||||
if (([_target] call EFUNC(common,isAwake))) exitWith {};
|
if (_target call EFUNC(common,isAwake)) exitWith {};
|
||||||
|
|
||||||
["ace_unloadPersonEvent", [_target, vehicle _target, _caller], _target] call CBA_fnc_targetEvent;
|
["ace_unloadPersonEvent", [_target, vehicle _target, _caller], _target] call CBA_fnc_targetEvent;
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
*
|
*
|
||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
params ["_unit", "_type", "_message", "_arguments"];
|
params ["_unit", "_type", "_message", "_arguments"];
|
||||||
@ -24,26 +23,30 @@ if (!local _unit) exitWith {
|
|||||||
|
|
||||||
date params ["", "", "", "_hour", "_minute"];
|
date params ["", "", "", "_hour", "_minute"];
|
||||||
|
|
||||||
private _moment = format [ (["%1:%2", "%1:0%2"] select (_minute < 10)), _hour, _minute];
|
private _moment = format [["%1:%2", "%1:0%2"] select (_minute < 10), _hour, _minute];
|
||||||
private _logVarName = format [QEGVAR(medical,logFile_%1), _type];
|
private _logVarName = format [QEGVAR(medical,logFile_%1), _type];
|
||||||
|
|
||||||
private _log = _unit getVariable [_logVarName, []];
|
private _log = _unit getVariable [_logVarName, []];
|
||||||
|
|
||||||
if (count _log >= 8) then {
|
if (count _log >= 8) then {
|
||||||
private _newLog = [];
|
private _newLog = [];
|
||||||
|
|
||||||
{
|
{
|
||||||
// ensure the first element will not be added
|
// ensure the first element will not be added
|
||||||
if (_forEachIndex > 0) then {
|
if (_forEachIndex > 0) then {
|
||||||
_newLog pushBack _x;
|
_newLog pushBack _x;
|
||||||
};
|
};
|
||||||
} forEach _log;
|
} forEach _log;
|
||||||
|
|
||||||
_log = _newLog;
|
_log = _newLog;
|
||||||
};
|
};
|
||||||
|
|
||||||
_log pushBack [_message, _moment, _type, _arguments];
|
_log pushBack [_message, _moment, _type, _arguments];
|
||||||
|
|
||||||
_unit setVariable [_logVarName, _log, true];
|
_unit setVariable [_logVarName, _log, true];
|
||||||
["ace_medicalLogEntryAdded", [_unit, _type, _message, _arguments]] call CBA_fnc_localEvent;
|
["ace_medicalLogEntryAdded", [_unit, _type, _message, _arguments]] call CBA_fnc_localEvent;
|
||||||
|
|
||||||
private _logs = _unit getVariable [QEGVAR(medical,allLogs), []];
|
private _logs = _unit getVariable [QEGVAR(medical,allLogs), []];
|
||||||
|
|
||||||
if !(_logVarName in _logs) then {
|
if !(_logVarName in _logs) then {
|
||||||
_logs pushBack _logVarName;
|
_logs pushBack _logVarName;
|
||||||
_unit setVariable [QEGVAR(medical,allLogs), _logs, true];
|
_unit setVariable [QEGVAR(medical,allLogs), _logs, true];
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
*
|
*
|
||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
params ["_unit", "_newItem"];
|
params ["_unit", "_newItem"];
|
||||||
@ -23,14 +22,15 @@ if (!local _unit) exitWith {
|
|||||||
private _log = _unit getVariable [QEGVAR(medical,triageCard), []];
|
private _log = _unit getVariable [QEGVAR(medical,triageCard), []];
|
||||||
private _inList = false;
|
private _inList = false;
|
||||||
private _amount = 1;
|
private _amount = 1;
|
||||||
|
|
||||||
{
|
{
|
||||||
if ((_x select 0) == _newItem) exitWith {
|
if (_x select 0 == _newItem) exitWith {
|
||||||
private _info = _log select _forEachIndex;
|
private _info = _log select _forEachIndex;
|
||||||
_info set [1, (_info select 1) + 1];
|
_info set [1, (_info select 1) + 1];
|
||||||
_info set [2, CBA_missionTime];
|
_info set [2, CBA_missionTime];
|
||||||
_log set [_forEachIndex, _info];
|
_log set [_forEachIndex, _info];
|
||||||
|
|
||||||
_amount = (_info select 1);
|
_amount = _info select 1;
|
||||||
_inList = true;
|
_inList = true;
|
||||||
};
|
};
|
||||||
} forEach _log;
|
} forEach _log;
|
||||||
|
Reference in New Issue
Block a user