mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Locailzation, tweak fast heart rate
This commit is contained in:
parent
e3af1b55a5
commit
2e61cc32e1
@ -1,3 +1,5 @@
|
||||
TRACE_1("",QUOTE(ADDON));
|
||||
|
||||
PREP(effectBleeding);
|
||||
PREP(effectBloodVolume);
|
||||
PREP(effectHeartBeat);
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
GVAR(nextFadeIn) = 0;
|
||||
GVAR(heartBeatEffectRunning) = false;
|
||||
|
||||
[false] call FUNC(initEffects);
|
||||
|
@ -2,7 +2,9 @@
|
||||
|
||||
ADDON = false;
|
||||
|
||||
PREP_RECOMPILE_START;
|
||||
#include "XEH_PREP.hpp"
|
||||
PREP_RECOMPILE_END;
|
||||
|
||||
[
|
||||
QGVAR(painEffectType),
|
||||
@ -11,7 +13,7 @@ ADDON = false;
|
||||
"ACE Medical", // @todo
|
||||
[
|
||||
[0, 1],
|
||||
["White flashing", "Pulsing blur"],
|
||||
[localize LSTRING(painEffectType_whiteFlashing), localize LSTRING(painEffectType_pulsingBlur)],
|
||||
0
|
||||
],
|
||||
false,
|
||||
|
@ -26,6 +26,7 @@ if (!_enable) exitWith {
|
||||
|
||||
// Initialize controls
|
||||
if (isNull _blood1) then {
|
||||
TRACE_1("Creating Blood Controls",_controls);
|
||||
_blood1 = findDisplay 46 ctrlCreate ["RscPicture", -1];
|
||||
_blood2 = findDisplay 46 ctrlCreate ["RscPicture", -1];
|
||||
|
||||
|
@ -11,13 +11,18 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
private _heartRate = ACE_player getVariable [QEGVAR(medical,heartRate), DEFAULT_HEART_RATE];
|
||||
if (_heartRate == 0) exitWith {GVAR(heartBeatEffectRunning) = false;};
|
||||
|
||||
if (_heartRate == 0) exitWith {
|
||||
TRACE_1("Ending heart beat effect - zero",_heartRate);
|
||||
GVAR(heartBeatEffectRunning) = false;
|
||||
};
|
||||
private _waitTime = 60 / _heartRate;
|
||||
|
||||
// TRACE_2("",_heartRate,_waitTime);
|
||||
|
||||
switch (true) do {
|
||||
case (_heartRate > 160): {
|
||||
playSound SND_HEARBEAT_FAST;
|
||||
// playSound SND_HEARBEAT_FAST; // Array doesn't blend together well, just play one file consistently
|
||||
playSound "ACE_heartbeat_fast_1";
|
||||
[DFUNC(effectHeartBeat), [], _waitTime] call CBA_fnc_waitAndExecute;
|
||||
};
|
||||
case (_heartRate < 60): {
|
||||
@ -26,7 +31,7 @@ switch (true) do {
|
||||
|
||||
};
|
||||
default {
|
||||
TRACE_1("Ending heart beat effect",_heartRate);
|
||||
TRACE_1("Ending heart beat effect - normal",_heartRate);
|
||||
GVAR(heartBeatEffectRunning) = false;
|
||||
};
|
||||
};
|
||||
|
@ -18,9 +18,10 @@ if (EGVAR(common,OldIsCamera) || {!alive ACE_player}) exitWith {
|
||||
[false] call FUNC(effectBleeding);
|
||||
};
|
||||
|
||||
BEGIN_COUNTER(handleEffects);
|
||||
|
||||
// - Current state info -------------------------------------------------------
|
||||
private _bleedingStrength = [ACE_player] call EFUNC(medical,getBloodloss);
|
||||
// private _bleeding = _bleedingStrength > 0;
|
||||
private _bloodVolume = ACE_player getVariable [QEGVAR(medical,bloodVolume), DEFAULT_BLOOD_VOLUME];
|
||||
private _unconscious = ACE_player getVariable [QEGVAR(medical,isUnconscious), false];
|
||||
private _heartRate = ACE_player getVariable [QEGVAR(medical,heartRate), DEFAULT_HEART_RATE];
|
||||
@ -43,3 +44,5 @@ if (!_unconscious) then {
|
||||
};
|
||||
|
||||
[true, _bleedingStrength] call FUNC(effectBleeding);
|
||||
|
||||
END_COUNTER(handleEffects);
|
||||
|
@ -15,5 +15,11 @@
|
||||
<Japanese>痛みの種類</Japanese>
|
||||
<Korean>고통 효과 종류</Korean>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_ui_painEffectType_whiteFlashing">
|
||||
<English>White flashing</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_ui_painEffectType_pulsingBlur">
|
||||
<English>Pulsing blur</English>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user