Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tools - Use HEMTT 1.13 #226

Merged
merged 13 commits into from
Sep 13, 2024
13 changes: 7 additions & 6 deletions .github/workflows/arma.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,21 @@ jobs:
- name: Check for BOM
uses: arma-actions/bom-check@master

lint:
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@master
- name: Lint (sqflint)
uses: arma-actions/sqflint@master
continue-on-error: true # No failure due to many false-positives
uses: actions/checkout@v4
- name: Setup HEMTT
uses: arma-actions/hemtt@v1
- name: Run HEMTT build
run: hemtt build

build:
runs-on: windows-2022
steps:
- name: Checkout the source code
uses: actions/checkout@master
uses: actions/checkout@v4
- name: Pull Arma3Tools
run: |
echo ${{ secrets.CR_PAT }} | docker login -u ${{ secrets.CR_USER }} --password-stdin ghcr.io
Expand Down
41 changes: 41 additions & 0 deletions .hemtt/launch.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[default]
workshop = [
"450814997", # CBA_A3
"2369477168", # ADT
]
parameters = [
"-name=dev",
"-window",
]

[ace]
extends = "default"
workshop = [
"463939057", # ACE
# "766491311", # KKA3 ACE Extension
]

[cup]
extends = "default"
workshop = [
"583496184", # CUP Terrains - Core
"583544987", # CUP Terrains - Maps
]

[vn]
extends = "default"
dlc = [
"S.O.G. Prairie Fire",
]

[ww2]
extends = "default"
dlc = [
"Spearhead 1944",
]

[gm]
extends = "default"
dlc = [
"Global Mobilization",
]
18 changes: 18 additions & 0 deletions .hemtt/lints.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[sqf.command_case]
severity = "Warning"
options.ignore = [
"AGLtoASL",
"ASLtoAGL",
"WEST",
"EAST",
"INDEPENDENT",
"RESISTANCE",
"CIVILIAN",
Comment on lines +6 to +10
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too bad those are not handled properly.

"getVehicleTiPars",
"setVehicleTiPars",
]

[sqf.banned_commands]
options.banned = [
"execVM",
]
48 changes: 0 additions & 48 deletions .hemtt/project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,51 +18,3 @@ author = "ArmaForces"

[version]
path = "addons/main/script_version.hpp"

# Unused in HEMTT v1.11 or higher, kept for backwards compatibility
[asc]
exclude = [
".inc.sqf",
]

[hemtt.launch.default]
workshop = [
"450814997", # CBA_A3
"2369477168", # ADT
]
parameters = [
"-name=dev",
"-window",
]

[hemtt.launch.ace]
extends = "default"
workshop = [
"463939057", # ACE
# "766491311", # KKA3 ACE Extension
]

[hemtt.launch.cup]
extends = "default"
workshop = [
"583496184", # CUP Terrains - Core
"583544987", # CUP Terrains - Maps
]

[hemtt.launch.vn]
extends = "default"
dlc = [
"S.O.G. Prairie Fire",
]

[hemtt.launch.ww2]
extends = "default"
dlc = [
"Spearhead 1944",
]

[hemtt.launch.gm]
extends = "default"
dlc = [
"Global Mobilization",
]
2 changes: 1 addition & 1 deletion addons/acre/functions/fnc_initChannelsNames.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ private _targetSide = [[_sourceSide], [WEST, EAST, INDEPENDENT, CIVILIAN]] selec

} forEach _targetSide;

INFO_1("Initialized %1 channel names.", str _targetSide);
INFO_1("Initialized %1 channel names.",str _targetSide);

