Fix some efuncs

This commit is contained in:
PabstMirror 2016-08-09 12:47:59 -05:00
parent 011c6a0d00
commit f12feae7fe
9 changed files with 13 additions and 13 deletions

View File

@ -48,10 +48,10 @@ if (!alive _unit) exitWith {
// In case the unit is no longer in an unconscious state, we are going to check if we can already reset the animation
if !(_unit getVariable ["ACE_isUnconscious",false]) exitWith {
TRACE_7("ACE_DEBUG_Unconscious_PFH",_unit, _args, [_unit] call FUNC(isBeingCarried), [_unit] call FUNC(isBeingDragged), _idPFH, _unit getVariable QGVAR(unconsciousArguments),animationState _unit);
TRACE_7("ACE_DEBUG_Unconscious_PFH",_unit, _args, [_unit] call EFUNC(medical_treatment,isBeingCarried), [_unit] call EFUNC(medical_treatment,isBeingDragged), _idPFH, _unit getVariable QGVAR(unconsciousArguments),animationState _unit);
// TODO, handle this with carry instead, so we can remove the PFH here.
// Wait until the unit isn't being carried anymore, so we won't end up with wierd animations
if !(([_unit] call FUNC(isBeingCarried)) || ([_unit] call FUNC(isBeingDragged))) then {
if !(([_unit] call EFUNC(medical_treatment,isBeingCarried)) || ([_unit] call EFUNC(medical_treatment,isBeingDragged))) then {
if ("ACE_FakePrimaryWeapon" in (weapons _unit)) then {
TRACE_1("Removing fake weapon [on wakeup]",_unit);
_unit removeWeapon "ACE_FakePrimaryWeapon";

View File

@ -26,8 +26,8 @@ private _fnc_compileActionsLevel = {
if (isClass _x) then {
private _displayName = getText (_x >> "displayName");
private _category = getText (_x >> "category");
private _condition = format[QUOTE([ARR_4(ACE_player, GVAR(INTERACTION_TARGET), EGVAR(medical,SELECTIONS) select GVAR(selectedBodyPart), '%1')] call DEFUNC(medical,canTreatCached)), configName _x];
private _statement = format[QUOTE([ARR_4(ACE_player, GVAR(INTERACTION_TARGET), EGVAR(medical,SELECTIONS) select GVAR(selectedBodyPart), '%1')] call DEFUNC(medical,treatment)), configName _x];
private _condition = format[QUOTE([ARR_4(ACE_player, GVAR(INTERACTION_TARGET), EGVAR(medical,SELECTIONS) select GVAR(selectedBodyPart), '%1')] call DEFUNC(medical_treatment,canTreatCached)), configName _x];
private _statement = format[QUOTE([ARR_4(ACE_player, GVAR(INTERACTION_TARGET), EGVAR(medical,SELECTIONS) select GVAR(selectedBodyPart), '%1')] call DEFUNC(medical_treatment,treatment)), configName _x];
_actions pushBack [_displayName, _category, compile _condition, compile _statement];
};
nil

View File

@ -153,6 +153,6 @@ if ((EGVAR(medical,level) >= 2) && {([_target] call EFUNC(medical,hasMedicalEnab
[_display, _target getVariable [QEGVAR(medical,logFile_activity_view), []]] call FUNC(updateActivityLog);
[_display, _target getVariable [QEGVAR(medical,logFile_quick_view), []]] call FUNC(updateQuickViewLog);
private _triageStatus = [_target] call EFUNC(medical,getTriageStatus);
private _triageStatus = [_target] call EFUNC(medical_treatment,getTriageStatus);
(_display displayCtrl 2000) ctrlSetText (_triageStatus select 0);
(_display displayCtrl 2000) ctrlSetBackgroundColor (_triageStatus select 2);

View File

@ -73,8 +73,8 @@ if (_patientStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}
private _locations = getArray (_config >> "treatmentLocations");
if ("All" in _locations) exitwith { true };
private _medFacility = {([_caller] call FUNC(isInMedicalFacility)) || ([_target] call FUNC(isInMedicalFacility))};
private _medVeh = {([_caller] call FUNC(isInMedicalVehicle)) || ([_target] call FUNC(isInMedicalVehicle))};
private _medFacility = {([_caller] call EFUNC(medical,isInMedicalFacility)) || ([_target] call EFUNC(medical,isInMedicalFacility))};
private _medVeh = {([_caller] call EFUNC(medical,isInMedicalVehicle)) || ([_target] call EFUNC(medical,isInMedicalVehicle))};
{
if (_x == "field") exitwith {_return = true;};

View File

@ -29,7 +29,7 @@ if ([_medic, _item] call EFUNC(common,hasItem)) exitWith {
};
private _return = false;
if ((vehicle _medic != _medic) && {[vehicle _medic] call FUNC(isMedicalVehicle)}) then {
if ((vehicle _medic != _medic) && {[vehicle _medic] call EFUNC(medical,isMedicalVehicle)}) then {
private _crew = crew vehicle _medic;
{
if ([_medic, _x] call FUNC(canAccessMedicalEquipment) && {([_x, _item] call EFUNC(common,hasItem))}) exitWith {

View File

@ -85,8 +85,8 @@ private _locations = getArray (_config >> "treatmentLocations");
if ("All" in _locations) then {
_return = true;
} else {
private _medFacility = {([_caller] call FUNC(isInMedicalFacility)) || ([_target] call FUNC(isInMedicalFacility))};
private _medVeh = {([_caller] call FUNC(isInMedicalVehicle)) || ([_target] call FUNC(isInMedicalVehicle))};
private _medFacility = {([_caller] call EFUNC(medical,isInMedicalFacility)) || ([_target] call EFUNC(medical,isInMedicalFacility))};
private _medVeh = {([_caller] call EFUNC(medical,isInMedicalVehicle)) || ([_target] call EFUNC(medical,isInMedicalVehicle))};
{
if (_x == "field") exitwith {_return = true;};

View File

@ -17,7 +17,7 @@
params ["_caller", "_target","_className"];
[_target, false] call FUNC(setUnconscious);
[_target, false] call EFUNC(medical,setUnconscious);
if (_target getVariable [QEGVAR(medical,inReviveState), false]) then {
_target setVariable [QEGVAR(medical,inReviveState), nil, true];

View File

@ -67,7 +67,7 @@ if (!(_callback isEqualType {})) then {_callback = {TRACE_1("callback was NOT co
//Get current blood loose on limb (for "bloody" litter)
private _bloodLossOnSelection = 0;
private _partNumber = ([_selectionName] call FUNC(selectionNameToNumber)) max 0;
private _partNumber = ([_selectionName] call EFUNC(medical,selectionNameToNumber)) max 0;
// Add all bleeding from wounds on selection
private _openWounds = _target getvariable [QGVAR(openWounds), []];

View File

@ -41,7 +41,7 @@ if ([_medic, _item] call EFUNC(common,hasItem)) exitWith {
};
private _return = [false, objNull];
if ([vehicle _medic] call FUNC(isMedicalVehicle) && {vehicle _medic != _medic}) then {
if ([vehicle _medic] call EFUNC(medical,isMedicalVehicle) && {vehicle _medic != _medic}) then {
private _crew = crew vehicle _medic;
{
if ([_medic, _x] call FUNC(canAccessMedicalEquipment) && {([_x, _item] call EFUNC(common,hasItem))}) exitWith {