From e2890b0699d6475832ed56e92212b59340c532c9 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Tue, 9 Jun 2015 17:30:02 -0500 Subject: [PATCH] #1473 - Fix Medical Log Localization also swap some common EFUNCs --- addons/medical/XEH_postInit.sqf | 8 ++++---- .../functions/fnc_actionCheckBloodPressureLocal.sqf | 11 ++++++----- .../medical/functions/fnc_actionCheckPulseLocal.sqf | 10 +++++----- .../medical/functions/fnc_addHeartRateAdjustment.sqf | 2 +- addons/medical/functions/fnc_addToLog.sqf | 2 +- addons/medical/functions/fnc_addToTriageCard.sqf | 2 +- addons/medical/functions/fnc_setCardiacArrest.sqf | 2 +- addons/medical/stringtable.xml | 7 +++++++ 8 files changed, 26 insertions(+), 18 deletions(-) diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf index a2fda5347c..0b51f57165 100644 --- a/addons/medical/XEH_postInit.sqf +++ b/addons/medical/XEH_postInit.sqf @@ -6,9 +6,9 @@ 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_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; +["medical_propagateWound", FUNC(onPropagateWound)] call EFUNC(common,addEventHandler); +["medical_woundUpdateRequest", FUNC(onWoundUpdateRequest)] call EFUNC(common,addEventHandler); +["interactMenuClosed", {[objNull, false] call FUNC(displayPatientInformation); }] call EFUNC(common,addEventHandler); ["medical_onUnconscious", { if (local (_this select 0)) then { @@ -30,7 +30,7 @@ GVAR(heartBeatSounds_Slow) = ["ACE_heartbeat_slow_1", "ACE_heartbeat_slow_2"]; if (!isNil "acre_api_fnc_setGlobalVolume") then { [1] call acre_api_fnc_setGlobalVolume; }; }; }; -}] call ace_common_fnc_addEventHandler; +}] call EFUNC(common,addEventHandler); // Initialize all effects diff --git a/addons/medical/functions/fnc_actionCheckBloodPressureLocal.sqf b/addons/medical/functions/fnc_actionCheckBloodPressureLocal.sqf index 701be65f2d..19bd75caad 100644 --- a/addons/medical/functions/fnc_actionCheckBloodPressureLocal.sqf +++ b/addons/medical/functions/fnc_actionCheckBloodPressureLocal.sqf @@ -33,22 +33,23 @@ if ([_caller] call FUNC(isMedic)) then { } else { if (_bloodPressureHigh > 20) then { _output = LSTRING(Check_Bloodpressure_Output_2); - _logOutPut = localize LSTRING(Check_Bloodpressure_Low); + _logOutPut = LSTRING(Check_Bloodpressure_Low); if (_bloodPressureHigh > 100) then { _output = LSTRING(Check_Bloodpressure_Output_3); - _logOutPut = localize LSTRING(Check_Bloodpressure_Normal); + _logOutPut = LSTRING(Check_Bloodpressure_Normal); if (_bloodPressureHigh > 160) then { _output = LSTRING(Check_Bloodpressure_Output_4); - _logOutPut = localize LSTRING(Check_Bloodpressure_High); + _logOutPut = LSTRING(Check_Bloodpressure_High); }; }; } else { if (random(10) > 3) then { _output = LSTRING(Check_Bloodpressure_Output_5); - _logOutPut = localize LSTRING(Check_Bloodpressure_NoBloodpressure); + _logOutPut = LSTRING(Check_Bloodpressure_NoBloodpressure); } else { _output = LSTRING(Check_Bloodpressure_Output_6); + //Fail to find pressure, no logoutput }; }; }; @@ -56,5 +57,5 @@ if ([_caller] call FUNC(isMedic)) then { ["displayTextStructured", [_caller], [[_output, [_target] call EFUNC(common,getName), round(_bloodPressureHigh),round(_bloodPressureLow)], 1.75, _caller]] call EFUNC(common,targetEvent); if (_logOutPut != "") then { - [_target,"activity", localize LSTRING(Check_Bloodpressure_Log), [[_caller] call EFUNC(common,getName), _logOutPut]] call FUNC(addToLog); + [_target,"activity", LSTRING(Check_Bloodpressure_Log), [[_caller] call EFUNC(common,getName), _logOutPut]] call FUNC(addToLog); }; diff --git a/addons/medical/functions/fnc_actionCheckPulseLocal.sqf b/addons/medical/functions/fnc_actionCheckPulseLocal.sqf index 09d275d07d..9af18d0a6d 100644 --- a/addons/medical/functions/fnc_actionCheckPulseLocal.sqf +++ b/addons/medical/functions/fnc_actionCheckPulseLocal.sqf @@ -24,7 +24,7 @@ if (!alive _unit) then { _heartRate = 0; }; _heartRateOutput = LSTRING(Check_Pulse_Output_5); -_logOutPut = localize LSTRING(Check_Pulse_None); +_logOutPut = LSTRING(Check_Pulse_None); if (_heartRate > 1.0) then { if ([_caller] call FUNC(isMedic)) then { @@ -33,14 +33,14 @@ if (_heartRate > 1.0) then { } else { // non medical personel will only find a pulse/HR _heartRateOutput = LSTRING(Check_Pulse_Output_2); - _logOutPut = localize LSTRING(Check_Pulse_Weak); + _logOutPut = LSTRING(Check_Pulse_Weak); if (_heartRate > 60) then { if (_heartRate > 100) then { _heartRateOutput = LSTRING(Check_Pulse_Output_3); - _logOutPut = localize LSTRING(Check_Pulse_Strong); + _logOutPut = LSTRING(Check_Pulse_Strong); } else { _heartRateOutput = LSTRING(Check_Pulse_Output_4); - _logOutPut = localize LSTRING(Check_Pulse_Normal); + _logOutPut = LSTRING(Check_Pulse_Normal); }; }; }; @@ -49,5 +49,5 @@ if (_heartRate > 1.0) then { ["displayTextStructured", [_caller], [[_heartRateOutput, [_unit] call EFUNC(common,getName), round(_heartRate)], 1.5, _caller]] call EFUNC(common,targetEvent); if (_logOutPut != "") then { - [_unit,"activity", localize LSTRING(Check_Pulse_Log),[[_caller] call EFUNC(common,getName),_logOutPut]] call FUNC(addToLog); + [_unit,"activity", LSTRING(Check_Pulse_Log),[[_caller] call EFUNC(common,getName),_logOutPut]] call FUNC(addToLog); }; diff --git a/addons/medical/functions/fnc_addHeartRateAdjustment.sqf b/addons/medical/functions/fnc_addHeartRateAdjustment.sqf index 4c55cdabf6..f4516a100c 100644 --- a/addons/medical/functions/fnc_addHeartRateAdjustment.sqf +++ b/addons/medical/functions/fnc_addHeartRateAdjustment.sqf @@ -25,4 +25,4 @@ _callBack = [_this, 3, {}, [{}]] call BIS_fnc_Param; _adjustment = _unit getvariable [QGVAR(heartRateAdjustments), []]; _adjustment pushback [_value, _time, _callBack]; _unit setvariable [QGVAR(heartRateAdjustments), _adjustment ]; -["Medical_onHeartRateAdjustmentAdded", [_unit, _value, _time]] call ace_common_fnc_localEvent; +["Medical_onHeartRateAdjustmentAdded", [_unit, _value, _time]] call EFUNC(common,localEvent); diff --git a/addons/medical/functions/fnc_addToLog.sqf b/addons/medical/functions/fnc_addToLog.sqf index 46bacf2349..af7d9f3170 100644 --- a/addons/medical/functions/fnc_addToLog.sqf +++ b/addons/medical/functions/fnc_addToLog.sqf @@ -47,7 +47,7 @@ if (count _log >= 8) then { _log pushback [_message,_moment,_type, _arguments]; _unit setvariable [_logVarName, _log, true]; -["medical_onLogEntryAdded", [_unit, _type, _message, _arguments]] call ace_common_fnc_localEvent; +["medical_onLogEntryAdded", [_unit, _type, _message, _arguments]] call EFUNC(common,localEvent); _logs = _unit getvariable [QGVAR(allLogs), []]; if !(_logVarName in _logs) then { diff --git a/addons/medical/functions/fnc_addToTriageCard.sqf b/addons/medical/functions/fnc_addToTriageCard.sqf index 4f08cf5c1e..7495c04a8a 100644 --- a/addons/medical/functions/fnc_addToTriageCard.sqf +++ b/addons/medical/functions/fnc_addToTriageCard.sqf @@ -42,4 +42,4 @@ if (!_inList) then { _log pushback [_newItem, 1, ACE_time]; }; _unit setvariable [QGVAR(triageCard), _log, true]; -["Medical_onItemAddedToTriageCard", [_unit, _newItem, _amount]] call ace_common_fnc_localEvent; +["Medical_onItemAddedToTriageCard", [_unit, _newItem, _amount]] call EFUNC(common,localEvent); diff --git a/addons/medical/functions/fnc_setCardiacArrest.sqf b/addons/medical/functions/fnc_setCardiacArrest.sqf index 0ff6eaccd4..c33d83bb40 100644 --- a/addons/medical/functions/fnc_setCardiacArrest.sqf +++ b/addons/medical/functions/fnc_setCardiacArrest.sqf @@ -21,7 +21,7 @@ if (_unit getvariable [QGVAR(inCardiacArrest),false]) exitwith {}; _unit setvariable [QGVAR(inCardiacArrest), true,true]; _unit setvariable [QGVAR(heartRate), 0]; -["Medical_onEnteredCardiacArrest", [_unit]] call ace_common_fnc_localEvent; +["Medical_onEnteredCardiacArrest", [_unit]] call EFUNC(common,localEvent); [_unit, true] call FUNC(setUnconscious); _timeInCardiacArrest = 120 + round(random(600)); diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index b2ddd0122a..543a2e6ae9 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -1585,6 +1585,13 @@ %1 zkontroloval srdeční tep: %2 %1 verificou a frequência cardíaca: %2 + + None + Нет + Żadna + Nada + Keine + Weak Schwach