Skip to content

Commit

Permalink
Merge branch 'dev-Tomcat' into Japanese-Jan25-03
Browse files Browse the repository at this point in the history
  • Loading branch information
Apricot-ale authored Feb 21, 2025
2 parents 899b2bc + 8618572 commit 71f8afa
Show file tree
Hide file tree
Showing 13 changed files with 70 additions and 28 deletions.
3 changes: 2 additions & 1 deletion AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,5 @@ Eughenos
Solbak
Tapawingo
apo_tle
Aaren
Aaren
Apricot_ale
7 changes: 4 additions & 3 deletions addons/breathing/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,7 @@
<Russian>Увеличивает вероятность возникновения пневмоторакса и прогрессирующего пневмоторакса в зависимости от полученного повреждения, если оно превышает порог повреждения от пневмоторакса</Russian>
<Dutch>Verhoogt de kans op een (geadvanceerde) pneumothorax wanneer de schade hoger is dan de drempelwaarde</Dutch>
<Italian>Aumentare la probabilità che si verifichi un pneumotorace e un pneumotorace avanzato in base al danno subito, se oltre la soglia di danno del pneumotorace</Italian>
<Chinese>若損傷超過氣胸損傷閾值,則根據所受損傷增加發生氣胸和進階氣胸的機率。</Chinese>
<Chinese>若損傷超過氣胸損傷閾值,則根據所受損傷增加發生氣胸和進階氣胸的機率。</Chinese>
<Chinesesimp>如果超过气胸损伤阈值,则根据所受损伤增加气胸和晚期气胸发生的概率</Chinesesimp>
</Key>
<Key ID="STR_KAT_Breathing_SETTING_deepPenetratingInjuryChance">
Expand Down Expand Up @@ -2227,7 +2227,7 @@
<Finnish>Tyhjä kannettava happisäiliö (150L)</Finnish>
<Russian>Пустой переносной кислородный баллон (150 л)</Russian>
<Dutch>Lege draagbare zuurstoftank (150L)</Dutch>
<Chinese>空的可攜式氧氣罐 (150公升)</Chinese>=
<Chinese>空的可攜式氧氣罐 (150公升)</Chinese>
<Chinesesimp>空便携式氧气罐(150L)</Chinesesimp>
</Key>
<Key ID="STR_KAT_Breathing_PortableOxygenTank_300_Empty_Display">
Expand All @@ -2244,7 +2244,7 @@
<Finnish>Tyhjä kannettava happisäiliö (300L)</Finnish>
<Russian>Пустой переносной кислородный баллон (300 л)</Russian>
<Dutch>Lege draagbare zuurstoftank (300L)</Dutch>
<Chinese>空的可攜式氧氣罐 (300公升)</Chinese>=
<Chinese>空的可攜式氧氣罐 (300公升)</Chinese>
<Chinesesimp>空便携式氧气罐(300L)</Chinesesimp>
</Key>
<Key ID="STR_KAT_Breathing_PortableOxygenTank_Empty_Desc_Short">
Expand Down Expand Up @@ -2637,6 +2637,7 @@
<Japanese>患者の呼吸はとても浅い</Japanese>
<French>La respiration du patient est très superficielle</French>
<Chinese>病人呼吸非常淺</Chinese>
<Japanese>患者の呼吸はとても浅い</Japanese>
</Key>
<Key ID="STR_KAT_Breathing_breathing_Veryshallow">
<English>Very Shallow</English>
Expand Down
11 changes: 5 additions & 6 deletions addons/circulation/functions/fnc_checkPulseLocal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* None
*
* Example:
* [player, cursorObject, "Head"] call ace_medical_treatment_fnc_checkPulseLocal
* [player, cursorObject, "Head"] call kat_circulation_fnc_checkPulseLocal
*
* Public: No
*/
Expand All @@ -37,10 +37,11 @@ private _heartRateOutput = ACELSTRING(medical_treatment,Check_Pulse_Output_5);
private _logOutput = ACELSTRING(medical_treatment,Check_Pulse_None);

