Skip to content

Commit

Permalink
Pharma - Heda's Coag Rework (#545)
Browse files Browse the repository at this point in the history
Add Miss Heda's Coag Rework to KAM

This is still a WIP and not to be merged, this PR will allow outside
help as needed

ToDo
- [ ] put everything into functions
- [ ] fix typos

### IMPORTANT

- [Development Guidelines](https://ace3.acemod.org/wiki/development/)
are read, understood and applied.
- Title of this PR uses our standard template `Component -
Add|Fix|Improve|Change|Make|Remove {changes}`.

---------

Co-authored-by: MiszczuZPolski <[email protected]>
  • Loading branch information
Cplhardcore and MiszczuZPolski authored Jul 23, 2024
1 parent fb1b3bc commit 433cf82
Show file tree
Hide file tree
Showing 18 changed files with 1,269 additions and 240 deletions.
4 changes: 2 additions & 2 deletions addons/gui/functions/fnc_updateInjuryList.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ if (IS_BLEEDING(_target)) then {
};
};
} else {
_entries pushBack [localize ACELSTRING(medical_gui,NOBLEEDING), _nonissueColor];
_entries pushBack [localize ACELSTRING(medical_gui,Status_Nobleeding), _nonissueColor];
};

if (ACEGVAR(medical_gui,showBloodlossEntry)) then {
Expand Down Expand Up @@ -266,4 +266,4 @@ lbClear _ctrl;
_ctrl lbSetColor [_ctrl lbAdd _text, _color];
} forEach _entries;

_ctrl lbSetCurSel -1;
_ctrl lbSetCurSel -1;
21 changes: 19 additions & 2 deletions addons/pharma/ACE_Medical_Treatment_Actions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ACE_Medical_Treatment_Actions {
allowedSelections[] = {"Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg"};
medicRequired = QUOTE(ace_medical_treatment_medicIV);
condition = QUOTE(!(GVAR(RequireInsIV)) || FUNC(removeIV));
callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag; [_patient, 800, 12] call kat_pharma_fnc_fluid;";
callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag; [_patient, 800, 16] call kat_pharma_fnc_fluid;";
};
class BloodIV_500: BloodIV {
callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag; [_patient, 400, 8] call kat_pharma_fnc_fluid;";
Expand All @@ -29,7 +29,7 @@ class ACE_Medical_Treatment_Actions {
callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag; [_patient, -150, 0] call kat_pharma_fnc_fluid;";
};
class PlasmaIV: BloodIV {
callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag; [_patient, 500, 15] call kat_pharma_fnc_fluid;";
callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag; [_patient, 500, 20] call kat_pharma_fnc_fluid;";
};
class PlasmaIV_500: PlasmaIV {
callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag; [_patient, 250, 10] call kat_pharma_fnc_fluid;";
Expand Down Expand Up @@ -384,4 +384,21 @@ class ACE_Medical_Treatment_Actions {
callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call FUNC(treatmentAdvanced_Dialysis));
litter[] = {};
};
class CheckCoag: CheckPulse {
displayName = CSTRING(CheckCoag_DisplayName);
displayNameProgress = CSTRING(CheckCoag_DisplayNameProgress);
allowedSelections[] = {"LeftArm", "RightArm"};
treatmentLocations = QGVAR(CheckCoag_Location);
medicRequired = QGVAR(CheckCoag_MedLevel);
treatmentTime = QGVAR(CheckCoag_TreatmentTime);
category = "examine";
consumeItem = 0;
items[] = {"kat_coag_sense"};
condition = "";
callbackProgress = "";
callbackStart = "";
callbackFailure = "";
callbackSuccess = QFUNC(treatmentAdvanced_CheckCoag);
litter[] = {};
};
};
11 changes: 11 additions & 0 deletions addons/pharma/CfgWeapons.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,15 @@ class CfgWeapons {
mass = 0.2;
};
};
class kat_coag_sense: ACE_ItemCore {
scope = 2;
author = "Miss Heda";
displayName = CSTRING(Coag_Sense_Display);
picture = QPATHTOF(ui\icon_Coag_Sense.paa);
descriptionShort = CSTRING(Coag_Sense_DescShort);
ACE_isMedicalItem = 1;
class ItemInfo: CBA_MiscItem_ItemInfo {
mass = 1;
};
};
};
5 changes: 4 additions & 1 deletion addons/pharma/XEH_PREP.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
PREP(alphaAction);
PREP(applyIV);
PREP(checkIV);
PREP(clotWound);
PREP(coagRegen);
PREP(fluid);
PREP(fluidLocal);
PREP(fullHealLocal);
Expand All @@ -24,6 +26,7 @@ PREP(treatmentAdvanced_CaffeineLocal);
PREP(treatmentAdvanced_Carbonate);
PREP(treatmentAdvanced_CWMP);
PREP(treatmentAdvanced_CarbonateLocal);
PREP(treatmentAdvanced_CheckCoag);
PREP(treatmentAdvanced_Dialysis);
PREP(treatmentAdvanced_DialysisLocal);
PREP(treatmentAdvanced_EACALocal);
Expand All @@ -43,4 +46,4 @@ PREP(treatmentAdvanced_PervitinLocal);
PREP(treatmentAdvanced_Reorientation);
PREP(treatmentAdvanced_ReorientationLocal);
PREP(treatmentAdvanced_TXALocal);
PREP(vehicleCheckDialysis);
PREP(vehicleCheckDialysis);
3 changes: 3 additions & 0 deletions addons/pharma/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,6 @@
};
};
}] call CBA_fnc_addEventHandler;

[QACEGVAR(medical_status,initialized), LINKFUNC(coagRegen)] call CBA_fnc_addEventHandler;
[QACEGVAR(medical_status,initialized), LINKFUNC(clotWound)] call CBA_fnc_addEventHandler;
Loading

0 comments on commit 433cf82

Please sign in to comment.