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);
|
2015-03-15 15:12:37 +00:00
|
|
|
PREP(addCanInteractWithCondition);
|
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);
|
2015-03-03 04:37:00 +00:00
|
|
|
PREP(ASLToPosition);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(beingCarried);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(binarizeNumber);
|
2015-02-14 19:06:55 +00:00
|
|
|
PREP(blurScreen);
|
2015-03-11 02:20:05 +00:00
|
|
|
PREP(cachedCall);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(canGetInPosition);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(canInteract);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(canInteractWith);
|
|
|
|
PREP(canUseWeapon);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(carriedByObj);
|
|
|
|
PREP(carryObj);
|
2015-01-12 04:27:21 +00:00
|
|
|
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);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(debug);
|
|
|
|
PREP(debugModule);
|
|
|
|
PREP(defineVariable);
|
|
|
|
PREP(disableAI);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(disableUserInput);
|
2015-02-14 19:06:55 +00:00
|
|
|
PREP(displayIcon);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(displayText);
|
|
|
|
PREP(displayTextPicture);
|
|
|
|
PREP(displayTextStructured);
|
|
|
|
PREP(doAnimation);
|
|
|
|
PREP(endRadioTransmission);
|
2015-03-11 02:20:05 +00:00
|
|
|
PREP(eraseCache);
|
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);
|
2015-03-17 10:44:41 +00:00
|
|
|
PREP(fixCollision);
|
2015-03-18 00:36:56 +00:00
|
|
|
PREP(fixFloating);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(fixLoweredRifleAnimation);
|
2015-03-16 18:25:29 +00:00
|
|
|
PREP(fixPosition);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(getAllDefinedSetVariables);
|
2015-01-16 18:24:25 +00:00
|
|
|
PREP(getAllGear);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(getCaptivityStatus);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(getCarriedBy);
|
|
|
|
PREP(getCarriedObj);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(getConfigCommander);
|
|
|
|
PREP(getConfigGunner);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(getDeathAnim);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(getDefaultAnim);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(getDefinedVariable);
|
|
|
|
PREP(getDefinedVariableDefault);
|
|
|
|
PREP(getDefinedVariableInfo);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(getDoorTurrets);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(getFirstObjectIntersection);
|
|
|
|
PREP(getFirstTerrainIntersection);
|
2015-01-12 04:27:21 +00:00
|
|
|
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);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(getNumberMagazinesIn);
|
2015-01-12 04:27:21 +00:00
|
|
|
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);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(getVersion);
|
2015-01-12 04:27:21 +00:00
|
|
|
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);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(hasItem);
|
|
|
|
PREP(hasMagazine);
|
|
|
|
PREP(inheritsFrom);
|
|
|
|
PREP(insertionSort);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(interpolateFromArray);
|
|
|
|
PREP(inTransitionAnim);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(inWater);
|
2015-03-10 22:35:05 +00:00
|
|
|
PREP(isAlive);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(isArrested);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(isAutoWind);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(isAwake);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(isEngineer);
|
|
|
|
PREP(isEOD);
|
|
|
|
PREP(isInBuilding);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(isModLoaded);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(isPlayer);
|
|
|
|
PREP(isTurnedOut);
|
|
|
|
PREP(letterToCode);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(limitMovementSpeed);
|
|
|
|
PREP(loadPerson);
|
|
|
|
PREP(loadPersonLocal);
|
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);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(moveToTempGroup);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(muteUnit);
|
|
|
|
PREP(numberToDigits);
|
|
|
|
PREP(numberToDigitsString);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(onAnswerRequest);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(onLoadRscDisplayChannel);
|
|
|
|
PREP(owned);
|
|
|
|
PREP(player);
|
|
|
|
PREP(playerSide);
|
2015-03-03 04:37:00 +00:00
|
|
|
PREP(positionToASL);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(progressBar);
|
|
|
|
PREP(queueAnimation);
|
2015-02-03 05:52:07 +00:00
|
|
|
PREP(readSettingFromModule);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(receiveRequest);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(removeActionEventHandler);
|
|
|
|
PREP(removeActionMenuEventHandler);
|
2015-03-15 15:12:37 +00:00
|
|
|
PREP(removeCanInteractWithCondition);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(removeMapMarkerCreatedEventHandler);
|
|
|
|
PREP(removeScrollWheelEventHandler);
|
2015-02-20 05:45:17 +00:00
|
|
|
PREP(removeSpecificMagazine);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(requestCallback);
|
|
|
|
PREP(resetAllDefaults);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(restoreVariablesJIP);
|
|
|
|
PREP(revertKeyCodeLocalized);
|
|
|
|
PREP(sanitizeString);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(sendRequest);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(serverLog);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(setArrestState);
|
|
|
|
PREP(setCanInteract);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(setCaptivityStatus);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(setCarriedBy);
|
|
|
|
PREP(setDefinedVariable);
|
|
|
|
PREP(setDisableUserInputStatus);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(setForceWalkStatus);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(setHearingCapability);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(setName);
|
|
|
|
PREP(setParameter);
|
|
|
|
PREP(setPitchBankYaw);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(setProne);
|
2015-01-30 21:56:45 +00:00
|
|
|
PREP(setSetting);
|
|
|
|
PREP(setSettingFromConfig);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(setVariableJIP);
|
|
|
|
PREP(setVariablePublic);
|
|
|
|
PREP(setVolume);
|
|
|
|
PREP(sortAlphabeticallyBy);
|
|
|
|
PREP(stringCompare);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(stringToColoredText);
|
2015-02-19 18:12:14 +00:00
|
|
|
PREP(stringRemoveWhiteSpace);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(subString);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(switchToGroupSide);
|
|
|
|
PREP(throttledPublicVariable);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(toBin);
|
|
|
|
PREP(toBitmask);
|
|
|
|
PREP(toHex);
|
|
|
|
PREP(toNumber);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(uniqueElementsOnly);
|
|
|
|
PREP(unloadPerson);
|
2015-01-12 04:27:21 +00:00
|
|
|
PREP(unmuteUnit);
|
2015-02-14 19:29:07 +00:00
|
|
|
PREP(useItem);
|
|
|
|
PREP(useMagazine);
|
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
|
|
|
|
2015-03-10 19:59:40 +00:00
|
|
|
PREP(dumpPerformanceCounters);
|
|
|
|
PREP(dumpArray);
|
|
|
|
|
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-03-10 19:59:40 +00:00
|
|
|
//Debug
|
|
|
|
ACE_COUNTERS = [];
|
|
|
|
|
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 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-03-23 15:16:50 +00:00
|
|
|
// Init toHex
|
|
|
|
[0] call FUNC(toHex);
|
|
|
|
|
2015-01-16 23:21:47 +00:00
|
|
|
ADDON = true;
|
2015-02-14 19:29:07 +00:00
|
|
|
|
|
|
|
isHC = !(hasInterface || isDedicated);
|