Skip to content

Commit

Permalink
Update for HEMTT 1.13 (#774)
Browse files Browse the repository at this point in the history
  • Loading branch information
mharis001 authored Sep 12, 2024
1 parent 86e5024 commit 5d07194
Show file tree
Hide file tree
Showing 41 changed files with 70 additions and 68 deletions.
11 changes: 11 additions & 0 deletions .hemtt/launch.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[default]
mission = "test.VR"
workshop = [
"450814997", # CBA_A3
]

[ace]
extends = "default"
workshop = [
"463939057", # ACE3
]
4 changes: 4 additions & 0 deletions .hemtt/lints.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[sqf.banned_commands]
options.ignore = [
"addPublicVariableEventHandler", # Alt syntax is broken, we are using main syntax
]
2 changes: 1 addition & 1 deletion .hemtt/missions/test.VR/mission.sqm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class EditorData
};
};
binarizationWanted=0;
sourceName="new_test";
sourceName="test";
addons[]=
{
"A3_Characters_F",
Expand Down
13 changes: 0 additions & 13 deletions .hemtt/project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,3 @@ include = [

[version]
git_hash = 0

[hemtt.launch.default]
workshop = [
"450814997", # CBA_A3
]
mission = "test.VR"

[hemtt.launch.ace]
workshop = [
"450814997", # CBA_A3
"463939057", # ACE3
]
mission = "test.VR"
2 changes: 1 addition & 1 deletion addons/ai/functions/fnc_garrison.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ private _fnc_moveUnit = {
params ["_unit", "_position"];

if (surfaceIsWater _position) then {
_unit setPosASL AGLtoASL _position;
_unit setPosASL AGLToASL _position;
} else {
_unit setPosATL _position;
};
Expand Down
2 changes: 1 addition & 1 deletion addons/ai/functions/fnc_handleObjectEdited.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ params ["", "_object"];

// Handle rotating garrisoned units
if (_object getVariable [QGVAR(garrisoned), false]) then {
private _direction = (ASLtoAGL eyePos _object) vectorAdd (vectorDir _object);
private _direction = (ASLToAGL eyePos _object) vectorAdd (vectorDir _object);
[QEGVAR(common,doWatch), [_object, _direction], _object] call CBA_fnc_targetEvent;
};
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ params ["", "_object"];
private _parentObject = attachedTo _object;

if (!isNull _parentObject && {isVehicleCargo _object != _parentObject}) then {
private _offset = _parentObject worldToModel ASLtoAGL getPosWorld _object;
private _offset = _parentObject worldToModel ASLToAGL getPosWorld _object;
private _dirAndUp = [vectorDir _object, vectorUp _object] apply {_parentObject vectorWorldToModel _x};

// setVectorDirAndUp requires local argument but applying the rotation on a remote object
Expand Down
2 changes: 1 addition & 1 deletion addons/attributes/functions/fnc_gui_code.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ _controlsGroup setVariable [QFUNC(onConfirm), {
profileNamespace setVariable [_modeVarName, _mode];

// Do not save empty strings and strings that are longer that the maximum number of characters
if (_text == "" || {_maxCharacters > 0 && {count _text > _maxCharacters}}) exitwith {};
if (_text == "" || {_maxCharacters > 0 && {count _text > _maxCharacters}}) exitWith {};

private _history = profileNamespace getVariable [_historyVarName, []];
_history deleteAt (_history find _text);
Expand Down
2 changes: 1 addition & 1 deletion addons/attributes/initAttributes.inc.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@
QGVAR(edit),
nil,
{_entity setGroupIdGlobal [_value]},
{groupID _entity},
{groupId _entity},
{GVAR(enableGroupID)}
] call FUNC(addAttribute);

Expand Down
2 changes: 1 addition & 1 deletion addons/common/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@

[QGVAR(addWeaponItem), {
params ["_unit", "_weapon", "_item"];
_unit addweaponItem [_weapon, _item];
_unit addWeaponItem [_weapon, _item];
}] call CBA_fnc_addEventHandler;

[QGVAR(setDate), {setDate _this}] call CBA_fnc_addEventHandler;
Expand Down
2 changes: 1 addition & 1 deletion addons/common/functions/fnc_deserializeObjects.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ private _fnc_deserializeVehicle = {
_x params ["_magazine", "_turretPath", "_ammoCount"];

private _pylonIndex = _forEachIndex + 1;
_vehicle setPylonLoadOut [_pylonIndex, _magazine, false, _turretPath];
_vehicle setPylonLoadout [_pylonIndex, _magazine, false, _turretPath];
_vehicle setAmmoOnPylon [_pylonIndex, _ammoCount];
} forEach _pylonMagazines;

Expand Down
4 changes: 2 additions & 2 deletions addons/common/functions/fnc_exportMissionSQF.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ private _fnc_processGroup = {
_outputGroups2 pushBack ["_waypoint = %1 addWaypoint [[0, 0, 0], -1];", _varName];
};

_outputGroups2 pushBack ["_waypoint setWaypointPosition [%1, -1];", AGLtoASL waypointPosition _x];
_outputGroups2 pushBack ["_waypoint setWaypointPosition [%1, -1];", AGLToASL waypointPosition _x];
_outputGroups2 pushBack ["_waypoint setWaypointType %1;", str waypointType _x];
_outputGroups2 pushBack ["_waypoint setWaypointName %1;", str waypointName _x];
_outputGroups2 pushBack ["_waypoint setWaypointDescription %1;", str waypointDescription _x];
Expand Down Expand Up @@ -171,7 +171,7 @@ private _fnc_processAttachedObjects = {
if (isNil "_index") exitWith {};

private _varName = FORMAT_OBJ_VAR(_index);
private _offset = _object worldToModel ASLtoAGL getPosWorld _x;
private _offset = _object worldToModel ASLToAGL getPosWorld _x;
private _dirAndUp = [_object vectorWorldToModel vectorDir _x, _object vectorWorldToModel vectorUp _x];

_outputAttach pushBack ["%1 attachTo [%2, %3];", _varName, _parentVarName, _offset];
Expand Down
2 changes: 1 addition & 1 deletion addons/common/functions/fnc_fireArtillery.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if (_unit call EFUNC(common,isVLS)) exitWith {
};

if (_position isEqualType objNull) then {
_position = ASLtoAGL getPosASL _position;
_position = ASLToAGL getPosASL _position;
};

if (_position isEqualType "") then {
Expand Down
6 changes: 3 additions & 3 deletions addons/common/functions/fnc_getArtilleryETA.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@
params [["_vehicle", objNull, [objNull]], ["_position", [0, 0, 0], [[], objNull, ""], 3], ["_magazine", "", [""]]];

if (_position isEqualType objNull) then {
_position = ASLtoAGL getPosASL _position;
_position = ASLToAGL getPosASL _position;
};

if (_position isEqualType "") then {
_position = [_position, true] call CBA_fnc_mapGridToPos;
};

if (_vehicle call FUNC(isVLS)) then {
private _missileType = getText (configfile >> "CfgMagazines" >> _magazine >> "ammo");
private _maxSpeed = getNumber (configfile >> "CfgAmmo" >> _missileType >> "maxSpeed");
private _missileType = getText (configFile >> "CfgMagazines" >> _magazine >> "ammo");
private _maxSpeed = getNumber (configFile >> "CfgAmmo" >> _missileType >> "maxSpeed");

ACCELERATION_TIME + (((_vehicle distance _position) - ACCELERATION_DISTANCE) max 0) / (SPEED_COEFFICIENT * _maxSpeed)
} else {
Expand Down
4 changes: 2 additions & 2 deletions addons/common/functions/fnc_initOwnersControl.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ private _fnc_updateGroupList = {
lbClear _ctrlList;

{
if (units _x findIf {isPlayer _x} != -1 && {_filter in toLower groupID _x}) then {
private _index = _ctrlList lbAdd groupID _x;
if (units _x findIf {isPlayer _x} != -1 && {_filter in toLower groupId _x}) then {
private _index = _ctrlList lbAdd groupId _x;
_ctrlList lbSetPicture [_index, [ICON_UNCHECKED, ICON_CHECKED] select (_x in _groups)];
_ctrlList lbSetPictureRight [_index, [_x] call EFUNC(common,getSideIcon)];

Expand Down
4 changes: 2 additions & 2 deletions addons/common/functions/fnc_selectPosition.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,11 @@ private _drawEH = [_ctrlMap, "Draw", {
_text = localize _text;
};

_position = ASLtoAGL _position;
_position = ASLToAGL _position;

drawIcon3D [_icon, _color, _position, 1.5, 1.5, _angle, _text];

{
drawLine3D [ASLtoAGL getPosASLVisual _x, _position, _color];
drawLine3D [ASLToAGL getPosASLVisual _x, _position, _color];
} forEach TO_ARRAY(_objects);
}, 0, [_objects, _function, _args, _visuals, _modifierFunction, _mouseEH, _keyboardEH, _drawEH]] call CBA_fnc_addPerFrameHandler;
6 changes: 3 additions & 3 deletions addons/common/functions/fnc_serializeObjects.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ private _fnc_serializeUnit = {
params ["_unit"];

private _type = typeOf _unit;
private _position = ASLtoAGL getPosASL _unit vectorDiff _centerPos;
private _position = ASLToAGL getPosASL _unit vectorDiff _centerPos;
private _direction = getDir _unit;

private _group = _unit call _fnc_serializeGroup;
Expand All @@ -113,7 +113,7 @@ private _fnc_serializeVehicle = {
params ["_vehicle"];

private _type = typeOf _vehicle;
private _position = ASLtoAGL getPosASL _vehicle vectorDiff _centerPos;
private _position = ASLToAGL getPosASL _vehicle vectorDiff _centerPos;
private _direction = [vectorDir _vehicle, vectorUp _vehicle];

private _fuel = fuel _vehicle;
Expand Down Expand Up @@ -176,7 +176,7 @@ private _fnc_serializeStatic = {
params ["_object"];

private _type = typeOf _object;
private _position = ASLtoAGL getPosASL _object vectorDiff _centerPos;
private _position = ASLToAGL getPosASL _object vectorDiff _centerPos;
private _direction = [vectorDir _object, vectorUp _object];

private _simulationEnabled = simulationEnabled _object;
Expand Down
2 changes: 1 addition & 1 deletion addons/compat_ace/functions/fnc_waypointFastrope.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ private _endPos = +_waypointPosition;
// Using the waypointPosition command to get the height of the waypoint
// since the position provided to the waypoint script always has a height of zero
_endPos set [2, FASTROPE_HEIGHT + (waypointPosition _waypoint select 2)];
_endPos = AGLtoASL _endPos;
_endPos = AGLToASL _endPos;

private _initialVelocity = velocity _vehicle;
private _vectorDir = vectorDir _vehicle;
Expand Down
6 changes: 3 additions & 3 deletions addons/context_actions/functions/fnc_selectArtilleryPos.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ private _vehicles = _objects select {
!isNull gunner _x && {_args in getArtilleryAmmo [_x]}
};

if (_vehicles isEqualTo []) exitwith {};
if (_vehicles isEqualTo []) exitWith {};

private _modifierFunction = {
params ["_vehicles", "_position", "_magazine", "_visuals"];

if (ASLtoAGL _position inRangeOfArtillery [_vehicles, _magazine]) then {
if (ASLToAGL _position inRangeOfArtillery [_vehicles, _magazine]) then {
_visuals set [0, LSTRING(FireArtillery)];
_visuals set [3, COLOR_IN_RANGE];
} else {
Expand All @@ -41,7 +41,7 @@ private _modifierFunction = {

if (!_successful) exitWith {};

_position = ASLtoAGL _position;
_position = ASLToAGL _position;

if (_position inRangeOfArtillery [_vehicles, _magazine]) then {
{
Expand Down
2 changes: 1 addition & 1 deletion addons/context_actions/functions/fnc_teleportPlayers.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ private _players = _this select {isPlayer _x};
// setVehiclePosition places units on surface directly below position
// Sometimes this will be the second surface below the selected position
// Adding a small vertical offset allows units to be teleported consistently onto surfaces such as rooftops
_position = ASLtoATL _position vectorAdd [0, 0, 0.1];
_position = ASLToATL _position vectorAdd [0, 0, 0.1];

{
_x setVehiclePosition [_position, [], 0, "NONE"];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
params ["_mode", "_position", "_radius"];

private _curator = getAssignedCuratorLogic player;
private _objects = nearestObjects [ASLtoAGL _position, ["All"], _radius, true];
private _objects = nearestObjects [ASLToAGL _position, ["All"], _radius, true];
[_objects, _mode, _curator] call EFUNC(common,updateEditableObjects);
4 changes: 2 additions & 2 deletions addons/context_menu/functions/fnc_createContextGroup.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ private _groupPosition = if (isNull _parentRow) then {

// Apply a one pixel right, one pixel down offset so an option is not selected by default
_posX = safeZoneX + SPACING_W max (_posX + pixelW min (safeZoneX + safeZoneW - _posW - SPACING_W));
_posY = safeZoneY + SPACING_H max (_posY + pixelH min (safeZoneY + safezoneH - _posH - SPACING_H));
_posY = safeZoneY + SPACING_H max (_posY + pixelH min (safeZoneY + safeZoneH - _posH - SPACING_H));

[_posX, _posY, _posW, _posH]
} else {
Expand All @@ -177,7 +177,7 @@ private _groupPosition = if (isNull _parentRow) then {
_posX + _parentWidth + SPACING_W;
};

_posY = safeZoneY + SPACING_H max (_posY min (safeZoneY + safezoneH - _posH - SPACING_H));
_posY = safeZoneY + SPACING_H max (_posY min (safeZoneY + safeZoneH - _posH - SPACING_H));

[_posX, _posY, _posW, _posH]
};
Expand Down
4 changes: 2 additions & 2 deletions addons/doors/functions/fnc_getActions.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

// Check if the cursor is hovering over a building's door by checking intersections from the camera
private _begPos = getPosASL curatorCamera;
private _endPos = AGLtoASL screenToWorld getMousePosition;
private _endPos = AGLToASL screenToWorld getMousePosition;

// Limit the intersection scan distance to prevent interaction with far away buildings
// Also improves performance of intersection test which can be expensive at long distances
Expand All @@ -45,7 +45,7 @@ if (_doors isEqualTo []) exitWith {
};

// Calculate the distance from every door to the intersection position
private _buildingPos = _building worldToModel ASLtoAGL _intersectPos;
private _buildingPos = _building worldToModel ASLToAGL _intersectPos;
private _distances = _doors apply {_x vectorDistance _buildingPos};

// Exit if the closest door is too far away from the intersection position
Expand Down
2 changes: 1 addition & 1 deletion addons/editor/functions/fnc_handleKeyDown.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ if (_keyCode in actionKeys "curatorPingView" && {!isNil QGVAR(pingTarget)} && {i
curatorCamera setPosASL getPosASL _this;
curatorCamera setVectorDirAndUp [vectorDir _this, vectorUp _this];

_this cameraeffect ["Terminate", "BACK"];
_this cameraEffect ["Terminate", "BACK"];
curatorCamera cameraEffect ["Internal", "BACK"];
cameraEffectEnableHUD true;
camDestroy _this;
Expand Down
2 changes: 1 addition & 1 deletion addons/garage/functions/fnc_openGarage.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ if (SELECTED_OBJECTS findIf {_x != _vehicle && {typeOf _x == _vehicleType}} == -
GVAR(camHelper) = "Logic" createVehicleLocal [0, 0, 0];
GVAR(camHelper) attachTo [_vehicle, GVAR(helperPos)];

GVAR(camera) = "camera" camCreate ASLtoAGL getPosASL _vehicle;
GVAR(camera) = "camera" camCreate ASLToAGL getPosASL _vehicle;
GVAR(camera) cameraEffect ["internal", "back"];
GVAR(camera) camPrepareFocus [-1, -1];
GVAR(camera) camPrepareFov 0.35;
Expand Down
4 changes: 2 additions & 2 deletions addons/modules/functions/fnc_bi_moduleCurator.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ if (_activated) then {
// Add radio channels
{
_x radioChannelAdd [_player];
} forEach (_logic getvariable ["channels", []]);
} forEach (_logic getVariable ["channels", []]);

// Send a notification to all assigned players
[{
Expand Down Expand Up @@ -310,7 +310,7 @@ if (_activated) then {
}
}, {
[true, true] spawn BIS_fnc_forceCuratorInterface;
("RscDisplayCurator" call BIS_fnc_rscLayer) cuttext ["", "BLACK IN", 1e10];
("RscDisplayCurator" call BIS_fnc_rscLayer) cutText ["", "BLACK IN", 1e10];
}] call CBA_fnc_waitUntilAndExecute;
};
};
Expand Down
2 changes: 1 addition & 1 deletion addons/modules/functions/fnc_gui_editableObjects.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ params ["_display", "_logic"];
private _selections = GVAR(saved) getVariable [QGVAR(editableObjects), [1, 1, 0, 100, [true, true, true, true]]];
_selections params ["_editingMode", "_curators", "_rangeMode", "_range", "_filter"];

_display setVariable [QGVAR(position), ASLtoAGL getPosASL _logic];
_display setVariable [QGVAR(position), ASLToAGL getPosASL _logic];
deleteVehicle _logic;

private _ctrlEditingMode = _display displayCtrl IDC_EDITABLEOBJECTS_MODE;
Expand Down
6 changes: 3 additions & 3 deletions addons/modules/functions/fnc_gui_spawnReinforcements.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ params ["_display", "_logic"];
private _selections = GVAR(saved) getVariable [QGVAR(spawnReinforcements), [0, 0, 0, 0, 0, [], -3, 1, 0, 100, -3, 0]];
_selections params ["_side", "_faction", "_category", "_vehicle", "_treeMode", "_unitList", "_vehicleLZ", "_vehicleBehaviour", "_insertionMethodIndex", "_flyHeight", "_unitRP", "_unitBehaviour"];

private _position = ASLtoAGL getPosASL _logic;
private _position = ASLToAGL getPosASL _logic;
_display setVariable [QGVAR(position), _position];
deleteVehicle _logic;

Expand Down Expand Up @@ -472,11 +472,11 @@ private _fnc_onConfirm = {
private _positionLZ = [LOGIC_TYPE_LZ, _vehicleLZ, _position] call EFUNC(position_logics,select);
private _positionRP = [LOGIC_TYPE_RP, _unitRP, _position] call EFUNC(position_logics,select);

_positionLZ = ASLtoAGL getPosASL _positionLZ;
_positionLZ = ASLToAGL getPosASL _positionLZ;

// Handle none option for RP
if (!isNull _positionRP) then {
_positionRP = ASLtoAGL getPosASL _positionRP;
_positionRP = ASLToAGL getPosASL _positionRP;
};

[QGVAR(moduleSpawnReinforcements), [_vehicle, _unitList, _position, _positionLZ, _positionRP, _vehicleBehaviour > 0, _insertionMethod, _unitBehaviour, _flyHeight]] call CBA_fnc_serverEvent;
Expand Down
2 changes: 1 addition & 1 deletion addons/modules/functions/fnc_moduleCreateMinefield.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,6 @@ _minesCache params ["_configNames", "_displayNames"];

// Add created mines to editable objects
[_mines] call EFUNC(common,updateEditableObjects);
}, {}, ASLtoAGL getPosASL _logic] call EFUNC(dialog,create);
}, {}, ASLToAGL getPosASL _logic] call EFUNC(dialog,create);

deleteVehicle _logic;
2 changes: 1 addition & 1 deletion addons/modules/functions/fnc_moduleGarrison.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ if (isPlayer _unit) exitWith {
params ["_dialogValues", "_unit"];
_dialogValues params ["_radius", "_fillMode", "_topDown"];

[units _unit, ASLtoAGL getPosASL _unit, _radius, _fillMode, _topDown] call EFUNC(ai,garrison);
[units _unit, ASLToAGL getPosASL _unit, _radius, _fillMode, _topDown] call EFUNC(ai,garrison);
}, {}, _unit] call EFUNC(dialog,create);
2 changes: 1 addition & 1 deletion addons/modules/functions/fnc_moduleNuke.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ deleteVehicle _logic;
[
"SLIDER:RADIUS",
LSTRING(DestructionRadius),
[0, 5000, 200, 0, ASLtoAGL _position, [1, 0, 0, 0.7]]
[0, 5000, 200, 0, ASLToAGL _position, [1, 0, 0, 0.7]]
],
[
"EDIT",
Expand Down
2 changes: 1 addition & 1 deletion addons/modules/functions/fnc_moduleNukeLocal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ params ["_position", "_destructionRadius", "_destructionRate", "_colorCorrection

// Destruction effects, only handled on the server
if (isServer && {_destructionRadius > 0} && {_destructionRate > 0}) then {
private _objects = nearestObjects [ASLtoAGL _position, [], _destructionRadius] select {
private _objects = nearestObjects [ASLToAGL _position, [], _destructionRadius] select {
isDamageAllowed _x && {!(_x isKindOf "Logic")} && {!(_x isKindOf "VirtualMan_F")}
};

Expand Down
2 changes: 1 addition & 1 deletion addons/modules/functions/fnc_moduleSearchBuilding.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if (isPlayer _unit) exitWith {

if (!_successful) exitWith {};

private _building = nearestObject [ASLtoAGL _position, "Building"];
private _building = nearestObject [ASLToAGL _position, "Building"];

if (isNull _building) exitWith {
[LSTRING(NoBuildingFound)] call EFUNC(common,showMessage);
Expand Down
Loading

0 comments on commit 5d07194

Please sign in to comment.