mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
02365609b5
* Refactor medical to use hashmaps for wound storage - We most frequently want to access wounds by body part, so this makes that a constant time lookup. - The body part index is no longer stored in every wound since it's inherent in the wound storage. - Using body part names as the keys of the hashmap to improve code clarity (no more magic numbers). closes #6468 * Add deserilization migration from old wound arrays Will migrate from old form array wound storage to the new hashmap strucutre during deserlization. This is relevant for communities piping medical state out to a database or similar between sessions. * fix issue with suture stitching * change version number in comment --------- Co-authored-by: Salluci <salluci.lovi@gmail.com>
24 lines
528 B
Plaintext
24 lines
528 B
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* Author: Katalam, mharis001, Brett Mayson
|
|
* Checks if the patient can be stitched.
|
|
*
|
|
* Arguments:
|
|
* 0: Medic <OBJECT>
|
|
* 1: Patient <OBJECT>
|
|
*
|
|
* ReturnValue:
|
|
* Can Stitch <BOOL>
|
|
*
|
|
* Example:
|
|
* [player, cursorTarget] call ace_medical_treatment_fnc_canStitch
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
params ["_medic", "_patient"];
|
|
|
|
if ((GVAR(consumeSurgicalKit) == 2) && {!([_medic, _patient, ["ACE_suture"]] call FUNC(hasItem))}) exitWith {false};
|
|
|
|
count (_patient call FUNC(getStitchableWounds)) > 0
|