mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Medical Treatment - Suture (#9020)
Co-authored-by: Walthzer <19926813+Walthzer@users.noreply.github.com>
This commit is contained in:
parent
0a2e7d1202
commit
e252ef67d6
@ -286,8 +286,9 @@ class GVAR(actions) {
|
||||
treatmentTime = QFUNC(getStitchTime);
|
||||
condition = QFUNC(canStitch);
|
||||
callbackSuccess = "";
|
||||
callbackStart = QFUNC(surgicalKitStart);
|
||||
callbackProgress = QFUNC(surgicalKitProgress);
|
||||
consumeItem = QGVAR(consumeSurgicalKit);
|
||||
consumeItem = QGVAR(consumeSurgicalKit); // setting can be 0,1,2 - only 1 will consume items[]
|
||||
animationMedic = "AinvPknlMstpSnonWnonDnon_medic1";
|
||||
litter[] = {{"ACE_MedicalLitter_gloves"}};
|
||||
};
|
||||
|
@ -78,6 +78,9 @@ class CfgVehicles {
|
||||
class ACE_MedicalLitter_splint: ACE_MedicalLitterBase {
|
||||
model = QPATHTOF(data\littergeneric_splint.p3d);
|
||||
};
|
||||
class ACE_MedicalLitter_suture: ACE_MedicalLitterBase {
|
||||
model = QPATHTOF(data\littergeneric_suture.p3d);
|
||||
};
|
||||
|
||||
// Treatment items
|
||||
class Item_Base_F;
|
||||
@ -232,6 +235,16 @@ class CfgVehicles {
|
||||
MACRO_ADDITEM(ACE_surgicalKit,1);
|
||||
};
|
||||
};
|
||||
class ACE_sutureItem: Item_Base_F {
|
||||
scope = 2;
|
||||
scopeCurator = 2;
|
||||
displayName = CSTRING(Suture_Display);
|
||||
author = ECSTRING(common,ACETeam);
|
||||
vehicleClass = "Items";
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_suture,1);
|
||||
};
|
||||
};
|
||||
class ACE_bodyBagItem: Item_Base_F {
|
||||
scope = 2;
|
||||
scopeCurator = 2;
|
||||
|
@ -252,6 +252,18 @@ class CfgWeapons {
|
||||
mass = 15;
|
||||
};
|
||||
};
|
||||
class ACE_suture: ACE_ItemCore {
|
||||
scope = 2;
|
||||
author = ECSTRING(common,ACETeam);
|
||||
displayName = CSTRING(Suture_Display);
|
||||
model = QPATHTOF(data\suture.p3d);
|
||||
picture = QPATHTOF(ui\suture_ca.paa);
|
||||
descriptionShort = CSTRING(Suture_Desc_Short);
|
||||
descriptionUse = CSTRING(Suture_Desc_Use);
|
||||
class ItemInfo: CBA_MiscItem_ItemInfo {
|
||||
mass = 1;
|
||||
};
|
||||
};
|
||||
class ACE_bodyBag: ACE_ItemCore {
|
||||
scope = 2;
|
||||
author = ECSTRING(common,ACETeam);
|
||||
|
@ -53,6 +53,7 @@ PREP(setTriageStatus);
|
||||
PREP(splint);
|
||||
PREP(splintLocal);
|
||||
PREP(surgicalKitProgress);
|
||||
PREP(surgicalKitStart);
|
||||
PREP(tourniquet);
|
||||
PREP(tourniquetLocal);
|
||||
PREP(tourniquetRemove);
|
||||
|
@ -3,8 +3,8 @@
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
name = COMPONENT_NAME;
|
||||
units[] = {"ACE_fieldDressingItem","ACE_packingBandageItem","ACE_elasticBandageItem","ACE_tourniquetItem","ACE_splintItem","ACE_morphineItem","ACE_adenosineItem","ACE_epinephrineItem","ACE_plasmaIVItem","ACE_bloodIVItem","ACE_salineIVItem","ACE_quikClotItem","ACE_personalAidKitItem","ACE_surgicalKitItem","ACE_bodyBagItem","ACE_medicalSupplyCrate","ACE_medicalSupplyCrate_advanced"};
|
||||
weapons[] = {"ACE_fieldDressing","ACE_packingBandage","ACE_elasticBandage","ACE_tourniquet","ACE_splint","ACE_morphine","ACE_adenosine","ACE_epinephrine","ACE_plasmaIV","ACE_plasmaIV_500","ACE_plasmaIV_250","ACE_bloodIV","ACE_bloodIV_500","ACE_bloodIV_250","ACE_salineIV","ACE_salineIV_500","ACE_salineIV_250","ACE_quikclot","ACE_personalAidKit","ACE_surgicalKit","ACE_bodyBag"};
|
||||
units[] = {"ACE_fieldDressingItem","ACE_packingBandageItem","ACE_elasticBandageItem","ACE_tourniquetItem","ACE_splintItem","ACE_morphineItem","ACE_adenosineItem","ACE_epinephrineItem","ACE_plasmaIVItem","ACE_bloodIVItem","ACE_salineIVItem","ACE_quikClotItem","ACE_personalAidKitItem","ACE_surgicalKitItem","ACE_sutureItem","ACE_bodyBagItem","ACE_medicalSupplyCrate","ACE_medicalSupplyCrate_advanced"};
|
||||
weapons[] = {"ACE_fieldDressing","ACE_packingBandage","ACE_elasticBandage","ACE_tourniquet","ACE_splint","ACE_morphine","ACE_adenosine","ACE_epinephrine","ACE_plasmaIV","ACE_plasmaIV_500","ACE_plasmaIV_250","ACE_bloodIV","ACE_bloodIV_500","ACE_bloodIV_250","ACE_salineIV","ACE_salineIV_500","ACE_salineIV_250","ACE_quikclot","ACE_personalAidKit","ACE_surgicalKit","ACE_suture","ACE_bodyBag"};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_medical_status", "ace_medical_damage", "ace_apl"};
|
||||
author = ECSTRING(common,ACETeam);
|
||||
|
BIN
addons/medical_treatment/data/littergeneric_suture.p3d
Normal file
BIN
addons/medical_treatment/data/littergeneric_suture.p3d
Normal file
Binary file not shown.
BIN
addons/medical_treatment/data/suture.p3d
Normal file
BIN
addons/medical_treatment/data/suture.p3d
Normal file
Binary file not shown.
96
addons/medical_treatment/data/suture.rvmat
Normal file
96
addons/medical_treatment/data/suture.rvmat
Normal file
@ -0,0 +1,96 @@
|
||||
class StageTI
|
||||
{
|
||||
texture="a3\data_f\default_vehicle_ti_ca.paa";
|
||||
};
|
||||
ambient[]={0.10196079,0.35686275,0.26274511,1};
|
||||
diffuse[]={0.10196079,0.35686275,0.26274511,1};
|
||||
forcedDiffuse[]={0,0,0,1};
|
||||
emmisive[]={0,0,0,0};
|
||||
specular[]={0,0,0,1};
|
||||
specularPower=3.5;
|
||||
PixelShaderID="Super";
|
||||
VertexShaderID="Super";
|
||||
class Stage1
|
||||
{
|
||||
texture="z\ace\addons\medical_treatment\data\suture_nohq.paa";
|
||||
uvSource="tex";
|
||||
class uvTransform
|
||||
{
|
||||
aside[]={1,0,0};
|
||||
up[]={0,1,0};
|
||||
dir[]={0,0,1};
|
||||
pos[]={0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage2
|
||||
{
|
||||
texture="#(argb,8,8,3)color(0.5,0.5,0.5,0.5,DT)";
|
||||
uvSource="tex";
|
||||
class uvTransform
|
||||
{
|
||||
aside[]={1,0,0};
|
||||
up[]={0,1,0};
|
||||
dir[]={0,0,1};
|
||||
pos[]={0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage3
|
||||
{
|
||||
texture="#(argb,8,8,3)color(0,0,0,0,MC)";
|
||||
uvSource="tex";
|
||||
class uvTransform
|
||||
{
|
||||
aside[]={1,0,0};
|
||||
up[]={0,1,0};
|
||||
dir[]={0,0,1};
|
||||
pos[]={0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage4
|
||||
{
|
||||
texture="#(argb,8,8,3)color(1,1,1,1,AS)";
|
||||
uvSource="tex";
|
||||
class uvTransform
|
||||
{
|
||||
aside[]={1,0,0};
|
||||
up[]={0,1,0};
|
||||
dir[]={0,0,1};
|
||||
pos[]={0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage5
|
||||
{
|
||||
texture="z\ace\addons\medical_treatment\data\suture_smdi.paa";
|
||||
uvSource="tex";
|
||||
class uvTransform
|
||||
{
|
||||
aside[]={1,0,0};
|
||||
up[]={0,1,0};
|
||||
dir[]={0,0,1};
|
||||
pos[]={0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage6
|
||||
{
|
||||
texture="#(ai,64,64,1)fresnel(1.5,1)";
|
||||
uvSource="tex";
|
||||
class uvTransform
|
||||
{
|
||||
aside[]={1,0,0};
|
||||
up[]={0,1,0};
|
||||
dir[]={0,0,1};
|
||||
pos[]={0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage7
|
||||
{
|
||||
texture="a3\data_f\env_land_co.paa";
|
||||
uvSource="tex";
|
||||
class uvTransform
|
||||
{
|
||||
aside[]={1,0,0};
|
||||
up[]={0,1,0};
|
||||
dir[]={0,0,1};
|
||||
pos[]={0,0,0};
|
||||
};
|
||||
};
|
BIN
addons/medical_treatment/data/suture_co.paa
Normal file
BIN
addons/medical_treatment/data/suture_co.paa
Normal file
Binary file not shown.
BIN
addons/medical_treatment/data/suture_nohq.paa
Normal file
BIN
addons/medical_treatment/data/suture_nohq.paa
Normal file
Binary file not shown.
BIN
addons/medical_treatment/data/suture_smdi.paa
Normal file
BIN
addons/medical_treatment/data/suture_smdi.paa
Normal file
Binary file not shown.
@ -1,10 +1,10 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Katalam, mharis001
|
||||
* Author: Katalam, mharis001, Brett Mayson
|
||||
* Checks if the patient can be stitched.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Medic (not used) <OBJECT>
|
||||
* 0: Medic <OBJECT>
|
||||
* 1: Patient <OBJECT>
|
||||
*
|
||||
* ReturnValue:
|
||||
@ -16,6 +16,8 @@
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params ["", "_patient"];
|
||||
params ["_medic", "_patient"];
|
||||
|
||||
if ((GVAR(consumeSurgicalKit) == 2) && {!([_medic, _patient, ["ACE_suture"]] call FUNC(hasItem))}) exitWith {false};
|
||||
|
||||
(_patient call FUNC(getStitchableWounds) isNotEqualTo [])
|
||||
|
@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
params ["_args", "_elapsedTime", "_totalTime"];
|
||||
_args params ["", "_patient"];
|
||||
_args params ["_medic", "_patient"];
|
||||
|
||||
private _stitchableWounds = _patient call FUNC(getStitchableWounds);
|
||||
|
||||
@ -76,4 +76,12 @@ if (EGVAR(medical,limping) == 2 && {_patient getVariable [QEGVAR(medical,isLimpi
|
||||
[QEGVAR(medical_engine,updateDamageEffects), _patient, _patient] call CBA_fnc_targetEvent;
|
||||
};
|
||||
|
||||
true
|
||||
// Consume a suture for the next wound if one exists, stop stitching if none are left
|
||||
if (GVAR(consumeSurgicalKit) == 2) then {
|
||||
// Don't consume a suture if there are no more wounds to stitch
|
||||
if (count _stitchableWounds == 1) exitWith {false};
|
||||
([_medic, _patient, ["ACE_suture"]] call FUNC(useItem)) params ["_user"];
|
||||
!isNull _user
|
||||
} else {
|
||||
true
|
||||
}
|
||||
|
24
addons/medical_treatment/functions/fnc_surgicalKitStart.sqf
Normal file
24
addons/medical_treatment/functions/fnc_surgicalKitStart.sqf
Normal file
@ -0,0 +1,24 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Brett Mayson
|
||||
* Handles the surgical kit treatment start by consuming a suture when applicable
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Medic <OBJECT>
|
||||
* 1: Patient <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [player, cursorObject] call ace_medical_treatment_fnc_surgicalKitStart
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params ["_medic", "_patient"];
|
||||
TRACE_2("surgicalKitStart",_medic,_patient);
|
||||
|
||||
if (GVAR(consumeSurgicalKit) == 2) then {
|
||||
([_medic, _patient, ["ACE_suture"]] call FUNC(useItem));
|
||||
};
|
@ -193,7 +193,7 @@
|
||||
"LIST",
|
||||
[LSTRING(ConsumeSurgicalKit_DisplayName), LSTRING(ConsumeSurgicalKit_Description)],
|
||||
[ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)],
|
||||
[[0, 1], [ELSTRING(common,No), ELSTRING(common,Yes)], 0],
|
||||
[[0, 1, 2], ["str_eval_typenothing", LSTRING(SurgicalKit_Display), LSTRING(Suture_Display)], 0],
|
||||
true
|
||||
] call CBA_fnc_addSetting;
|
||||
|
||||
|
@ -711,19 +711,8 @@
|
||||
<Korean>봉합키트 소모</Korean>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_Treatment_ConsumeSurgicalKit_Description">
|
||||
<English>Controls whether a surgical kit should be consumed after use.</English>
|
||||
<Japanese>縫合キットの使用後に消費するかどうかを決定します。</Japanese>
|
||||
<French>Définit si la trousse chirurgicale doit être à usage unique.</French>
|
||||
<Russian>Контролирует, следует ли израсходовать Хирургический набор после использования.</Russian>
|
||||
<Portuguese>Controla se o Kit Cirúrgico deve ser descartado/consumido após o uso.</Portuguese>
|
||||
<Chinese>設定手術包是否為消耗品</Chinese>
|
||||
<Chinesesimp>设置手术包是否使用后会被消耗</Chinesesimp>
|
||||
<Italian>Controlla se un kit chirurgico deve essere consumato dopo l'uso.</Italian>
|
||||
<Czech>Nastavuje </Czech>
|
||||
<Polish>Kontroluje, czy Zestaw Chirurgiczny powinien być zużyty po użyciu.</Polish>
|
||||
<German>Legt fest, ob ein Operations-Set nach der Anwendung verbraucht werden soll.</German>
|
||||
<Spanish>Controla si un kit quirúrgico debería ser consumido tras su uso</Spanish>
|
||||
<Korean>봉합키트가 사용 후 소모되는 지를 결정합니다.</Korean>
|
||||
<English>What should be consumed after use.</English>
|
||||
<German>Legt fest, ob etwas nach der Anwendung verwendet werden soll.</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_Treatment_AllowSelfStitch_DisplayName">
|
||||
<English>Self Stitching</English>
|
||||
@ -2322,6 +2311,18 @@
|
||||
<Chinese>使用手術包</Chinese>
|
||||
<Turkish>Cerrahi Kit Kullan</Turkish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_Treatment_Suture_Display">
|
||||
<English>Suture</English>
|
||||
<German>Naht</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_Treatment_Suture_Desc_Short">
|
||||
<English>Surgical Suture for stitching injuries.</English>
|
||||
<German>Chirurgisches Nahtmaterial zum Nähen von Wunden.</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_Treatment_Suture_Desc_Use">
|
||||
<English>Surgical Suture for stitching injuries.</English>
|
||||
<German>Chirurgisches Nahtmaterial zum Nähen von Wunden.</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_Treatment_Bodybag_Display">
|
||||
<English>Bodybag</English>
|
||||
<French>Housse mortuaire</French>
|
||||
|
BIN
addons/medical_treatment/ui/suture_ca.paa
Normal file
BIN
addons/medical_treatment/ui/suture_ca.paa
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user