mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Add basic anims; add system for prone/self anims
This commit is contained in:
parent
cff3e23d38
commit
2873bdf0ed
@ -17,8 +17,12 @@ class ACE_Medical_Actions {
|
||||
callbackSuccess = QUOTE(DFUNC(treatmentBasic_bandage));
|
||||
callbackFailure = QUOTE(DFUNC(treatmentBasic_abort));
|
||||
callbackProgress = "";
|
||||
|
||||
animationPatient = "";
|
||||
animationCaller = "";
|
||||
animationCaller = "AinvPknlMstpSnonWnonDnon_medic4";
|
||||
animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
|
||||
animationCallerSelf = "AinvPknlMstpSlayW[wpn]Dnon_medic";
|
||||
animationCallerSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
|
||||
};
|
||||
class Morphine: Bandage {
|
||||
displayName = "Morphine";
|
||||
@ -26,7 +30,7 @@ class ACE_Medical_Actions {
|
||||
treatmentTime = 2;
|
||||
items[] = {QGVAR(morphine)};
|
||||
callbackSuccess = QUOTE(DFUNC(treatmentBasic_morphine));
|
||||
animationCaller = ""; // @todo
|
||||
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
|
||||
};
|
||||
class Epipen: Bandage {
|
||||
displayName = "Epinephrine";
|
||||
@ -34,7 +38,7 @@ class ACE_Medical_Actions {
|
||||
treatmentTime = 3;
|
||||
items[] = {QGVAR(epinephrine)};
|
||||
callbackSuccess = QUOTE(DFUNC(treatmentBasic_epipen));
|
||||
animationCaller = ""; // @todo
|
||||
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
|
||||
};
|
||||
class Bloodbag: Bandage {
|
||||
displayName = "Blood Bag";
|
||||
@ -42,7 +46,7 @@ class ACE_Medical_Actions {
|
||||
treatmentTime = 20;
|
||||
items[] = {{QGVAR(bloodIV), QGVAR(bloodIV_500), QGVAR(bloodIV_250)}};
|
||||
callbackSuccess = QUOTE(DFUNC(treatmentBasic_bloodbag));
|
||||
animationCaller = ""; // @todo
|
||||
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_caller", "_target", "_selectionName", "_className", "_config", "_availableLevels", "_medicRequired", "_items", "_locations", "_return", "_callbackSuccess", "_callbackFailure", "_callbackProgress", "_treatmentTime", "_callerAnim", "_patietAnim", "_iconDisplayed"];
|
||||
private ["_caller", "_target", "_selectionName", "_className", "_config", "_availableLevels", "_medicRequired", "_items", "_locations", "_return", "_callbackSuccess", "_callbackFailure", "_callbackProgress", "_treatmentTime", "_callerAnim", "_patientAnim", "_iconDisplayed"];
|
||||
_caller = _this select 0;
|
||||
_target = _this select 1;
|
||||
_selectionName = _this select 2;
|
||||
@ -76,11 +76,17 @@ if (isNil _callbackProgress) then {
|
||||
_treatmentTime = getNumber (_config >> "treatmentTime");
|
||||
[_treatmentTime, [_caller, _target, _selectionName, _className, _items], _callbackSuccess, _callbackFailure, (localize ""), _callbackProgress] call EFUNC(common,progressBar);
|
||||
|
||||
_callerAnim = getText (_config >> "animationCaller");
|
||||
_patietAnim = getText (_confg >> "animationPatient");
|
||||
_callerAnim = [getText (_config >> "animationCaller"), getText (_config >> "animationCallerProne")] select (stance _caller == "PRONE");
|
||||
if (_caller == _target) then {
|
||||
_callerAnim = [getText (_config >> "animationCallerSelf"), getText (_config >> "animationCallerSelfProne")] select (stance _caller == "PRONE");
|
||||
};
|
||||
_wpn = ["non", "rfl", "pst"] select (["", primaryWeapon _caller, handgunWeapon _caller] find (currentWeapon _caller));
|
||||
_callerAnim = [_callerAnim, "[wpn]", _wpn] call CBA_fnc_replace;
|
||||
|
||||
if (_caller != _target && {vehicle _target == _target} && {_patietAnim != ""}) then {
|
||||
[_target, _patietAnim] call EFUNC(common,doAnimation);
|
||||
_patientAnim = getText (_confg >> "animationPatient");
|
||||
|
||||
if (_caller != _target && {vehicle _target == _target} && {_patientAnim != ""}) then {
|
||||
[_target, _patientAnim] call EFUNC(common,doAnimation);
|
||||
};
|
||||
if (vehicle _caller == _caller && {_callerAnim != ""}) then {
|
||||
if (primaryWeapon _caller == "") then {
|
||||
|
Loading…
Reference in New Issue
Block a user