2015-01-11 16:42:31 +00:00
|
|
|
// by commy2
|
2015-01-12 04:02:33 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-01-29 07:38:46 +00:00
|
|
|
ADDON = false;
|
|
|
|
|
2015-01-12 18:22:58 +00:00
|
|
|
// ACE Common Function
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(addActionEventHandler);
|
|
|
|
PREP(addActionMenuEventHandler);
|
|
|
|
PREP(addCameraEventHandler);
|
|
|
|
PREP(addCustomEventHandler);
|
2015-01-25 03:56:23 +00:00
|
|
|
PREP(addLineToDebugDraw);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(addMapMarkerCreatedEventHandler);
|
|
|
|
PREP(addScrollWheelEventHandler);
|
2015-02-03 05:37:38 +00:00
|
|
|
PREP(addSetting);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(adminKick);
|
|
|
|
PREP(ambientBrightness);
|
|
|
|
PREP(applyForceWalkStatus);
|
|
|
|
PREP(binarizeNumber);
|
|
|
|
PREP(callCustomEventHandlers);
|
|
|
|
PREP(callCustomEventHandlersGlobal);
|
|
|
|
PREP(canGetInPosition);
|
|
|
|
PREP(canInteractWith);
|
|
|
|
PREP(canUseWeapon);
|
|
|
|
PREP(changeProjectileDirection);
|
|
|
|
PREP(checkPBOs);
|
|
|
|
PREP(claim);
|
|
|
|
PREP(closeDialogIfTargetMoves);
|
|
|
|
PREP(codeToLetter);
|
|
|
|
PREP(codeToString);
|
|
|
|
PREP(convertKeyCode);
|
2015-01-25 03:56:23 +00:00
|
|
|
PREP(createOrthonormalReference);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(currentChannel);
|
|
|
|
PREP(disableUserInput);
|
|
|
|
PREP(displayText);
|
|
|
|
PREP(displayTextPicture);
|
|
|
|
PREP(displayTextStructured);
|
|
|
|
PREP(doAnimation);
|
|
|
|
PREP(endRadioTransmission);
|
2015-01-17 16:56:24 +00:00
|
|
|
PREP(execNextFrame);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(execPersistentFnc);
|
|
|
|
PREP(execRemoteFnc);
|
|
|
|
PREP(executePersistent);
|
|
|
|
PREP(filter);
|
|
|
|
PREP(fixLoweredRifleAnimation);
|
2015-01-16 18:24:25 +00:00
|
|
|
PREP(getAllGear);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(getCaptivityStatus);
|
|
|
|
PREP(getConfigCommander);
|
|
|
|
PREP(getConfigGunner);
|
|
|
|
PREP(getDefaultAnim);
|
|
|
|
PREP(getDoorTurrets);
|
|
|
|
PREP(getForceWalkStatus);
|
2015-02-04 02:20:55 +00:00
|
|
|
PREP(getGunner);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(getHitPoints);
|
|
|
|
PREP(getHitPointsWithSelections);
|
|
|
|
PREP(getInPosition);
|
|
|
|
PREP(getMarkerType);
|
|
|
|
PREP(getName);
|
|
|
|
PREP(getNumberFromMissionSQM);
|
|
|
|
PREP(getPitchBankYaw);
|
2015-02-03 03:43:23 +00:00
|
|
|
PREP(getSettingData);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(getStringFromMissionSQM);
|
|
|
|
PREP(getTargetAzimuthAndInclination);
|
|
|
|
PREP(getTargetDistance);
|
|
|
|
PREP(getTargetObject);
|
|
|
|
PREP(getTurretCommander);
|
|
|
|
PREP(getTurretConfigPath);
|
|
|
|
PREP(getTurretCopilot);
|
|
|
|
PREP(getTurretGunner);
|
|
|
|
PREP(getTurretIndex);
|
|
|
|
PREP(getTurrets);
|
|
|
|
PREP(getTurretsFFV);
|
|
|
|
PREP(getTurretsOther);
|
|
|
|
PREP(getUavControlPosition);
|
|
|
|
PREP(getVehicleCargo);
|
|
|
|
PREP(getVehicleCodriver);
|
|
|
|
PREP(getVehicleCrew);
|
|
|
|
PREP(getWeaponAzimuthAndInclination);
|
2015-02-12 14:57:55 +00:00
|
|
|
PREP(getWeaponIndex);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(getWeaponType);
|
|
|
|
PREP(getWindDirection);
|
|
|
|
PREP(goKneeling);
|
|
|
|
PREP(hadamardProduct);
|
|
|
|
PREP(interpolateFromArray);
|
|
|
|
PREP(inTransitionAnim);
|
|
|
|
PREP(isAutoWind);
|
|
|
|
PREP(isEngineer);
|
|
|
|
PREP(isEOD);
|
|
|
|
PREP(isInBuilding);
|
|
|
|
PREP(isPlayer);
|
|
|
|
PREP(isTurnedOut);
|
|
|
|
PREP(letterToCode);
|
2015-02-03 19:49:40 +00:00
|
|
|
PREP(loadSettingsFromProfile);
|
2015-01-30 21:56:45 +00:00
|
|
|
PREP(loadSettingsOnServer);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(map);
|
|
|
|
PREP(moduleCheckPBOs);
|
|
|
|
PREP(moduleLSDVehicles);
|
|
|
|
PREP(muteUnit);
|
|
|
|
PREP(numberToDigits);
|
|
|
|
PREP(numberToDigitsString);
|
|
|
|
PREP(onLoadRscDisplayChannel);
|
|
|
|
PREP(owned);
|
|
|
|
PREP(player);
|
|
|
|
PREP(playerSide);
|
|
|
|
PREP(progressBar);
|
|
|
|
PREP(queueAnimation);
|
2015-02-03 05:52:07 +00:00
|
|
|
PREP(readSettingFromModule);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(removeActionEventHandler);
|
|
|
|
PREP(removeActionMenuEventHandler);
|
|
|
|
PREP(removeCameraEventHandler);
|
|
|
|
PREP(removeCustomEventHandler);
|
|
|
|
PREP(removeMapMarkerCreatedEventHandler);
|
|
|
|
PREP(removeScrollWheelEventHandler);
|
|
|
|
PREP(restoreVariablesJIP);
|
|
|
|
PREP(revertKeyCodeLocalized);
|
|
|
|
PREP(sanitizeString);
|
|
|
|
PREP(serverLog);
|
|
|
|
PREP(setCaptivityStatus);
|
|
|
|
PREP(setForceWalkStatus);
|
|
|
|
PREP(setName);
|
|
|
|
PREP(setParameter);
|
|
|
|
PREP(setPitchBankYaw);
|
|
|
|
PREP(setVariableJIP);
|
2015-02-12 12:23:38 +00:00
|
|
|
PREP(setVariablePublic);
|
2015-01-30 21:56:45 +00:00
|
|
|
PREP(setSetting);
|
|
|
|
PREP(setSettingFromConfig);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(stringToColoredText);
|
|
|
|
PREP(subString);
|
|
|
|
PREP(toBin);
|
|
|
|
PREP(toBitmask);
|
|
|
|
PREP(toHex);
|
|
|
|
PREP(toNumber);
|
2015-02-10 01:59:43 +00:00
|
|
|
PREP(throttledPublicVariable);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(unmuteUnit);
|
2015-01-17 05:58:24 +00:00
|
|
|
PREP(waitAndExecute);
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-01-12 04:02:33 +00:00
|
|
|
// ACE_Debug
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(exportConfig);
|
|
|
|
PREP(getChildren);
|
|
|
|
PREP(getDisplayConfigName);
|
|
|
|
PREP(log);
|
|
|
|
PREP(logControls);
|
|
|
|
PREP(logDisplays);
|
|
|
|
PREP(monitor);
|
|
|
|
PREP(showUser);
|
2015-01-12 04:02:33 +00:00
|
|
|
|
|
|
|
// ACE_CuratorFix
|
2015-01-13 18:31:26 +00:00
|
|
|
PREP(addCuratorUnloadEventhandler);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(fixCrateContent);
|
2015-01-12 04:02:33 +00:00
|
|
|
|
2015-01-13 23:27:42 +00:00
|
|
|
//ACE events global variables
|
2015-01-14 20:44:32 +00:00
|
|
|
GVAR(events) = [[],[]];
|
2015-01-13 23:27:42 +00:00
|
|
|
|
|
|
|
PREP(globalEvent);
|
|
|
|
PREP(_handleNetEvent);
|
2015-01-14 20:44:32 +00:00
|
|
|
PREP(addEventHandler);
|
2015-01-13 23:27:42 +00:00
|
|
|
PREP(targetEvent);
|
|
|
|
PREP(serverEvent);
|
2015-01-14 20:44:32 +00:00
|
|
|
PREP(localEvent);
|
|
|
|
PREP(removeEventHandler);
|
|
|
|
PREP(removeAlLEventHandlers);
|
2015-01-13 23:27:42 +00:00
|
|
|
|
2015-01-14 21:29:52 +00:00
|
|
|
// hashes
|
|
|
|
PREP(hashCreate);
|
|
|
|
PREP(hashSet);
|
|
|
|
PREP(hashGet);
|
|
|
|
PREP(hashHasKey);
|
|
|
|
PREP(hashRem);
|
|
|
|
PREP(hashListCreateList);
|
|
|
|
PREP(hashListCreateHash);
|
|
|
|
PREP(hashListSelect);
|
|
|
|
PREP(hashListSet);
|
|
|
|
PREP(hashListPush);
|
|
|
|
|
2015-01-30 21:56:45 +00:00
|
|
|
// Load settings
|
2015-02-03 00:13:31 +00:00
|
|
|
if (isServer) then {
|
2015-01-30 21:56:45 +00:00
|
|
|
call FUNC(loadSettingsOnServer);
|
|
|
|
};
|
2015-01-16 14:30:49 +00:00
|
|
|
|
2015-01-12 04:02:33 +00:00
|
|
|
ACE_player = player;
|
2015-01-16 14:30:49 +00:00
|
|
|
|
2015-01-11 16:42:31 +00:00
|
|
|
if (hasInterface) then {
|
2015-01-16 14:30:49 +00:00
|
|
|
// PFH to update the ACE_player variable
|
|
|
|
[{
|
2015-01-12 21:34:01 +00:00
|
|
|
if !(ACE_player isEqualTo (missionNamespace getVariable ["BIS_fnc_moduleRemoteControl_unit", player])) then {
|
2015-01-16 14:30:49 +00:00
|
|
|
_oldPlayer = ACE_player;
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-01-12 21:34:01 +00:00
|
|
|
ACE_player = missionNamespace getVariable ["BIS_fnc_moduleRemoteControl_unit", player];
|
|
|
|
uiNamespace setVariable ["ACE_player", ACE_player];
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-01-16 14:30:49 +00:00
|
|
|
// Raise custom event. @todo, remove
|
|
|
|
[missionNamespace, "playerChanged", [ACE_player, _oldPlayer]] call FUNC(callCustomEventHandlers);
|
|
|
|
// Raise ACE event
|
2015-01-16 15:14:18 +00:00
|
|
|
["playerChanged", [ACE_player, _oldPlayer]] call FUNC(localEvent);
|
2015-01-12 21:34:01 +00:00
|
|
|
};
|
2015-01-16 14:30:49 +00:00
|
|
|
}, 0, []] call cba_fnc_addPerFrameHandler;
|
2015-01-11 16:42:31 +00:00
|
|
|
};
|
2015-01-14 21:29:52 +00:00
|
|
|
|
2015-01-16 23:21:47 +00:00
|
|
|
PREP(stringCompare);
|
|
|
|
PREP(string_removeWhiteSpace);
|
|
|
|
PREP(isHC);
|
|
|
|
PREP(sendRequest_f);
|
|
|
|
PREP(requestCallback);
|
|
|
|
PREP(receiveRequest);
|
|
|
|
PREP(onAnswerRequest);
|
|
|
|
PREP(debug);
|
|
|
|
PREP(debugModule);
|
|
|
|
PREP(defineVariable);
|
|
|
|
PREP(setDefinedVariable);
|
|
|
|
PREP(getDefinedVariable);
|
|
|
|
PREP(getAllDefinedSetVariables);
|
|
|
|
PREP(getDefinedVariableInfo);
|
|
|
|
PREP(getDefinedVariableDefault);
|
|
|
|
PREP(getDeathAnim);
|
|
|
|
PREP(insertionSort);
|
|
|
|
PREP(uniqueElementsOnly);
|
|
|
|
PREP(sortAlphabeticallyBy);
|
|
|
|
PREP(hasMagazine);
|
|
|
|
PREP(useMagazine);
|
|
|
|
PREP(findMagazine);
|
|
|
|
PREP(hasItem);
|
|
|
|
PREP(useItem);
|
|
|
|
PREP(findItem);
|
|
|
|
PREP(getNumberMagazinesIn);
|
|
|
|
PREP(setCanInteract);
|
|
|
|
PREP(getCanInteract);
|
|
|
|
PREP(canInteract);
|
|
|
|
PREP(resetAllDefaults_f);
|
|
|
|
PREP(broadcastSound3D_f);
|
2015-01-24 16:18:38 +00:00
|
|
|
|
2015-01-16 23:21:47 +00:00
|
|
|
PREP(isAwake);
|
|
|
|
PREP(setProne);
|
2015-01-14 21:29:52 +00:00
|
|
|
|
2015-01-18 18:54:43 +00:00
|
|
|
PREP(setDisableUserInputStatus);
|
2015-01-14 21:29:52 +00:00
|
|
|
|
2015-01-16 23:21:47 +00:00
|
|
|
PREP(dropWeapon_f);
|
|
|
|
PREP(inWater_f);
|
|
|
|
PREP(setVolume_f);
|
|
|
|
PREP(closeAllDialogs_f);
|
|
|
|
PREP(disableAI_f);
|
|
|
|
PREP(switchToGroupSide_f);
|
|
|
|
PREP(getFirstObjectIntersection);
|
|
|
|
PREP(getFirstTerrainIntersection);
|
|
|
|
PREP(setHearingCapability);
|
|
|
|
PREP(revealObject_f);
|
|
|
|
PREP(getWeaponItems_f);
|
|
|
|
PREP(isModLoaded_f);
|
|
|
|
PREP(inheritsFrom);
|
|
|
|
PREP(getVersion);
|
|
|
|
PREP(carryObj);
|
|
|
|
PREP(carriedByObj);
|
|
|
|
PREP(getCarriedObj);
|
|
|
|
PREP(getCarriedBy);
|
|
|
|
PREP(beingCarried);
|
|
|
|
PREP(setCarriedBy);
|
2015-01-24 16:18:38 +00:00
|
|
|
|
|
|
|
|
2015-01-16 23:21:47 +00:00
|
|
|
PREP(moveToTempGroup);
|
2015-01-24 16:18:38 +00:00
|
|
|
|
2015-01-14 21:29:52 +00:00
|
|
|
|
2015-01-16 23:21:47 +00:00
|
|
|
PREP(limitMovementSpeed);
|
|
|
|
PREP(setArrestState);
|
|
|
|
PREP(isArrested);
|
|
|
|
PREP(loadPerson_F);
|
|
|
|
PREP(loadPersonLocal_F);
|
|
|
|
PREP(unloadPerson_F);
|
2015-01-24 16:18:38 +00:00
|
|
|
|
|
|
|
|
2015-01-16 23:21:47 +00:00
|
|
|
ADDON = true;
|