ACE3/addons/medical_treatment/functions/fnc_placeInGrave.sqf

34 lines
848 B
Plaintext
Raw Permalink Normal View History

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 19:57:08 +00:00
#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 = "";
if (GVAR(graveDiggingMarker)) then {
_graveClassname = missionNamespace getVariable [QGVAR(graveClassname), "ACE_Grave"];
};
private _graveRotation = missionNameSpace getVariable [QGVAR(graveRotation), 0];
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 19:57:08 +00:00
[_this, _graveClassname, [0,0,0], _graveRotation, true] call FUNC(placeInBodyBagOrGrave)