nil
32 changes: 16 additions & 16 deletions addons/back_to_game/teleportDialog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,35 @@ class GVAR(teleportDialog) {
class controls {
class RscFrame_1058: RscFrame {
idc = 1800;
x = "0.402031 * safezoneW + safezoneX";
y = "0.357 * safezoneH + safezoneY";
w = "0.195937 * safezoneW";
h = "0.165 * safezoneH";
x = "0.402031 * safeZoneW + safeZoneX";
y = "0.357 * safeZoneH + safeZoneY";
w = "0.195937 * safeZoneW";
h = "0.165 * safeZoneH";
};
class TeleportText: RscText {
idc = 1000;
text = CSTRING(TeleportAsk);
x = "0.412344 * safezoneW + safezoneX";
y = "0.368 * safezoneH + safezoneY";
w = "0.180469 * safezoneW";
h = "0.055 * safezoneH";
x = "0.412344 * safeZoneW + safeZoneX";
y = "0.368 * safeZoneH + safeZoneY";
w = "0.180469 * safeZoneW";
h = "0.055 * safeZoneH";
};
class AgreeButton: RscButton {
idc = 1600;
text = CSTRING(TeleportAgree);
x = "0.407187 * safezoneW + safezoneX";
y = "0.445 * safezoneH + safezoneY";
w = "0.0670312 * safezoneW";
h = "0.066 * safezoneH";
x = "0.407187 * safeZoneW + safeZoneX";
y = "0.445 * safeZoneH + safeZoneY";
w = "0.0670312 * safeZoneW";
h = "0.066 * safeZoneH";
action = QUOTE(call FUNC(dialogConfirm); closeDialog 0);
};
class RejectButton: RscButton {
idc = 1601;
text = CSTRING(TeleportReject);
x = "0.525781 * safezoneW + safezoneX";
y = "0.445 * safezoneH + safezoneY";
w = "0.0670312 * safezoneW";
h = "0.066 * safezoneH";
x = "0.525781 * safeZoneW + safeZoneX";
y = "0.445 * safeZoneH + safeZoneY";
w = "0.0670312 * safeZoneW";
h = "0.066 * safeZoneH";
action = QUOTE(call FUNC(dialogReject); closeDialog 0);
};
};
Expand Down
8 changes: 4 additions & 4 deletions addons/common/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
#define POS_H(N) ((N) * GUI_GRID_H)

#define COLOR_BCG { \
"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.13])", \
"(profilenamespace getVariable ['GUI_BCG_RGB_G',0.54])", \
"(profilenamespace getVariable ['GUI_BCG_RGB_B',0.21])", \
"(profilenamespace getVariable ['GUI_BCG_RGB_A',0.8])" \
"(profileNamespace getVariable ['GUI_BCG_RGB_R',0.13])", \
"(profileNamespace getVariable ['GUI_BCG_RGB_G',0.54])", \
"(profileNamespace getVariable ['GUI_BCG_RGB_B',0.21])", \
"(profileNamespace getVariable ['GUI_BCG_RGB_A',0.8])" \
}

