Added new adv. medical module option 'painIsOnlySuppressed'

This commit is contained in:
ulteq 2015-06-11 17:36:18 +02:00
parent 0c40c1b439
commit eef7c1295a
5 changed files with 37 additions and 3 deletions

View File

@ -138,6 +138,11 @@ class ACE_Settings {
typeName = "BOOL";
value = 0;
};
class GVAR(painIsOnlySuppressed) {
displayName = CSTRING(painIsOnlySuppressed);
typeName = "BOOL";
value = 1;
};
class GVAR(painEffectType) {
displayName = CSTRING(painEffectType);
typeName = "SCALAR";

View File

@ -227,6 +227,12 @@ class CfgVehicles {
typeName = "BOOL";
defaultValue = 0;
};
class painIsOnlySuppressed {
displayName = CSTRING(AdvancedMedicalSettings_painIsOnlySuppressed_DisplayName);
description = CSTRING(AdvancedMedicalSettings_painIsOnlySuppressed_Description);
typeName = "BOOL";
defaultValue = 1;
};
};
class ModuleDescription {
description = CSTRING(AdvancedMedicalSettings_Module_Description);

View File

@ -34,3 +34,4 @@ if !(_activated) exitWith {};
[_logic, QGVAR(useLocation_PAK), "useLocation_PAK"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(useLocation_SurgicalKit), "useLocation_SurgicalKit"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(healHitPointAfterAdvBandage), "healHitPointAfterAdvBandage"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(painIsOnlySuppressed), "painIsOnlySuppressed"] call EFUNC(common,readSettingFromModule);

View File

@ -73,8 +73,15 @@ if (alive _target) then {
if (_painReduce > 0) then {
// Reduce the pain level
if (GVAR(painIsOnlySuppressed)) then {
// Suppress the pain
_painSuppress = _target getvariable [QGVAR(painSuppress), 0];
_target setvariable [QGVAR(painSuppress), (_painSuppress + _painReduce) max 0];
} else {
// Remove the pain
_pain = _target getvariable [QGVAR(pain), 0];
_target setvariable [QGVAR(pain), (_pain - _painReduce) max 0, true];
};
};
_resistance = _target getvariable [QGVAR(peripheralResistance), 100];

View File

@ -2209,6 +2209,11 @@
<German>Bandagieren entfernt Blutflecken</German>
<Polish>Bandażowanie usuwa ślady krwi</Polish>
</Key>
<Key ID="STR_ACE_Medical_painIsOnlySuppressed">
<English>Pain is only temporarily suppressed</English>
<German>Schmerzen werden nur vorübergehend unterdrückt</German>
<Polish>Ból jest tymczasowo zwalczany</Polish>
</Key>
<Key ID="STR_ACE_Medical_painEffectType">
<English>Pain Effect Type</English>
<German>Schmerzeffekt-Typ</German>
@ -3149,6 +3154,16 @@
<German>Bandagieren entfernt Blutflecken</German>
<Polish>Bandażowanie usuwa ślady krwi</Polish>
</Key>
<Key ID="STR_ACE_Medical_AdvancedMedicalSettings_painIsOnlySuppressed_DisplayName">
<English>Pain suppression</English>
<German>Schmerzunterdrückung</German>
<Polish>Zwalczanie bólu</Polish>
</Key>
<Key ID="STR_ACE_Medical_AdvancedMedicalSettings_painIsOnlySuppressed_Description">
<English>Pain is only temporarily suppressed, not removed</English>
<German>Bandagieren entfernt Blutflecken</German>
<Polish>Ból jest tylko tymczasowo zwalczany, nie jest usuwany trwale</Polish>
</Key>
<Key ID="STR_ACE_Medical_AdvancedMedicalSettings_Module_Description">
<English>Configure the treatment settings from ACE Medical</English>
<Russian>Настройка лечения в медицинской системе ACE</Russian>