if (_heartRate > 1) then {
if ([_medic, QACEGVAR(medical,numericalPulse)] call FUNC(isMedic)) then {
if ([_medic, ACEGVAR(medical_treatment,numericalPulse)] call ACEFUNC(common,isMedic)) then {
if (GVAR(hardcoreDiagnose)) then {
_heartRateOutput = LSTRING(Check_Pulse_Output);
_logOutput = format [LLSTRING(Pulse_Output), (round(_heartRateOutput / 5) * 5)];
_heartRate = (round(_heartRate / 5) * 5);
_logOutput = format [LLSTRING(Pulse_Output), _heartRate];
} else {
_heartRateOutput = ACELSTRING(medical_treatment,Check_Pulse_Output_1);
_logOutput = str round _heartRate;
Expand All @@ -60,7 +61,5 @@ if (_heartRate > 1) then {
};
};
};

[_patient, "quick_view", ACELSTRING(medical_treatment,Check_Pulse_Log), [_medic call ACEFUNC(common,getName), _logOutput]] call ACEFUNC(medical_treatment,addToLog);

[QEGVAR(common,displayTextStructured), [[_heartRateOutput, _patient call ACEFUNC(common,getName), round _heartRate], 1.5, _medic], _medic] call CBA_fnc_targetEvent;
[QACEGVAR(common,displayTextStructured), [[_heartRateOutput, _patient call ACEFUNC(common,getName), round _heartRate], 1.5, _medic], _medic] call CBA_fnc_targetEvent;
4 changes: 2 additions & 2 deletions addons/circulation/functions/fnc_checkPulseStethLocal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* None
*
* Example:
* [player, cursorObject, "Head"] call ace_medical_treatment_fnc_checkPulseStethLocal
* [player, cursorObject, "Head"] call kat_circulation_fnc_checkPulseStethLocal
*
* Public: No
*/
Expand Down Expand Up @@ -43,4 +43,4 @@ if (_heartRate > 1) then {

[_patient, "quick_view", ACELSTRING(medical_treatment,Check_Pulse_Log), [_medic call ACEFUNC(common,getName), _logOutput]] call ACEFUNC(medical_treatment,addToLog);

[QEGVAR(common,displayTextStructured), [[_heartRateOutput, _patient call ACEFUNC(common,getName), round _heartRate], 1.5, _medic], _medic] call CBA_fnc_targetEvent;
[QACEGVAR(common,displayTextStructured), [[_heartRateOutput, _patient call ACEFUNC(common,getName), round _heartRate], 1.5, _medic], _medic] call CBA_fnc_targetEvent;
4 changes: 2 additions & 2 deletions addons/main/script_version.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define MAJOR 3
#define MINOR 0
#define PATCH 6
#define BUILD 62
#define PATCH 7
#define BUILD 63
6 changes: 3 additions & 3 deletions addons/vitals/functions/fnc_handleCardiacFunction.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ if IN_CRDC_ARRST(_unit) then {
private _painLevel = GET_PAIN_PERCEIVED(_unit);

// Adjustments and Pain Levels are taken off of last cycle HR to prevent any spiraling vitials
private _lastCycleHeartRate = GET_HEART_RATE(_unit) - _hrTargetAdjustment - (10 * _painLevel);
private _lastCycleHeartRate = GET_HEART_RATE(_unit) - _hrTargetAdjustment - (10 * _painLevel) - (ACEGVAR(advanced_fatigue,anFatigue) * 50);
private _lastCycleCO2 = _lastCycleHeartRate * HEART_RATE_CO2_MULTIPLIER;
private _demandReturn = _lastCycleCO2 / CO2_TO_DEMAND_DIVISOR;
private _strokeVolume = (_bloodVolume / BLOOD_VOLUME_TO_STROKE_DIVISOR);
Expand All @@ -63,9 +63,9 @@ if IN_CRDC_ARRST(_unit) then {
};

// All additional adjustments are added back
_actualHeartRate = _actualHeartRate + _hrTargetAdjustment + (10 * _painLevel);
_actualHeartRate = _actualHeartRate + _hrTargetAdjustment + (10 * _painLevel) + (ACEGVAR(advanced_fatigue,anFatigue) * 50);
};

_unit setVariable [VAR_HEART_RATE, _actualHeartRate, _syncValue];

_actualHeartRate
_actualHeartRate
7 changes: 4 additions & 3 deletions addons/vitals/functions/fnc_handleOxygenFunction.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,10 @@ if (EGVAR(pharma,kidneyAction)) then {

// Adjust dissociation constant based on temperature
private _phConstant = ((-0.00006653 * (_temperature ^ 2)) - (0.03268 * _temperature) + 7.4);
private _fatigue = [0, (ACEGVAR(advanced_fatigue,anFatigue) / 2)] select (ACEGVAR(advanced_fatigue,enabled));

// pH is from the Henderson-Hasselbalch equation
_pH = (_phConstant + log(24 / ((0.03 * _paco2)))) - ((_externalPh max 1) / 2000);
_pH = (_phConstant + log(24 / ((0.03 * _paco2)))) - ((_externalPh max 1) / 2000) - (_fatigue / 3);
};

// Fractional Oxygen when breathing normal air is 0.21, 1 when breathing 100% Oxygen, and 0 when no air is being brought into the lungs
Expand Down Expand Up @@ -125,8 +126,8 @@ private _arrestPerfusion = [1, (1 * EGVAR(breathing,SpO2_PerfusionMultiplier))]
// PaO2 moves in controlled steps to prevent hard movements when Ventilation Demand spikes
_pao2 = if (_previousCyclePao2 != _pao2) then { ([ (_previousCyclePao2 - ((PAO2_MAX_CHANGE * EGVAR(breathing,SpO2_MultiplyNegative) * _arrestPerfusion) * _deltaT)) , (_previousCyclePao2 + ((PAO2_MAX_CHANGE * EGVAR(breathing,SpO2_MultiplyPositive)) * _deltaT))] select ((_previousCyclePao2 - _pao2) < 0)) } else { _pao2 };

// Oxy-Hemo Dissociation Curve, driven by PaO2 with shaping done by pH
private _o2Sat = ((_pao2 max 1)^2.7 / ((25 - (((_pH / DEFAULT_PH) - 1) * 150))^2.7 + _pao2^2.7)) min 0.999;
// Oxy-Hemo Dissociation Curve, driven by PaO2 with shaping done by pH.
private _o2Sat = (((_pao2 max 1)^2.7 / ((25 - (((_pH / DEFAULT_PH) - 1) * 150))^2.7 + _pao2^2.7))) min 0.999;

_unit setVariable [VAR_BREATHING_RATE, (_respiratoryRate max 0), _syncValues];
_unit setVariable [VAR_BLOOD_GAS, [_paco2, _pao2, _o2Sat, 24, _pH, _etco2], _syncValues];
Expand Down
9 changes: 9 additions & 0 deletions addons/watch/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,13 @@ ADDON = true;
[CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)],
[[0, 1], [LLSTRING(SETTING_AltitudeForm_meters), LLSTRING(SETTING_AltitudeForm_feet)], 0],
true
] call CBA_Settings_fnc_init;

[
QGVAR(watchInaccuracy),
"CHECKBOX",
[LLSTRING(SETTING_WatchInaccuracy), LLSTRING(SETTING__WatchInaccuracy_Desc)],
[CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)],
[false],
true
] call CBA_Settings_fnc_init;
2 changes: 1 addition & 1 deletion addons/watch/functions/fnc_init.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ _unit setVariable [QGVAR(rangerStart), false, true];
_unit setVariable [QGVAR(rangerTimer), 0, true];
_unit setVariable [QGVAR(rangerHands), true, true];

