ACE3/addons/medical_treatment/ACE_Medical_Treatment.hpp
mharis001 44050df98b Medical Treatment - Modernize and Cleanup (#6933)
* Modernize and cleanup medical_treatment

* One line for each old public function

* Fix litterCleanupDelay name

* Improve adjustment calcs / wound blood loss / medications

fix func descriptions

Calc wound blood loss on events

reorder includes so scritpmacroMed has global effect

trivial optimization for getCardiacOutput

Fix var

Fix wounds not reopening (nil _category)

Fix surgical kit inherting canBandage conditional

debug hitpoints

Update ACE_Medical_Treatment_Actions.hpp

Use woundBleeding for IS_BLEEDING macro

rework medication vars

comments

Reset var in init / fullHeal

Update addons/medical_treatment/functions/fnc_onMedicationUsage.sqf

Co-Authored-By: PabstMirror <pabstmirror@gmail.com>

* Change wound data array

Drop unique id and merge classId and category

* Splinting and treatment and gui

* Add arm fractures and aim effects

* localizations and event

* fix

* fix merge for renamed files

* Fixes and code review changes

* Move medical logs clearing to treatment

* More cleanup work

* cleanup

* Apply suggestions from code review

Co-Authored-By: PabstMirror <pabstmirror@gmail.com>

* formating, rename bone images

* Fix args for setDead call in actionPlaceInBodyBag

* Apply suggestions from code review

Co-Authored-By: PabstMirror <pabstmirror@gmail.com>

* disable calls to extension

* Update fnc_onMedicationUsage.sqf

* Medical - Skip unneeded setVars on initUnit (#6949)

*  Medical - Transfer state machine state on locality (#6950)

* Medical - Transfer state machine state on locality

* Fix feedback isUnconscious var

* Exclude AI

* Make UAV excludes consistant, formating

* Update fnc_treatmentFullHealLocal.sqf

* reset fractures on respawn

* Fix merge

* Add PAK time coefficient setting

* Fix medication

* Add ace_medical_replacementItems config array

* checkItems performance improvement

* Treatment - cap max animation speed (#6995)

* Treatment - cap max animation speed

and add lock to prevent AF from reseting anim

* Update fnc_getBandageTime.sqf

* Use local version of setAnimSpeedCoef

* Revert "Use local version of setAnimSpeedCoef"

This reverts commit 36c22a9047.

* Move replacementItems compiling to preInit

* Improve replacementItems compiling

* Cleanup splint functions, use macros for fractures

* Rename splintCondition to canSplint

* Add cprCreatesPulse setting

* Cleanup remaining functions

* Capitalize stringtable entry names

* getStitchTime function and fix treatment locations

* Update addons/medical_treatment/functions/fnc_getHealTime.sqf

Co-Authored-By: SilentSpike <silentspike100+Github@gmail.com>
2019-06-03 10:31:46 -05:00

666 lines
21 KiB
C++

class ADDON {
class Bandaging {
// Field dressing is normal average treatment
// packing bandage is average treatment, higher reopen change, longer reopening delay
// elastic bandage is higher treatment, higher reopen change, shorter reopen delay
// quickclot is lower treatment, lower reopen change, longer reopening delay
class BasicBandage {
effectiveness = 5;
reopeningChance = 0;
reopeningMinDelay = 0;
reopeningMaxDelay = 0;
};
class FieldDressing {
// How effect is the bandage for treating one wounds type injury
effectiveness = 1;
// What is the chance and delays (in seconds) of the treated default injury reopening
reopeningChance = 0.1;
reopeningMinDelay = 120;
reopeningMaxDelay = 200;
class Abrasion {
effectiveness = 3;
reopeningChance = 0.3;
reopeningMinDelay = 200;
reopeningMaxDelay = 1000;
};
class AbrasionMinor: Abrasion {
effectiveness = 3;
};
class AbrasionMedium: Abrasion {
effectiveness = 2.5;
reopeningChance = 0.7;
};
class AbrasionLarge: Abrasion {
effectiveness = 2;
reopeningChance = 0.9;
};
class Avulsion: Abrasion {
effectiveness = 1;
reopeningChance = 0.5;
reopeningMinDelay = 120;
reopeningMaxDelay = 200;
};
class AvulsionMinor: Avulsion {
effectiveness = 1;
};
class AvulsionMedium: Avulsion {
effectiveness = 0.9;
};
class AvulsionLarge: Avulsion {
effectiveness = 0.75;
};
class Contusion: Abrasion {
effectiveness = 1;
reopeningChance = 0;
reopeningMinDelay = 0;
reopeningMaxDelay = 0;
};
class ContusionMinor: Contusion {};
class ContusionMedium: Contusion {};
class ContusionLarge: Contusion {};
class Crush: Abrasion {
effectiveness = 1;
reopeningChance = 0.2;
reopeningMinDelay = 200;
reopeningMaxDelay = 1000;
};
class CrushMinor: Crush {
effectiveness = 1;
reopeningChance = 0.2;
};
class CrushMedium: Crush {
effectiveness = 0.7;
reopeningChance = 0.3;
};
class CrushLarge: Crush {
effectiveness = 0.6;
reopeningChance = 0.4;
};
class Cut: Abrasion {
effectiveness = 4;
reopeningChance = 0.1;
reopeningMinDelay = 300;
reopeningMaxDelay = 1000;
};
class CutMinor: Cut {
effectiveness = 4;
reopeningChance = 0.1;
};
class CutMedium: Cut {
effectiveness = 3;
reopeningChance = 0.3;
};
class CutLarge: Cut {
effectiveness = 1;
reopeningChance = 0.5;
};
class Laceration: Abrasion {
effectiveness = 0.95;
reopeningChance = 0.3;
reopeningMinDelay = 100;
reopeningMaxDelay = 800;
};
class LacerationMinor: Laceration {
effectiveness = 0.95;
reopeningChance = 0.3;
};
class LacerationMedium: Laceration {
effectiveness = 0.7;
reopeningChance = 0.5;
};
class LacerationLarge: Laceration {
effectiveness = 0.5;
reopeningChance = 0.6;
};
class VelocityWound: Abrasion {
effectiveness = 2;
reopeningChance = 0.7;
reopeningMinDelay = 100;
reopeningMaxDelay = 500;
};
class VelocityWoundMinor: VelocityWound {
effectiveness = 2;
};
class VelocityWoundMedium: VelocityWound {
effectiveness = 1.5;
};
class VelocityWoundLarge: VelocityWound {
effectiveness = 1;
};
class PunctureWound: Abrasion {
effectiveness = 2;
reopeningChance = 0.5;
reopeningMinDelay = 200;
reopeningMaxDelay = 850;
};
class PunctureWoundMinor: PunctureWound {
effectiveness = 2;
};
class PunctureWoundMedium: PunctureWound {
effectiveness = 1.3;
};
class PunctureWoundLarge: PunctureWound {
effectiveness = 0.9;
};
};
class PackingBandage: fieldDressing {
class Abrasion {
effectiveness = 3;
reopeningChance = 0.6;
reopeningMinDelay = 800;
reopeningMaxDelay = 1500;
};
class AbrasionMinor: Abrasion {
effectiveness = 3;
};
class AbrasionMedium: Abrasion {
effectiveness = 2.5;
reopeningChance = 0.9;
};
class AbrasionLarge: Abrasion {
effectiveness = 2;
reopeningChance = 1;
};
class Avulsion: Abrasion {
effectiveness = 1;
reopeningChance = 0.7;
reopeningMinDelay = 1000;
reopeningMaxDelay = 1600;
};
class AvulsionMinor: Avulsion {
effectiveness = 1;
};
class AvulsionMedium: Avulsion {
effectiveness = 0.9;
};
class AvulsionLarge: Avulsion {
effectiveness = 0.75;
};
class Contusion: Abrasion {
effectiveness = 1;
reopeningChance = 0;
reopeningMinDelay = 0;
reopeningMaxDelay = 0;
};
class ContusionMinor: Contusion {};
class ContusionMedium: Contusion {};
class ContusionLarge: Contusion {};
class Crush: Abrasion {
effectiveness = 1;
reopeningChance = 0.5;
reopeningMinDelay = 600;
reopeningMaxDelay = 1000;
};
class CrushMinor: Crush {
effectiveness = 1;
reopeningChance = 0.6;
};
class CrushMedium: Crush {
effectiveness = 0.7;
reopeningChance = 0.7;
};
class CrushLarge: Crush {
effectiveness = 0.6;
reopeningChance = 0.8;
};
class Cut: Abrasion {
effectiveness = 4;
reopeningChance = 0.4;
reopeningMinDelay = 700;
reopeningMaxDelay = 1000;
};
class CutMinor: Cut {
effectiveness = 4;
reopeningChance = 0.6;
};
class CutMedium: Cut {
effectiveness = 3;
reopeningChance = 0.7;
};
class CutLarge: Cut {
effectiveness = 1;
reopeningChance = 0.8;
};
class Laceration: Abrasion {
effectiveness = 0.95;
reopeningChance = 0.65;
reopeningMinDelay = 500;
reopeningMaxDelay = 2000;
};
class LacerationMinor: Laceration {
effectiveness = 0.95;
reopeningChance = 0.65;
};
class LacerationMedium: Laceration {
effectiveness = 0.7;
reopeningChance = 0.8;
};
class LacerationLarge: Laceration {
effectiveness = 0.5;
reopeningChance = 0.9;
};
class VelocityWound: Abrasion {
effectiveness = 2;
reopeningChance = 1;
reopeningMinDelay = 800;
reopeningMaxDelay = 2000;
};
class VelocityWoundMinor: VelocityWound {
effectiveness = 2;
};
class VelocityWoundMedium: VelocityWound {
effectiveness = 1.5;
};
class VelocityWoundLarge: VelocityWound {
effectiveness = 1;
};
class PunctureWound: Abrasion {
effectiveness = 2;
reopeningChance = 1;
reopeningMinDelay = 1000;
reopeningMaxDelay = 3000;
};
class PunctureWoundMinor: PunctureWound {
effectiveness = 2;
};
class PunctureWoundMedium: PunctureWound {
effectiveness = 1.3;
};
class PunctureWoundLarge: PunctureWound {
effectiveness = 0.9;
};
};
class ElasticBandage: fieldDressing {
class Abrasion {
effectiveness = 4;
reopeningChance = 0.6;
reopeningMinDelay = 80;
reopeningMaxDelay = 150;
};
class AbrasionMinor: Abrasion {
effectiveness = 43;
};
class AbrasionMedium: Abrasion {
effectiveness = 3;
reopeningChance = 0.9;
};
class AbrasionLarge: Abrasion {
effectiveness = 2.5;
reopeningChance = 1;
};
class Avulsion: Abrasion {
effectiveness = 2;
reopeningChance = 0.7;
reopeningMinDelay = 100;
reopeningMaxDelay = 160;
};
class AvulsionMinor: Avulsion {
effectiveness = 2;
};
class AvulsionMedium: Avulsion {
effectiveness = 1.4;
};
class AvulsionLarge: Avulsion {
effectiveness = 1;
};
class Contusion: Abrasion {
effectiveness = 2;
reopeningChance = 0;
reopeningMinDelay = 0;
reopeningMaxDelay = 0;
};
class ContusionMinor: Contusion {};
class ContusionMedium: Contusion {};
class ContusionLarge: Contusion {};
class Crush: Abrasion {
effectiveness = 2;
reopeningChance = 0.5;
reopeningMinDelay = 60;
reopeningMaxDelay = 100;
};
class CrushMinor: Crush {
effectiveness = 2;
reopeningChance = 0.6;
};
class CrushMedium: Crush {
effectiveness = 1.7;
reopeningChance = 0.7;
};
class CrushLarge: Crush {
effectiveness = 1.6;
reopeningChance = 0.8;
};
class Cut: Abrasion {
effectiveness = 5;
reopeningChance = 0.4;
reopeningMinDelay = 70;
reopeningMaxDelay = 100;
};
class CutMinor: Cut {
effectiveness = 5;
reopeningChance = 0.6;
};
class CutMedium: Cut {
effectiveness = 3.5;
reopeningChance = 0.7;
};
class CutLarge: Cut {
effectiveness = 2;
reopeningChance = 0.8;
};
class Laceration: Abrasion {
effectiveness = 2;
reopeningChance = 0.65;
reopeningMinDelay = 50;
reopeningMaxDelay = 200;
};
class LacerationMinor: Laceration {
effectiveness = 2;
reopeningChance = 0.65;
};
class LacerationMedium: Laceration {
effectiveness = 1.5;
reopeningChance = 0.8;
};
class LacerationLarge: Laceration {
effectiveness = 1;
reopeningChance = 0.9;
};
class VelocityWound: Abrasion {
effectiveness = 2.2;
reopeningChance = 1;
reopeningMinDelay = 80;
reopeningMaxDelay = 200;
};
class VelocityWoundMinor: VelocityWound {
effectiveness = 2.2;
};
class VelocityWoundMedium: VelocityWound {
effectiveness = 1.75;
};
class VelocityWoundLarge: VelocityWound {
effectiveness = 1.5;
};
class PunctureWound: Abrasion {
effectiveness = 2.5;
reopeningChance = 1;
reopeningMinDelay = 100;
reopeningMaxDelay = 300;
};
class PunctureWoundMinor: PunctureWound {
effectiveness = 2.5;
};
class PunctureWoundMedium: PunctureWound {
effectiveness = 2;
};
class PunctureWoundLarge: PunctureWound {
effectiveness = 1.5;
};
};
class QuikClot: fieldDressing {
class Abrasion {
effectiveness = 2;
reopeningChance = 0.3;
reopeningMinDelay = 800;
reopeningMaxDelay = 1500;
};
class AbrasionMinor: Abrasion {
effectiveness = 2;
};
class AbrasionMedium: Abrasion {
effectiveness = 1;
reopeningChance = 0.4;
};
class AbrasionLarge: Abrasion {
effectiveness = 0.7;
reopeningChance = 5;
};
class Avulsion: Abrasion {
effectiveness = 0.7;
reopeningChance = 0.2;
reopeningMinDelay = 1000;
reopeningMaxDelay = 1600;
};
class AvulsionMinor: Avulsion {
effectiveness = 0.7;
};
class AvulsionMedium: Avulsion {
effectiveness = 0.65;
};
class AvulsionLarge: Avulsion {
effectiveness = 0.5;
};
class Contusion: Abrasion {
effectiveness = 1;
reopeningChance = 0;
reopeningMinDelay = 0;
reopeningMaxDelay = 0;
};
class ContusionMinor: Contusion {};
class ContusionMedium: Contusion {};
class ContusionLarge: Contusion {};
class Crush: Abrasion {
effectiveness = 0.6;
reopeningChance = 0.5;
reopeningMinDelay = 600;
reopeningMaxDelay = 1000;
};
class CrushMinor: Crush {
effectiveness = 0.6;
reopeningChance = 0.3;
};
class CrushMedium: Crush {
effectiveness = 0.5;
};
class CrushLarge: Crush {
effectiveness = 0.4;
};
class Cut: Abrasion {
effectiveness = 2;
reopeningChance = 0.2;
reopeningMinDelay = 700;
reopeningMaxDelay = 1000;
};
class CutMinor: Cut {
effectiveness = 2;
reopeningChance = 0.3;
};
class CutMedium: Cut {
effectiveness = 1;
};
class CutLarge: Cut {
effectiveness = 0.6;
};
class Laceration: Abrasion {
effectiveness = 0.7;
reopeningChance = 0.4;
reopeningMinDelay = 500;
reopeningMaxDelay = 2000;
};
class LacerationMinor: Laceration {
effectiveness = 0.7;
reopeningChance = 0.4;
};
class LacerationMedium: Laceration {
effectiveness = 0.7;
};
class LacerationLarge: Laceration {
effectiveness = 0.5;
};
class VelocityWound: Abrasion {
effectiveness = 1;
reopeningChance = 0.5;
reopeningMinDelay = 800;
reopeningMaxDelay = 2000;
};
class VelocityWoundMinor: VelocityWound {
effectiveness = 1;
};
class VelocityWoundMedium: VelocityWound {
effectiveness = 0.75;
};
class VelocityWoundLarge: VelocityWound {
effectiveness = 0.5;
};
class PunctureWound: Abrasion {
effectiveness = 1;
reopeningChance = 0.5;
reopeningMinDelay = 1000;
reopeningMaxDelay = 3000;
};
class PunctureWoundMinor: PunctureWound {
effectiveness = 1;
};
class PunctureWoundMedium: PunctureWound {
effectiveness = 0.7;
};
class PunctureWoundLarge: PunctureWound {
effectiveness = 0.4;
};
};
};
class Medication {
// How much does the pain get reduced?
painReduce = 0;
// How much will the heart rate be increased when the HR is low (below 55)? {minIncrease, maxIncrease}
hrIncreaseLow[] = {0, 0}; // _heartRate < 55
hrIncreaseNormal[] = {0, 0}; // 55 <= _heartRate <= 110
hrIncreaseHigh[] = {0, 0}; // 110 < _heartRate
// How long until this medication has disappeared
timeInSystem = 120;
// How long until the maximum effect is reached
timeTillMaxEffect = 30;
// How many of this type of medication can be in the system before the patient overdoses?
maxDose = 4;
// Function to execute upon overdose. Arguments passed to call back are 0: unit <OBJECT>, 1: medicationClassName <STRING>
onOverDose = "";
// The viscosity of a fluid is a measure of its resistance to gradual deformation by shear stress or tensile stress. For liquids, it corresponds to the informal concept of "thickness". This value will increase/decrease the viscoty of the blood with the percentage given. Where 100 = max. Using the minus will decrease viscosity
viscosityChange = 0;
// specific details for the ACE_Morphine treatment action
class Morphine {
painReduce = 0.8;
hrIncreaseLow[] = {-10, -20};
hrIncreaseNormal[] = {-10, -30};
hrIncreaseHigh[] = {-10, -35};
timeInSystem = 1800;
timeTillMaxEffect = 30;
maxDose = 4;
incompatibleMedication[] = {};
viscosityChange = -10;
};
class Epinephrine {
painReduce = 0;
hrIncreaseLow[] = {10, 20};
hrIncreaseNormal[] = {10, 50};
hrIncreaseHigh[] = {10, 40};
timeInSystem = 120;
timeTillMaxEffect = 10;
maxDose = 10;
incompatibleMedication[] = {};
};
class Adenosine {
painReduce = 0;
hrIncreaseLow[] = {-7, -10};
hrIncreaseNormal[] = {-15, -30};
hrIncreaseHigh[] = {-15, -35};
timeInSystem = 120;
timeTillMaxEffect = 15;
maxDose = 6;
incompatibleMedication[] = {};
};
class Atropine {
painReduce = 0;
hrIncreaseLow[] = {-2, -5};
hrIncreaseNormal[] = {-10, -15};
hrIncreaseHigh[] = {-5, -20};
timeInSystem = 120;
timeTillMaxEffect = 15;
maxDose = 6;
incompatibleMedication[] = {};
};
class PainKillers {
painReduce = 0.1;
timeInSystem = 600;
timeTillMaxEffect = 60;
maxDose = 10;
incompatibleMedication[] = {};
viscosityChange = 5;
};
};
class IV {
// volume is in millileters
volume = 1000;
ratio[] = {};
type = "Blood";
class BloodIV {
volume = 1000;
ratio[] = {"Plasma", 1};
};
class BloodIV_500: BloodIV {
volume = 500;
};
class BloodIV_250: BloodIV {
volume = 250;
};
class PlasmaIV: BloodIV {
volume = 1000;
ratio[] = {"Blood", 1};
type = "Plasma";
};
class PlasmaIV_500: PlasmaIV {
volume = 500;
};
class PlasmaIV_250: PlasmaIV {
volume = 250;
};
class SalineIV: BloodIV {
volume = 1000;
type = "Saline";
ratio[] = {};
};
class SalineIV_500: SalineIV {
volume = 500;
};
class SalineIV_250: SalineIV {
volume = 250;
};
};
};