Skip to content

Commit

Permalink
Merge pull request #374 from KoffeinFlummi/medicalImprovements
Browse files Browse the repository at this point in the history
Medical improvements
  • Loading branch information
thojkooi committed Apr 7, 2015
2 parents ba618a6 + ffbe9f0 commit 14906c6
Show file tree
Hide file tree
Showing 30 changed files with 96 additions and 66 deletions.
32 changes: 26 additions & 6 deletions addons/medical/ACE_Medical_Treatments.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,14 +295,16 @@ class ACE_Medical_Advanced {
selections[] = {"All"};
bleedingRate = 0.0001;
pain = 0.01;
causes[] = {"falling", "ropeburn", "vehiclecrash"};
causes[] = {"falling", "ropeburn", "vehiclecrash", "unknown"};
minDamage = 0.01;
class Minor {
minDamage = 0.01;
maxDamage = 0.2;
bleedingRate = 0.0001;
};
class Medium {
minDamage = 0.2;
maxDamage = 0.3;
bleedingRate = 0.00015;
};
class Large {
Expand All @@ -321,10 +323,12 @@ class ACE_Medical_Advanced {
minDamage = 0.2;
class Minor {
minDamage = 0.2;
maxDamage = 0.3;
bleedingRate = 0.01;
};
class Medium {
minDamage = 0.3;
maxDamage = 0.6;
bleedingRate = 0.02;
};
class Large {
Expand All @@ -341,14 +345,18 @@ class ACE_Medical_Advanced {
pain = 0.05;
causes[] = {"bullet", "backblast", "punch","vehiclecrash","falling"};
minDamage = 0.01;
maxDamage = 0.1;
class Minor {
minDamage = 0.01;
maxDamage = 0.1;
};
class Medium {
minDamage = 0.1;
maxDamage = 0.15;
};
class Large {
minDamage = 0.3;
minDamage = 0.15;
maxDamage = 0.2;
};
};

Expand All @@ -358,14 +366,16 @@ class ACE_Medical_Advanced {
selections[] = {"All"};
bleedingRate = 0.01;
pain = 0.1;
causes[] = {"falling", "vehiclecrash", "punch"};
causes[] = {"falling", "vehiclecrash", "punch", "unknown"};
minDamage = 0.1;
class Minor {
minDamage = 0.1;
maxDamage = 0.45;
bleedingRate = 0.005;
};
class Medium {
minDamage = 0.4;
maxDamage = 0.7;
bleedingRate = 0.007;
};
class Large {
Expand All @@ -380,14 +390,16 @@ class ACE_Medical_Advanced {
selections[] = {"All"};
bleedingRate = 0.01;
pain = 0.075;
causes[] = {"vehiclecrash", "grenade", "explosive", "shell", "backblast", "stab"};
causes[] = {"vehiclecrash", "grenade", "explosive", "shell", "backblast", "stab", "unknown"};
minDamage = 0.1;
class Minor {
minDamage = 0.1;
maxDamage = 0.3;
bleedingRate = 0.005;
};
class Medium {
minDamage = 0.3;
maxDamage = 0.65;
bleedingRate = 0.02;
};
class Large {
Expand All @@ -406,10 +418,12 @@ class ACE_Medical_Advanced {
minDamage = 0.01;
class Minor {
minDamage = 0.1;
maxDamage = 0.5;
bleedingRate = 0.005;
};
class Medium {
minDamage = 0.5;
maxDamage = 0.7;
bleedingRate = 0.01;
};
class Large {
Expand All @@ -424,10 +438,11 @@ class ACE_Medical_Advanced {
selections[] = {"All"};
bleedingRate = 0.01;
pain = 0.2;
causes[] = {"bullet", "grenade","explosive", "shell"};
causes[] = {"bullet", "grenade","explosive", "shell", "unknown"};
minDamage = 0.15;
class Minor {
minDamage = 0.15;
maxDamage = 0.3;
bleedingRate = 0.025;
};
class Medium {
Expand All @@ -450,10 +465,12 @@ class ACE_Medical_Advanced {
minDamage = 0.01;
class Minor {
minDamage = 0.01;
maxDamage = 0.5;
bleedingRate = 0.01;
};
class Medium {
minDamage = 0.5;
maxDamage = 0.75;
bleedingRate = 0.03;
};
class Large {
Expand Down Expand Up @@ -518,6 +535,9 @@ class ACE_Medical_Advanced {
thresholds[] = {{0.1, 1}};
selectionSpecific = 1;
};
class unknown {
thresholds[] = {{0.1, 1}};
};
};
};
class Treatment {
Expand Down Expand Up @@ -751,7 +771,7 @@ class ACE_Medical_Advanced {

// specific details for the ACE_Morphine treatment action
class Morphine {
painReduce = 0.7;
painReduce = 1;
hrIncreaseLow[] = {-10, -30, 35};
hrIncreaseNormal[] = {-10, -50, 40};
hrIncreaseHigh[] = {-10, -40, 50};
Expand Down
4 changes: 4 additions & 0 deletions addons/medical/ACE_Settings.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,8 @@ class ACE_Settings {
typeName = "BOOL";
value = 1;
};
class GVAR(healHitPointAfterAdvBandage) {
typeName = "BOOL";
value = 1;
};
};
28 changes: 14 additions & 14 deletions addons/medical/CfgWeapons.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class CfgWeapons {
class ACE_fieldDressing: ACE_ItemCore {
scope = 2;
model = QUOTE(PATHTOF(data\bandage.p3d));
picture = QUOTE(PATHTOF(ui\items\fieldDressing.paa));
picture = QUOTE(PATHTOF(ui\items\fieldDressing_x_ca.paa));
displayName = $STR_ACE_MEDICAL_BANDAGE_BASIC_DISPLAY;
descriptionShort = $STR_ACE_MEDICAL_BANDAGE_BASIC_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_BANDAGE_BASIC_DESC_USE;
Expand All @@ -38,7 +38,7 @@ class CfgWeapons {
count = 1;
type = 16;
displayName = $STR_ACE_MEDICAL_PACKING_BANDAGE_DISPLAY;
picture = QUOTE(PATHTOF(ui\items\packingBandage.paa));
picture = QUOTE(PATHTOF(ui\items\packingBandage_x_ca.paa));
model = QUOTE(PATHTOF(data\packingbandage.p3d));
descriptionShort = $STR_ACE_MEDICAL_PACKING_BANDAGE_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_PACKING_BANDAGE_DESC_USE;
Expand All @@ -52,7 +52,7 @@ class CfgWeapons {
count = 1;
type = 16;
displayName = $STR_ACE_MEDICAL_BANDAGE_ELASTIC_DISPLAY;
picture = QUOTE(PATHTOF(ui\items\elasticBandage.paa));
picture = QUOTE(PATHTOF(ui\items\elasticBandage_x_ca.paa));
model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d";
descriptionShort = $STR_ACE_MEDICAL_BANDAGE_ELASTIC_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_BANDAGE_ELASTIC_DESC_USE;
Expand All @@ -66,7 +66,7 @@ class CfgWeapons {
count = 1;
type = 16;
displayName = $STR_ACE_MEDICAL_TOURNIQUET_DISPLAY;
picture = QUOTE(PATHTOF(ui\items\tourniquet.paa));
picture = QUOTE(PATHTOF(ui\items\tourniquet_x_ca.paa));
model = QUOTE(PATHTOF(data\tourniquet.p3d));
descriptionShort = $STR_ACE_MEDICAL_TOURNIQUET_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_TOURNIQUET_DESC_USE;
Expand All @@ -80,7 +80,7 @@ class CfgWeapons {
count = 1;
type = 16;
displayName = $STR_ACE_MEDICAL_MORPHINE_DISPLAY;
picture = QUOTE(PATHTOF(ui\items\morphine.paa));
picture = QUOTE(PATHTOF(ui\items\morphine_x_ca.paa));
model = QUOTE(PATHTOF(data\morphine.p3d));
descriptionShort = $STR_ACE_MEDICAL_MORPHINE_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_MORPHINE_DESC_USE;
Expand All @@ -94,7 +94,7 @@ class CfgWeapons {
count = 1;
type = 16;
displayName = $STR_ACE_MEDICAL_ATROPINE_DISPLAY;
picture = QUOTE(PATHTOF(ui\items\atropine.paa));
picture = QUOTE(PATHTOF(ui\items\atropine_x_ca.paa));
model = QUOTE(PATHTOF(data\atropine.p3d));
descriptionShort = $STR_ACE_MEDICAL_ATROPINE_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_ATROPINE_DESC_USE;
Expand All @@ -109,7 +109,7 @@ class CfgWeapons {
count = 1;
type = 16;
displayName = $STR_ACE_MEDICAL_EPINEPHRINE_DISPLAY;
picture = QUOTE(PATHTOF(ui\items\epinephrine.paa));
picture = QUOTE(PATHTOF(ui\items\epinephrine_x_ca.paa));
model = QUOTE(PATHTOF(data\epinephrine.p3d));
descriptionShort = $STR_ACE_MEDICAL_EPINEPHRINE_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_EPINEPHRINE_DESC_USE;
Expand All @@ -122,7 +122,7 @@ class CfgWeapons {
value = 1;
count = 1;
displayName = $STR_ACE_MEDICAL_PLASMA_IV;
picture = QUOTE(PATHTOF(ui\items\plasmaIV.paa));
picture = QUOTE(PATHTOF(ui\items\plasmaIV_x_ca.paa));
descriptionShort = $STR_ACE_MEDICAL_PLASMA_IV_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_PLASMA_IV_DESC_USE;
class ItemInfo: InventoryItem_Base_F {
Expand All @@ -147,7 +147,7 @@ class CfgWeapons {
count = 1;
model = "\A3\Structures_F_EPA\Items\Medical\BloodBag_F.p3d";
displayName = $STR_ACE_MEDICAL_BLOOD_IV;
picture = QUOTE(PATHTOF(ui\items\bloodIV.paa));
picture = QUOTE(PATHTOF(ui\items\bloodIV_x_ca.paa));
descriptionShort = $STR_ACE_MEDICAL_BLOOD_IV_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_BLOOD_IV_DESC_USE;
class ItemInfo: InventoryItem_Base_F {
Expand All @@ -171,7 +171,7 @@ class CfgWeapons {
value = 1;
count = 1;
displayName = $STR_ACE_MEDICAL_SALINE_IV;
picture = QUOTE(PATHTOF(ui\items\salineIV.paa));
picture = QUOTE(PATHTOF(ui\items\salineIV_x_ca.paa));
descriptionShort = $STR_ACE_MEDICAL_SALINE_IV_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_SALINE_IV_DESC_USE;
class ItemInfo: InventoryItem_Base_F {
Expand All @@ -196,7 +196,7 @@ class CfgWeapons {
count = 1;
type = 16;
displayName = $STR_ACE_MEDICAL_QUIKCLOT_DISPLAY;
picture = QUOTE(PATHTOF(ui\items\quickclot.paa));
picture = QUOTE(PATHTOF(ui\items\quickclot_x_ca.paa));
descriptionShort = $STR_ACE_MEDICAL_QUIKCLOT_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_QUIKCLOT_DESC_USE;
class ItemInfo: InventoryItem_Base_F {
Expand All @@ -209,7 +209,7 @@ class CfgWeapons {
count = 1;
type = 16;
displayName = $STR_ACE_MEDICAL_AID_KIT_DISPLAY;
picture = QUOTE(PATHTOF(ui\items\personal_aid_kit.paa));
picture = QUOTE(PATHTOF(ui\items\personal_aid_kit_x_ca.paa));
descriptionShort = $STR_ACE_MEDICAL_AID_KIT_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_AID_KIT_DESC_USE;
class ItemInfo: InventoryItem_Base_F {
Expand All @@ -220,7 +220,7 @@ class CfgWeapons {
scope=2;
displayName= $STR_ACE_MEDICAL_SURGICALKIT_DISPLAY;
model = QUOTE(PATHTOF(data\surgical_kit.p3d));
picture = QUOTE(PATHTOF(ui\items\surgicalKit.paa));
picture = QUOTE(PATHTOF(ui\items\surgicalKit_x_ca.paa));
descriptionShort = $STR_ACE_MEDICAL_SURGICALKIT_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_SURGICALKIT_DESC_USE;
class ItemInfo: InventoryItem_Base_F {
Expand All @@ -231,7 +231,7 @@ class CfgWeapons {
scope=2;
displayName= $STR_ACE_MEDICAL_BODYBAG_DISPLAY;
model = QUOTE(PATHTOF(data\bodybagItem.p3d));
picture = QUOTE(PATHTOF(ui\items\bodybag.paa));
picture = QUOTE(PATHTOF(ui\items\bodybag_x_ca.paa));
descriptionShort = $STR_ACE_MEDICAL_BODYBAG_DESC_SHORT;
descriptionUse = $STR_ACE_MEDICAL_BODYBAG_DESC_USE;
class ItemInfo: InventoryItem_Base_F {
Expand Down
5 changes: 2 additions & 3 deletions addons/medical/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ GVAR(heartBeatSounds_Fast) = ["ACE_heartbeat_fast_1", "ACE_heartbeat_fast_2", "A
GVAR(heartBeatSounds_Normal) = ["ACE_heartbeat_norm_1", "ACE_heartbeat_norm_2"];
GVAR(heartBeatSounds_Slow) = ["ACE_heartbeat_slow_1", "ACE_heartbeat_slow_2"];

["Medical_treatmentCompleted", FUNC(onTreatmentCompleted)] call ace_common_fnc_addEventHandler;
["medical_propagateWound", FUNC(onPropagateWound)] call ace_common_fnc_addEventHandler;
["medical_woundUpdateRequest", FUNC(onWoundUpdateRequest)] call ace_common_fnc_addEventHandler;
["interactMenuClosed", {[objNull, false] call FUNC(displayPatientInformation); }] call ace_common_fnc_addEventHandler;
Expand Down Expand Up @@ -134,9 +133,9 @@ GVAR(effectTimeBlood) = time;

_bleeding = ACE_player call FUNC(getBloodLoss);
// Bleeding Indicator
if (_bleeding > 0 and GVAR(effectTimeBlood) + 6 < time) then {
if (_bleeding > 0 and GVAR(effectTimeBlood) + 3.5 < time) then {
GVAR(effectTimeBlood) = time;
[500 * _bleeding] call BIS_fnc_bloodEffect;
[600 * _bleeding] call BIS_fnc_bloodEffect;
};

// Blood Volume Effect
Expand Down
3 changes: 0 additions & 3 deletions addons/medical/functions/fnc_actionLoadUnit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ if ([_target] call EFUNC(common,isAwake)) exitwith {
["displayTextStructured", [_caller], [["This person (%1) is awake and cannot be loaded", [_target] call EFUNC(common,getName)], 1.5, _caller]] call EFUNC(common,targetEvent);
};

[_caller, objNull] call cse_fnc_carryObj;
[_target, objNull] call cse_fnc_carryObj;

_vehicle = [_caller, _target] call EFUNC(common,loadPerson);
if (!isNull _vehicle) then {
if (!isnil QGVAR(DROP_ADDACTION)) then {
Expand Down
3 changes: 0 additions & 3 deletions addons/medical/functions/fnc_actionRemoveTourniquet.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ _tourniquets = _target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]];

// Check if there is a tourniquet on this bodypart
if ((_tourniquets select _part) == 0) exitwith {
// TODO localization
_output = "There is no tourniquet on this body part!";
["displayTextStructured", [_caller], [_output, 1.5, _caller]] call EFUNC(common,targetEvent);
};
Expand All @@ -37,5 +36,3 @@ _target setvariable [QGVAR(tourniquets), _tourniquets, true];

// Adding the tourniquet item to the caller
_caller addItem "ACE_tourniquet";

// "AinvPknlMstpSlayWrflDnon_medic
2 changes: 1 addition & 1 deletion addons/medical/functions/fnc_determineIfFatal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ _part = _this select 1;
_withDamage = if (count _this > 2) then { _this select 2} else {0};

if (!alive _unit) exitwith {true};
if (_part < 0 || _part > 5) exitwith {};
if (_part < 0 || _part > 5) exitwith {false};
if ((vehicle _unit != _unit) && {!alive (vehicle _unit)}) exitwith { true };

// Find the correct Damage threshold for unit.
Expand Down
Loading

0 comments on commit 14906c6

Please sign in to comment.