_unit setVariable [QGVAR(katminSeconds), false, true];
_unit setVariable [QGVAR(katminSeconds), false, true];
9 changes: 8 additions & 1 deletion addons/watch/functions/fnc_showCWatch.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,14 @@ private _bearing = _display displayCtrl 20807;
_altitude ctrlSetText ([_altitudeValue, 1, 0] call CBA_fnc_formatNumber);
};

_hr ctrlSetText ([GET_HEART_RATE(_unit), 1, 0] call CBA_fnc_formatNumber);
if (GVAR(watchInaccuracy)) then {
private _fatigue = [0, (ACEGVAR(advanced_fatigue,anFatigue) * 2)] select (ACEGVAR(advanced_fatigue,enabled));
private _temperature = _unit getVariable [QEGVAR(hypothermia,unitTemperature), 37];

_hr ctrlSetText ([(GET_HEART_RATE(_unit) + ((2 * _fatigue) - (37 - _temperature))), 1, 0] call CBA_fnc_formatNumber);
} else {
_hr ctrlSetText ([GET_HEART_RATE(_unit), 1, 0] call CBA_fnc_formatNumber);
};

}, 1, [
_unit,
Expand Down
12 changes: 10 additions & 2 deletions addons/watch/functions/fnc_showKWatch.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,16 @@ private _timeSeconds = _display displayCtrl 22008;
_temp ctrlSetText (format ["%1C", ([(_altitudeValue call ACEFUNC(weather,calculateTemperatureAtHeight)), 1, 0] call CBA_fnc_formatNumber)]);
};

