ACE3/addons/medical_treatment/functions/fnc_placeInGrave.sqf
Drofseh 94f3b301e0
Medical Treatment - Add Grave Digging for Corpse Disposal (#9276)
* Add grave digging

* Update fnc_placeInBodyBagOrGrave.sqf

* Update fnc_placeInBodyBagOrGrave.sqf

* Update fnc_placeInBodyBagOrGrave.sqf

* Update addons/medical_treatment/functions/fnc_placeInBodyBag.sqf

Co-authored-by: BrettMayson <brett@mayson.io>

* Add setting to enable/disable

* improvements

- fix flipped bool in fnc_canDigGrave
- improve fnc_placeInBodyBagOrGrave.sqf by splitting out some checks and item assignment into separate bodybag and grave functions

* fix typo in variable

* Apply suggestions from code review

Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>

* add to XEH_PREP and fix event for non-local patient

* Add interaction to check name on headstone

* Update addons/medical_treatment/XEH_postInit.sqf

Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>

* Simplify Setting

* Apply suggestions from code review

Co-authored-by: jonpas <jonpas33@gmail.com>

* Update addons/medical_treatment/stringtable.xml

Co-authored-by: jonpas <jonpas33@gmail.com>

* Make placeInBodyBagOrGrave more generic and use any grave class

* Update addons/medical_treatment/functions/fnc_placeInGrave.sqf

Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>

* Update medical-treatment-framework.md

* Update docs/wiki/framework/medical-treatment-framework.md

Co-authored-by: jonpas <jonpas33@gmail.com>

* update docs

* Update addons/medical_treatment/functions/fnc_placeInBodyBagOrGrave.sqf

* Update addons/medical_treatment/functions/fnc_placeInGrave.sqf

* fix includes

---------

Co-authored-by: BrettMayson <brett@mayson.io>
Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
Co-authored-by: jonpas <jonpas33@gmail.com>
Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
2023-09-24 15:57:08 -04:00

32 lines
863 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: Glowbal, drofseh
* Places a dead body inside a grave.
*
* Arguments:
* 0: Medic <OBJECT>
* 1: Patient <OBJECT>
*
* Return Value:
* None
*
* Example:
* [player, cursorObject] call ace_medical_treatment_fnc_placeInGrave
*
* Public: No
*/
params ["_medic", "_patient"];
TRACE_1("placeInGrave",_patient);
if ((alive _patient) && {GVAR(allowGraveDigging) < 2}) exitWith {
[LSTRING(bodybagWhileStillAlive)] call EFUNC(common,displayTextStructured);
};
private _graveClassname = missionNameSpace getVariable [QGVAR(graveClassname), "Land_Grave_dirt_F"];
// Land_Grave_dirt_F needs to be rotated 90 degrees to line up with the body
private _graveRotation = missionNameSpace getVariable [QGVAR(graveRotation), 90];
[_this, _graveClassname, [0,0,0], _graveRotation] call FUNC(placeInBodyBagOrGrave);