From 6b91cefb90350282ef123b659a522c30bd87f3f6 Mon Sep 17 00:00:00 2001 From: Glowbal Date: Mon, 9 Mar 2015 22:23:37 +0100 Subject: [PATCH] Minor fixes and added pain status --- addons/medical/functions/fnc_displayPatientInformation.sqf | 5 ++++- addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf | 6 +++--- .../functions/fnc_treatmentAdvanced_bandageLocal.sqf | 5 +++-- .../medical/functions/fnc_treatmentAdvanced_medication.sqf | 2 +- addons/medical/stringtable.xml | 2 +- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/addons/medical/functions/fnc_displayPatientInformation.sqf b/addons/medical/functions/fnc_displayPatientInformation.sqf index f27c077b41..b9b450ea65 100644 --- a/addons/medical/functions/fnc_displayPatientInformation.sqf +++ b/addons/medical/functions/fnc_displayPatientInformation.sqf @@ -40,7 +40,7 @@ if (_show) then { _allInjuryTexts = []; _genericMessages = []; if (_target getvariable[QGVAR(isBleeding), false]) then { - _genericMessages pushback [localize "STR_ACE_MEDICAL_STATUS_BLEEDING", [1, 1, 1, 1]]; + _genericMessages pushback [localize "STR_ACE_MEDICAL_STATUS_BLEEDING", [1, 0.1, 0.1, 1]]; }; if (_target getvariable[QGVAR(hasLostBlood), false]) then { _genericMessages pushback [localize "STR_ACE_MEDICAL_STATUS_LOST_BLOOD", [1, 0.1, 0.1, 1]]; @@ -49,6 +49,9 @@ if (_show) then { if (((_target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]) select GVAR(currentSelectedSelectionN)) > 0) then { _genericMessages pushback [localize "STR_ACE_MEDICAL_STATUS_TOURNIQUET_APPLIED", [0.5, 0.5, 0, 1]]; }; + if (_target getvariable[QGVAR(inPain), false]) then { + _genericMessages pushback [localize "STR_ACE_MEDICAL_STATUS_PAIN", [1, 1, 1, 1]]; + }; _selectionBloodLoss = [0,0,0,0,0,0]; if (GVAR(level) >= 2) then { diff --git a/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf b/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf index 9365afb90a..91d7678f93 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf @@ -28,12 +28,12 @@ _specificSpot = if (count _this > 5) then {_this select 5} else {-1}; if (count _items == 0) exitwith {}; if ([_caller, _target, _items] call FUNC(useItems)) then { - [[_target, _className, _selectionName, _specificSpot], QUOTE(DFUNC(treatmentBandageLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ - { + [[_target, _className, _selectionName, _specificSpot], QUOTE(DFUNC(treatmentAdvanced_bandageLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ +/* { if (_x != "") then { [_target, _x] call FUNC(addToTriageCard); }; - }foreach _items; + }foreach _items;*/ ["Medical_treatmentCompleted", [_caller, _target, _selectionName, _className, true]] call ace_common_fnc_localEvent; [_target, "activity", "STR_ACE_HAS_BANDAGED_ACTIVITY", [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); diff --git a/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf index f453956fcd..39eab67fb8 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf @@ -39,7 +39,7 @@ if (isClass (_config >> _bandage)) then { // Figure out which injury for this bodypart is the best choice to bandage _mostEffectiveSpot = 0; -_effectivenessFound = 0; +_effectivenessFound = -1; _mostEffectiveInjury = _openWounds select 0; _exit = false; { @@ -76,7 +76,8 @@ _exit = false; if (_exit) exitwith {}; }foreach _openWounds; -if (_effectivenessFound == 0) exitwith {}; // Seems everything is patched up on this body part already.. +if (_effectivenessFound == -1) exitwith {}; // Seems everything is patched up on this body part already.. + // TODO refactor this part // Find the impact this bandage has and reduce the amount this injury is present diff --git a/addons/medical/functions/fnc_treatmentAdvanced_medication.sqf b/addons/medical/functions/fnc_treatmentAdvanced_medication.sqf index 415996d025..38f522bc7d 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_medication.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_medication.sqf @@ -27,7 +27,7 @@ _items = _this select 4; if (count _items == 0) exitwith {}; if ([_caller, _target, _items] call FUNC(useItems)) then { - [[_target, _className], QUOTE(DFUNC(treatmentMedicationLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ + [[_target, _className], QUOTE(DFUNC(treatmentAdvanced_medicationLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ { if (_x != "") then { [_target, _x] call FUNC(addToTriageCard); diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index ed3657cb3a..6b63aaa416 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -53,7 +53,7 @@ Krwawienie zewnętrzne - in Pain + In Pain Испытывает боль Con Dolor A De La Douleur