_hr ctrlSetText ([GET_HEART_RATE(_unit), 1, 0] call CBA_fnc_formatNumber);
_o2 ctrlSetText ([GET_KAT_SPO2(_unit), 1, 0] call CBA_fnc_formatNumber);
if (GVAR(watchInaccuracy)) then {
private _fatigue = [0, (ACEGVAR(advanced_fatigue,anFatigue) * 2)] select (ACEGVAR(advanced_fatigue,enabled));
private _temperature = _unit getVariable [QEGVAR(hypothermia,unitTemperature), 37];

_hr ctrlSetText ([(GET_HEART_RATE(_unit) + ((2 * _fatigue) - (37 - _temperature))), 1, 0] call CBA_fnc_formatNumber);
_o2 ctrlSetText ([(GET_KAT_SPO2(_unit) - (_fatigue - (37 - _temperature))), 1, 0] call CBA_fnc_formatNumber);
} else {
_hr ctrlSetText ([GET_HEART_RATE(_unit), 1, 0] call CBA_fnc_formatNumber);
_o2 ctrlSetText ([GET_KAT_SPO2(_unit), 1, 0] call CBA_fnc_formatNumber);
};

switch (true) do {
case(rain != 0): { _rain ctrlShow true; _overcast ctrlShow false; _sun ctrlShow false; };
Expand Down
12 changes: 10 additions & 2 deletions addons/watch/functions/fnc_showRWatch.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,16 @@ private _o2 = _display displayCtrl 22810;
_altitude ctrlSetText ([_altitudeValue, 1, 0] call CBA_fnc_formatNumber);
};

_hr ctrlSetText ([GET_HEART_RATE(_unit), 1, 0] call CBA_fnc_formatNumber);
_o2 ctrlSetText ([GET_KAT_SPO2(_unit), 1, 0] call CBA_fnc_formatNumber);
if (GVAR(watchInaccuracy)) then {
private _fatigue = [0, (ACEGVAR(advanced_fatigue,anFatigue) * 2)] select (ACEGVAR(advanced_fatigue,enabled));
private _temperature = _unit getVariable [QEGVAR(hypothermia,unitTemperature), 37];

_hr ctrlSetText ([(GET_HEART_RATE(_unit) + ((2 * _fatigue) - (37 - _temperature))), 1, 0] call CBA_fnc_formatNumber);
_o2 ctrlSetText ([(GET_KAT_SPO2(_unit) - (_fatigue - (37 - _temperature))), 1, 0] call CBA_fnc_formatNumber);
} else {
_hr ctrlSetText ([GET_HEART_RATE(_unit), 1, 0] call CBA_fnc_formatNumber);
_o2 ctrlSetText ([GET_KAT_SPO2(_unit), 1, 0] call CBA_fnc_formatNumber);
};

private _hours = floor dayTime;
private _minutes = floor ((dayTime - _hours) * 60);
Expand Down
12 changes: 10 additions & 2 deletions addons/watch/functions/fnc_showSWatch.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,16 @@ private _altitudeUnit = GVAR(altitudeUnit);

_time ctrlSetText (format ["%1:%2", [_hour, 2] call CBA_fnc_formatNumber, [_minute, 2] call CBA_fnc_formatNumber]);

_hr ctrlSetText ([GET_HEART_RATE(_unit), 1, 0] call CBA_fnc_formatNumber);
_o2 ctrlSetText ([GET_KAT_SPO2(_unit), 1, 0] call CBA_fnc_formatNumber);
if (GVAR(watchInaccuracy)) then {
private _fatigue = [0, (ACEGVAR(advanced_fatigue,anFatigue) * 2)] select (ACEGVAR(advanced_fatigue,enabled));
private _temperature = _unit getVariable [QEGVAR(hypothermia,unitTemperature), 37];

_hr ctrlSetText ([(GET_HEART_RATE(_unit) + ((2 * _fatigue) - (37 - _temperature))), 1, 0] call CBA_fnc_formatNumber);
_o2 ctrlSetText ([(GET_KAT_SPO2(_unit) - (_fatigue - (37 - _temperature))), 1, 0] call CBA_fnc_formatNumber);
} else {
_hr ctrlSetText ([GET_HEART_RATE(_unit), 1, 0] call CBA_fnc_formatNumber);
_o2 ctrlSetText ([GET_KAT_SPO2(_unit), 1, 0] call CBA_fnc_formatNumber);
};

private _curTime = CBA_missionTime;
private _timeDiff = _curTime - _prevTime;
Expand Down

0 comments on commit 71f8afa

Please sign in to comment.