mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
implement custom treatment sounds
This commit is contained in:
parent
ecd77630f5
commit
2c7864c02b
@ -42,6 +42,7 @@ class GVAR(Actions) {
|
||||
callbackSuccess = QUOTE(DFUNC(treatmentBasic_morphine));
|
||||
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
|
||||
litter[] = { {"All", "", {"ACE_MedicalLitter_morphine"}} };
|
||||
sounds[] = {{QPATHTO_R(sounds\Inject.ogg),1,1,50}};
|
||||
};
|
||||
class Epinephrine: Bandage {
|
||||
displayName = ECSTRING(medical,Inject_Epinephrine);
|
||||
@ -56,6 +57,7 @@ class GVAR(Actions) {
|
||||
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
|
||||
litter[] = { {"All", "", {"ACE_MedicalLitter_epinephrine"}} };
|
||||
treatmentLocations[] = {QGVAR(useLocation_basicEpi)};
|
||||
sounds[] = {{QPATHTO_R(sounds\Inject.ogg),1,1,50}};
|
||||
};
|
||||
class BloodIV: Bandage {
|
||||
displayName = ECSTRING(medical,Transfuse_Blood);
|
||||
@ -214,6 +216,7 @@ class GVAR(Actions) {
|
||||
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_medication));
|
||||
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
|
||||
litter[] = { {"All", "", {"ACE_MedicalLitter_morphine"}} };
|
||||
sounds[] = {{QPATHTO_R(sounds\Inject.ogg),1,1,50}};
|
||||
};
|
||||
class Adenosine: Morphine {
|
||||
displayName = ECSTRING(medical,Inject_Adenosine);
|
||||
|
@ -26,7 +26,8 @@ GVAR(animDurations) = [] call CBA_fnc_createNamespace;
|
||||
["AinvPpneMstpSlayWrflDnon_medicOther", 9],
|
||||
["AinvPknlMstpSlayWlnrDnon_medicOther", 9],
|
||||
["AinvPknlMstpSlayWpstDnon_medicOther", 10],
|
||||
["AinvPpneMstpSlayWpstDnon_medicOther", 8.5]
|
||||
["AinvPpneMstpSlayWpstDnon_medicOther", 8.5],
|
||||
["AinvPknlMstpSnonWnonDnon_medic1", 10]
|
||||
];
|
||||
|
||||
ADDON = true;
|
||||
|
@ -149,6 +149,27 @@ if (isNumber (_config >> "treatmentTime")) then {
|
||||
};
|
||||
TRACE_1("",_treatmentTime);
|
||||
|
||||
// speed up animation depending on treatment time
|
||||
if (!isNil "_animDuration") then {
|
||||
_caller setAnimSpeedCoef (_animDuration / _treatmentTime);
|
||||
TRACE_2("",_animDuration,_treatmentTime);
|
||||
};
|
||||
|
||||
// play sound
|
||||
if (isArray (_config >> "sounds")) then {
|
||||
selectRandom getArray (_config >> "sounds") params ["_file", ["_volume", 1], ["_pitch", 1], ["_distance", 0]];
|
||||
TRACE_4("playSound3D",_file,_volume,_pitch,_distance);
|
||||
playSound3D [
|
||||
_file,
|
||||
objNull,
|
||||
false,
|
||||
getPosASL _caller,
|
||||
_volume,
|
||||
_pitch,
|
||||
_distance
|
||||
];
|
||||
};
|
||||
|
||||
// start treatment
|
||||
[
|
||||
_treatmentTime,
|
||||
@ -160,12 +181,6 @@ TRACE_1("",_treatmentTime);
|
||||
["isnotinside"]
|
||||
] call EFUNC(common,progressBar);
|
||||
|
||||
// speed up animation depending on treatment time
|
||||
if (!isNil "_animDuration") then {
|
||||
_caller setAnimSpeedCoef (_animDuration / _treatmentTime);
|
||||
TRACE_2("",_animDuration,_treatmentTime);
|
||||
};
|
||||
|
||||
// display icon
|
||||
private _iconDisplayed = getText (_config >> "actionIconPath");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user