mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Added place in bodybag function
This commit is contained in:
parent
46f28763b6
commit
925aa094c7
@ -39,6 +39,7 @@ PREP(treatmentTourniquet);
|
|||||||
PREP(treatmentTourniquetLocal);
|
PREP(treatmentTourniquetLocal);
|
||||||
PREP(addToLog);
|
PREP(addToLog);
|
||||||
PREP(addToTriageCard);
|
PREP(addToTriageCard);
|
||||||
|
PREP(actionPlaceInBodyBag);
|
||||||
|
|
||||||
GVAR(injuredUnitCollection) = [];
|
GVAR(injuredUnitCollection) = [];
|
||||||
call FUNC(parseConfigForInjuries);
|
call FUNC(parseConfigForInjuries);
|
||||||
|
39
addons/medical/functions/fnc_actionPlaceInBodyBag.sqf
Normal file
39
addons/medical/functions/fnc_actionPlaceInBodyBag.sqf
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* Author: Glowbal
|
||||||
|
* Replace a dead body by a bodybag
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: The patient <OBJECT>
|
||||||
|
* 1: The new item classname <STRING>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* nil
|
||||||
|
*
|
||||||
|
* Public: Yes
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
private ["_target","_caller", "_nameOfUnit", "_onPosition", "_bodyBagCreated"];
|
||||||
|
_caller = _this select 0;
|
||||||
|
_target = _this select 1;
|
||||||
|
|
||||||
|
if !([_caller, "ACE_itemBodyBag"] call EFUNC(common,hasItem)) exitwith {};
|
||||||
|
|
||||||
|
[_caller, "ACE_itemBodyBag"] call EFUNC(common,useItem);
|
||||||
|
|
||||||
|
_nameOfUnit = [_unit] call EFUNC(common,getName);
|
||||||
|
if (alive _unit) then {
|
||||||
|
// force kill the unit.
|
||||||
|
[_unit, true] call FUNC(setDead);
|
||||||
|
};
|
||||||
|
_onPosition = getPos _unit;
|
||||||
|
deleteVehicle _unit;
|
||||||
|
_bodyBagCreated = createVehicle ["ACE_bodyBag", _onPosition, [], 0, "NONE"];
|
||||||
|
// reset the position to ensure it is on the correct one.
|
||||||
|
_bodyBagCreated setPos _onPosition;
|
||||||
|
|
||||||
|
// TODO Does this need to be something with QUOTE(DEFUNC)?
|
||||||
|
[[_bodyBagCreated], QEFUNC(common,revealObject), true] call call EFUNC(common,execRemoteFnc);
|
||||||
|
|
||||||
|
_bodyBagCreated;
|
@ -1,11 +1,17 @@
|
|||||||
/**
|
/*
|
||||||
* fn_addActivityToLog.sqf
|
* Author: Glowbal
|
||||||
* @Descr: adds an item to the activity log
|
* Add an entry to the specified log
|
||||||
* @Author: Glowbal
|
|
||||||
*
|
*
|
||||||
* @Arguments: [unit OBJECT, type STRING, message STRING]
|
* Arguments:
|
||||||
* @Return:
|
* 0: The patient <OBJECT>
|
||||||
* @PublicAPI: false
|
* 1: The log type <STRING>
|
||||||
|
* 2: The message <STRING>
|
||||||
|
* 3: The arguments for localization <ARRAY>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* nil
|
||||||
|
*
|
||||||
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
/**
|
/*
|
||||||
* fn_addToTriageList.sqf
|
* Author: Glowbal
|
||||||
* @Descr: N/A
|
* Add an entry to the triage card
|
||||||
* @Author: Glowbal
|
|
||||||
*
|
*
|
||||||
* @Arguments: []
|
* Arguments:
|
||||||
* @Return:
|
* 0: The patient <OBJECT>
|
||||||
* @PublicAPI: false
|
* 1: The new item classname <STRING>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* nil
|
||||||
|
*
|
||||||
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
Loading…
Reference in New Issue
Block a user