ACE3/addons/medical_treatment/functions/fnc_canDigGrave.sqf

27 lines
674 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: Ruthberg, commy2, esteldunedain, drofseh
* Checks if a unit can dig a grave at the position of the patient.
*
* Arguments:
* 0: Medic <OBJECT>
* 1: Patient <OBJECT>
*
* Return Value:
* Can dig <BOOL>
*
* Example:
* [player, cursorObject] call ace_medical_treatment_fnc_canDigGrave
*
* Public: No
*/
params ["_medic", "_patient"];
if !(["ace_trenches"] call EFUNC(common,isModLoaded)) exitWith {false};
(GVAR(allowGraveDigging) > 0)
&& {!((_patient isKindOf "CaManBase") && {_patient call EFUNC(common,isAwake)})}
&& {_patient call EFUNC(common,canDig)}
&& {_medic call EFUNC(trenches,hasEntrenchingTool)}