mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
formating
This commit is contained in:
parent
6b84bd1ff6
commit
633c6f0ce4
@ -20,3 +20,4 @@ if (isServer) then {
|
||||
// action events
|
||||
[QGVAR(actionCheckPulseLocal), FUNC(actionCheckPulseLocal)] 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
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_caller", "_target"];
|
||||
|
||||
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;
|
||||
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;
|
||||
};
|
||||
if ([_target] call FUNC(isBeingCarried)) then {
|
||||
|
||||
if (_target call FUNC(isBeingCarried)) then {
|
||||
[_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);
|
||||
};
|
||||
|
||||
private _vehicle = [_caller, _target] call EFUNC(common,loadPerson);
|
||||
_vehicle;
|
||||
|
||||
_vehicle
|
||||
|
@ -14,7 +14,6 @@
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_caller", "_target"];
|
||||
@ -22,13 +21,13 @@ TRACE_2("params",_caller,_target);
|
||||
|
||||
if (!local _target) exitWith {
|
||||
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
|
||||
};
|
||||
|
||||
if (alive _target) then {
|
||||
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];
|
||||
@ -38,7 +37,7 @@ private _spinePos = _target modelToWorldVisual (_target selectionPosition "Spine
|
||||
private _dirVect = _headPos vectorFromTo _spinePos;
|
||||
private _direction = _dirVect call CBA_fnc_vectDir;
|
||||
|
||||
//move the body away now, so it won't physX the bodyBag object (this setPos seems to need to be called where object is local)
|
||||
// move the body away now, so it won't physX the bodyBag object (this setPos seems to need to be called where object is local)
|
||||
_target setPosASL [-5000, -5000, 0];
|
||||
|
||||
private _bodyBag = createVehicle ["ACE_bodyBagObject", _position, [], 0, ""];
|
||||
@ -47,6 +46,6 @@ private _bodyBag = createVehicle ["ACE_bodyBagObject", _position, [], 0, ""];
|
||||
_bodyBag setPosASL _position;
|
||||
_bodyBag setDir _direction;
|
||||
|
||||
["ace_placedInBodyBag", [_target, _bodyBag]] call CBA_fnc_globalEvent; //hide and delete body on server
|
||||
["ace_placedInBodyBag", [_target, _bodyBag]] call CBA_fnc_globalEvent; // hide and delete body on server
|
||||
|
||||
_bodyBag
|
||||
|
@ -12,13 +12,12 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_caller", "_target", ["_drag", false]];
|
||||
|
||||
// cannot unload a unit not in a vehicle.
|
||||
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;
|
||||
|
@ -13,7 +13,6 @@
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit", "_type", "_message", "_arguments"];
|
||||
@ -24,26 +23,30 @@ if (!local _unit) exitWith {
|
||||
|
||||
date params ["", "", "", "_hour", "_minute"];
|
||||
|
||||
private _moment = format [ (["%1:%2", "%1:0%2"] select (_minute < 10)), _hour, _minute];
|
||||
private _logVarName = format[QEGVAR(medical,logFile_%1), _type];
|
||||
|
||||
private _moment = format [["%1:%2", "%1:0%2"] select (_minute < 10), _hour, _minute];
|
||||
private _logVarName = format [QEGVAR(medical,logFile_%1), _type];
|
||||
private _log = _unit getVariable [_logVarName, []];
|
||||
|
||||
if (count _log >= 8) then {
|
||||
private _newLog = [];
|
||||
|
||||
{
|
||||
// ensure the first element will not be added
|
||||
if (_forEachIndex > 0) then {
|
||||
_newLog pushBack _x;
|
||||
};
|
||||
} forEach _log;
|
||||
|
||||
_log = _newLog;
|
||||
};
|
||||
|
||||
_log pushBack [_message, _moment, _type, _arguments];
|
||||
|
||||
_unit setVariable [_logVarName, _log, true];
|
||||
["ace_medicalLogEntryAdded", [_unit, _type, _message, _arguments]] call CBA_fnc_localEvent;
|
||||
|
||||
private _logs = _unit getVariable [QEGVAR(medical,allLogs), []];
|
||||
|
||||
if !(_logVarName in _logs) then {
|
||||
_logs pushBack _logVarName;
|
||||
_unit setVariable [QEGVAR(medical,allLogs), _logs, true];
|
||||
|
@ -4,14 +4,13 @@
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The patient <OBJECT>
|
||||
* 1: The new item classname <STRING>
|
||||
* 1: The new item class name <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit", "_newItem"];
|
||||
@ -23,14 +22,15 @@ if (!local _unit) exitWith {
|
||||
private _log = _unit getVariable [QEGVAR(medical,triageCard), []];
|
||||
private _inList = false;
|
||||
private _amount = 1;
|
||||
|
||||
{
|
||||
if ((_x select 0) == _newItem) exitWith {
|
||||
if (_x select 0 == _newItem) exitWith {
|
||||
private _info = _log select _forEachIndex;
|
||||
_info set [1,(_info select 1) + 1];
|
||||
_info set [1, (_info select 1) + 1];
|
||||
_info set [2, CBA_missionTime];
|
||||
_log set [_forEachIndex, _info];
|
||||
|
||||
_amount = (_info select 1);
|
||||
_amount = _info select 1;
|
||||
_inList = true;
|
||||
};
|
||||
} forEach _log;
|
||||
|
Loading…
Reference in New Issue
Block a user