#define IDC_MODAL_TITLE_L 1000
Expand Down
2 changes: 1 addition & 1 deletion addons/curator/CfgEden.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Cfg3DEN {
tooltip = CSTRING(isZeus_Description);
property = QGVAR(isZeus);
control = "Checkbox";
expression = QUOTE(if (_value) then {ARR_2([{[_this] call FUNC(assignZeus)}, _this]) call CBA_fnc_execNextFrame});
expression = QUOTE(if (_value) then {ARR_2([{[_this] call FUNC(assignZeus)},_this]) call CBA_fnc_execNextFrame});
defaultValue = "false";
condition = "objectControllable";
};
Expand Down
2 changes: 1 addition & 1 deletion addons/curator/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ if (isServer) then {
params ["_unit"];
if !(isPlayer _unit) exitWith {};

INFO_1("Unassigning Zeus from '%1'", _unit);
INFO_1("Unassigning Zeus from '%1'",_unit);

private _curatorModule = getAssignedCuratorLogic _unit;
if (_curatorModule isEqualTo objNull) exitWith {};
Expand Down
2 changes: 1 addition & 1 deletion addons/debug_console/functions/fnc_initDebugConsole.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ private _basePositionRow2 = ctrlPosition (_display displayCtrl IDC_RSCDEBUGCONSO
// Create buttons in bottom row
{
_x params ["_text", "_tooltip", "_code"];
TRACE_3("adding debug console button", _text, _tooltip, _code);
TRACE_3("adding debug console button",_text,_tooltip,_code);


private _col = floor (_forEachIndex / ITEMS_PER_ROW);
Expand Down
6 changes: 3 additions & 3 deletions addons/extension_main_menu/XEH_mainDisplay.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
params ["_display"];
TRACE_1("Main display",_display);

_display displayaddeventhandler ["mouseMoving", {with uinamespace do {call FUNC(onLoad)}}];
_display displayaddeventhandler ["mouseHolding",{with uinamespace do {call FUNC(onLoad)}}];
_display displayaddeventhandler ["childDestroyed",{with uinamespace do {call FUNC(onUnload)}}];
_display displayAddEventHandler ["MouseMoving", {with uiNamespace do {call FUNC(onLoad)}}];
_display displayAddEventHandler ["MouseHolding",{with uiNamespace do {call FUNC(onLoad)}}];
_display displayAddEventHandler ["ChildDestroyed",{with uiNamespace do {call FUNC(onUnload)}}];

_display call FUNC(addServerStatusPanel);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ uiNamespace setVariable [QGVAR(serverStatus), true];

params ["_display"];

private _ctrlSpotlightMain = _display displayctrl IDC_MAIN_SPOTLIGHT_GROUP_1;
private _ctrlSpotlightMain = _display displayCtrl IDC_MAIN_SPOTLIGHT_GROUP_1;
TRACE_1("Adding server status text",_ctrlSpotlightMain);

// get dimensions from the center spotlight
Expand Down
12 changes: 6 additions & 6 deletions addons/loading/CfgLoadingScreen.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,29 @@

class GVAR(CfgLoadingScreen) {
class Backgrounds {
LOADING_SCREEN_CLASS(cup_0,ARR_2(Norek, WINDOWS_95_SE));
LOADING_SCREEN_CLASS(cup_0,ARR_2(Norek,WINDOWS_95_SE));
LOADING_SCREEN_CLASS(gm_0,Mikkeboss);
LOADING_SCREEN_CLASS(ifa_0,Mikkeboss);
LOADING_SCREEN_CLASS(ifa_1,Krystol);
LOADING_SCREEN_CLASS(ifa_2,veteran29);
LOADING_SCREEN_CLASS(ifa_3,ARR_2(Krystol, WINDOWS_95_SE));
LOADING_SCREEN_CLASS(ifa_3,ARR_2(Krystol,WINDOWS_95_SE));
LOADING_SCREEN_CLASS(rhs_0,Monk[e]y);
LOADING_SCREEN_CLASS(rhs_1,ARR_2(Mikkeboss, JurijPietrowicz));
LOADING_SCREEN_CLASS(rhs_1,ARR_2(Mikkeboss,JurijPietrowicz));
LOADING_SCREEN_CLASS(rhs_2,Mikkeboss);
LOADING_SCREEN_CLASS(rhs_3,Monk[e]y);
LOADING_SCREEN_CLASS(rhs_4,ARR_2(Norek, Nomus));
LOADING_SCREEN_CLASS(rhs_4,ARR_2(Norek,Nomus));
LOADING_SCREEN_CLASS(rhs_5,Bolec);
LOADING_SCREEN_CLASS(rhs_6,Bolec);
LOADING_SCREEN_CLASS(rhs_7,Renchon);
LOADING_SCREEN_CLASS(rhs_8,Hyperion);
LOADING_SCREEN_CLASS(serialkillers_0,ARR_2(Renchon, Bene));
LOADING_SCREEN_CLASS(serialkillers_0,ARR_2(Renchon,Bene));
LOADING_SCREEN_CLASS(vanilla_0,Monk[e]y);
LOADING_SCREEN_CLASS(other_0,Monk[e]y);
LOADING_SCREEN_CLASS(other_1,Monk[e]y);
LOADING_SCREEN_CLASS(unsung_0,WINDOWS_95_SE);
LOADING_SCREEN_CLASS(unsung_1,3Mydlo3);
LOADING_SCREEN_CLASS(postapo_0,Monk[e]y);
LOADING_SCREEN_CLASS(bunny,Jabar);
LOADING_SCREEN_CLASS(mirko,ARR_2(Bolec, WINDOWS_95_SE));
LOADING_SCREEN_CLASS(mirko,ARR_2(Bolec,WINDOWS_95_SE));
};
};
8 changes: 4 additions & 4 deletions addons/loading/XEH_loadingDisplay.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ private _height = 256 * pixelH;

private _picture = _display ctrlCreate ["RscPicture", -1];
_picture ctrlSetPosition [
safezoneX,
safezoneY + safeZoneH - _height,
safeZoneX,
safeZoneY + safeZoneH - _height,
_width, _height
];

Expand All @@ -45,7 +45,7 @@ switch (_month) do {
};
_picture ctrlCommit 0;

private _ctrlBg = _display displayctrl IDC_LOADINGSTART_CUSTOM_BG;
private _ctrlBg = _display displayCtrl IDC_LOADINGSTART_CUSTOM_BG;
private _backgroundCfg = uiNamespace getVariable [QGVAR(backgroundCfg), configNull];
if (isNull _backgroundCfg) then {
if (_month == _easterMonth && {selectRandom [true, false]}) then {
Expand All @@ -60,7 +60,7 @@ if (isNull _backgroundCfg) then {
_ctrlBg ctrlSetText getText (_backgroundCfg >> "path");
_ctrlBg ctrlCommit 0;

private _ctrlGrpLoadingStart = _display displayctrl IDC_LOADINGSTART_LOADINGSTART;
private _ctrlGrpLoadingStart = _display displayCtrl IDC_LOADINGSTART_LOADINGSTART;
private _loadingLabel = _display ctrlCreate ["RscStructuredText", -1, _ctrlGrpLoadingStart];
_loadingLabel ctrlSetPosition [0, 0, 1, 1];
_loadingLabel ctrlSetStructuredText parseText ([
Expand Down
8 changes: 4 additions & 4 deletions addons/loading/gui.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ class RscPictureKeepAspect;
class GVAR(background): RscPictureKeepAspect { \
idc = IDC_LOADINGSTART_CUSTOM_BG; \
x = 0; \
y = "-(0.5 * safezoneH)"; \
w = "safezoneW"; \
h = "2 * safezoneH"; \
y = "-(0.5 * safeZoneH)"; \
w = "safeZoneW"; \
h = "2 * safeZoneH"; \
}; \
class Noise; \
class GVAR(lines): Noise {}; \
Expand All @@ -28,7 +28,7 @@ class RscPictureKeepAspect;
}; \
class GVAR(logo): Logo { \
idc = -1; \
y = "0 * safezoneH"; \
y = "0 * safeZoneH"; \
}; \
}; \
}; \
Expand Down
4 changes: 2 additions & 2 deletions addons/main_menu/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ class Extended_PostInit_EventHandlers {
class Extended_DisplayLoad_EventHandlers {
class RscDisplayRemoteMissions {
ADDON = QUOTE(with uiNamespace do {\
ARR_2([_this select 0, 'RscDisplayRemoteMissions']) call COMPILE_SCRIPT(XEH_multiplayerDisplay);\
ARR_2([_this select 0,'RscDisplayRemoteMissions']) call COMPILE_SCRIPT(XEH_multiplayerDisplay);\
});
};
class RscDisplayMultiplayerSetup {
ADDON = QUOTE(with uiNamespace do {\
ARR_2([_this select 0, 'RscDisplayMultiplayerSetup']) call COMPILE_SCRIPT(XEH_multiplayerDisplay);\
ARR_2([_this select 0,'RscDisplayMultiplayerSetup']) call COMPILE_SCRIPT(XEH_multiplayerDisplay);\
});
};
};
2 changes: 1 addition & 1 deletion addons/main_menu/RscDisplayClient.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class RscDisplayClient: RscStandardDisplay {
class GVAR(serverStatus): RscControlsGroupNoScrollbars {
onLoad = QUOTE(with uiNamespace do {call FUNC(serverStatusOnLoad)});

x = QUOTE(safezoneX + POS_W(1));
x = QUOTE(safeZoneX + POS_W(1));
y = QUOTE(safeZoneY + 3.5 * POS_H(1));
w = QUOTE(POS_W(SERVER_STATUS_W));
h = QUOTE(POS_H(SERVER_STATUS_H));
Expand Down
2 changes: 1 addition & 1 deletion addons/main_menu/functions/fnc_join.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ GVAR(serverPort) = "2302";
GVAR(joinTimeout) = diag_tickTime + 5;

// "Click" server browser from main menu
ctrlActivate ((ctrlParent _button) displayctrl IDC_MAIN_MULTIPLAYER);
ctrlActivate ((ctrlParent _button) displayCtrl IDC_MAIN_MULTIPLAYER);

onEachFrame {
onEachFrame {
Expand Down
Loading
Loading