Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/arma-tools-build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Arma Tools Build
name: Lint
# Controls when the action will run. Triggers the workflow on pull request
# events but only for the master branch
on:
Expand All @@ -13,7 +13,7 @@ jobs:
- name: Checkout the source code
uses: actions/checkout@master
- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
- name: Validate SQF
run: python3 tools/sqf_validator.py
- name: Check config style
Expand Down
42 changes: 17 additions & 25 deletions .github/workflows/build_pbo.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,18 @@
name: Build addon
on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev
name: Build

on: [push]

jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
name: Checkout repository
- name: Building pbos
run: ./Build.exe
- uses: actions/upload-artifact@v2
name: Upload artifacts
with:
name: build
path: |
addons/*.pbo
mod.cpp
README.md
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup HEMTT
uses: arma-actions/hemtt@v1
- name: Run HEMTT build
run: hemtt release
- name: Upload Release
uses: actions/upload-artifact@v4
with:
name: tmf
path: releases/tmf-latest.zip
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
/addons/*.pbo
.vscode/*
.hemttout/*
releases
8 changes: 0 additions & 8 deletions .hemtt/base.toml

This file was deleted.

25 changes: 25 additions & 0 deletions .hemtt/lints.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[sqf.banned_commands]
options.ignore = [
"addPublicVariableEventHandler", # Alt syntax is broken, we are using main syntax
"createSoundSource", # Greatly attenuated when in first person and in a vehicle
"getPersonUsedDLCs", # Only used for editor testing
]

[sqf.var_all_caps]
options.ignore = [
"SLX_*", "ACE_*"
]

[sqf.undefined]
enabled = true
options.check_orphan_code = true

[sqf.unused]
#enabled = true #many false positives without DEBUG_MODE_FULL
options.check_params = false

[sqf.shadowed]
enabled = false

[sqf.not_private]
enabled = true
4 changes: 4 additions & 0 deletions .hemtt/project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name = "TMF"
prefix = "tmf"
[version]
path = "addons/main/script_mod.hpp"
1 change: 0 additions & 1 deletion .hemtt/template
Submodule template deleted from 82ea24
20 changes: 20 additions & 0 deletions .vscode/sqfvm-lsp/ls-ignore.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
################################################################
### This file contains a list of paths to ignore changes of. ###
### The paths are relative to the workspace root. ###
### The paths are separated by newlines. ###
### Note that this is not behaving like a .gitignore file, ###
### and you cannot invert some paths by prefixing them with ###
### a ! or use wildcards. ###
### Any subfolder of a path is also ignored. ###
### Important: No leading or trailing whitespace is allowed ###
### on any line. ###
### Changing anything in this file will have no effect until ###
### the language server is restarted. ###
### Keep in mind that already analyzed files will not be ###
### re-analyzed OR removed from the database. ###
################################################################
.vscode\sqfvm-lsp
.vscode
.github
.git
.hemtt
File renamed without changes.
2 changes: 1 addition & 1 deletion addons/acre2/XEH_preInit.sqf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "script_component.hpp"

#include "XEH_PREP.sqf"
#include "XEH_PREP.hpp"

GVAR(showSpectatorRadios) = false;
2 changes: 1 addition & 1 deletion addons/acre2/XEH_preStart.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#include "script_component.hpp"

#include "XEH_PREP.sqf"
#include "XEH_PREP.hpp"
5 changes: 5 additions & 0 deletions addons/acre2/addon.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[rapify]
enabled = false # Default: true
exclude = [
"Cfg3DEN.hpp"
]
2 changes: 1 addition & 1 deletion addons/acre2/ui_scripts/BabelSettings.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//with uiNameSpace do { RadioChannels_script = compile preprocessFileLineNumbers "RadioChannels.sqf"; }; with uiNameSpace do { BabelSettings_script = compile preprocessFileLineNumbers "BabelSettings.sqf"; };
params ["_mode",["_params",[]]];

#include "\a3\3den\UI\dikCodes.inc"
#include "\a3\ui_f\hpp\defineDIKCodes.inc"
//ret = (get3DENSelected "Object" select 0) set3DENAttribute ["TMF_Channellist","1"];
//set3DENAttributes [[get3DENSelected "Object","TMF_Channelset",[1,2,3]]];

Expand Down Expand Up @@ -85,8 +85,8 @@
_ctrlGroup = _params select 0;
BabelSettings_ctrlGroup = _ctrlGroup;

_ctrlGroup ctrladdeventhandler ["setfocus",{with uinamespace do {BabelSettings_ctrlGroup = _this select 0;};}];

Check notice on line 88 in addons/acre2/ui_scripts/BabelSettings.sqf

View workflow job for this annotation

GitHub Actions / build

`ctrladdeventhandler` does not match the wiki's case

non-standard command case

Check notice on line 88 in addons/acre2/ui_scripts/BabelSettings.sqf

View workflow job for this annotation

GitHub Actions / build

`uinamespace` does not match the wiki's case

non-standard command case

Check warning on line 88 in addons/acre2/ui_scripts/BabelSettings.sqf

View workflow job for this annotation

GitHub Actions / build

Using `ctrladdeventhandler` with unknown event `setfocus`

unknown event `setfocus`

Check warning on line 88 in addons/acre2/ui_scripts/BabelSettings.sqf

View workflow job for this annotation

GitHub Actions / build

Using `ctrladdeventhandler` with unknown event `setfocus`

unknown event `setfocus`

Check warning on line 88 in addons/acre2/ui_scripts/BabelSettings.sqf

View workflow job for this annotation

GitHub Actions / build

Using `ctrladdeventhandler` with unknown event `setfocus`

unknown event `setfocus`
_ctrlGroup ctrladdeventhandler ["killfocus",{with uinamespace do {BabelSettings_ctrlGroup = nil;};}];

Check notice on line 89 in addons/acre2/ui_scripts/BabelSettings.sqf

View workflow job for this annotation

GitHub Actions / build

`ctrladdeventhandler` does not match the wiki's case

non-standard command case

Check warning on line 89 in addons/acre2/ui_scripts/BabelSettings.sqf

View workflow job for this annotation

GitHub Actions / build

Using `ctrladdeventhandler` with unknown event `killfocus`

unknown event `killfocus`

Check warning on line 89 in addons/acre2/ui_scripts/BabelSettings.sqf

View workflow job for this annotation

GitHub Actions / build

Using `ctrladdeventhandler` with unknown event `killfocus`

unknown event `killfocus`

Check warning on line 89 in addons/acre2/ui_scripts/BabelSettings.sqf

View workflow job for this annotation

GitHub Actions / build

Using `ctrladdeventhandler` with unknown event `killfocus`

unknown event `killfocus`


{
Expand Down
2 changes: 1 addition & 1 deletion addons/acre2/ui_scripts/RadioChannels.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

params ["_mode",["_params",[]]];

#include "\a3\3den\UI\dikCodes.inc"
#include "\a3\ui_f\hpp\defineDIKCodes.inc"

// with uiNamespace do { set3DENMissionAttributes [["teamworkMissionAcreAttributes","TMF_AcreSettings",str RadioChannelArray]]; };
// with uiNamespace do { set3DENMissionAttributes [["teamworkMissionAcreAttributes","TMF_AcreSettings","[]"]]; };
Expand Down Expand Up @@ -208,8 +208,8 @@
_ctrlGroup = _params select 0;
RadioChannels_ctrlGroup = _ctrlGroup;

_ctrlGroup ctrladdeventhandler ["setfocus",{with uinamespace do {RadioChannels_ctrlGroup = _this select 0;};}];

Check warning on line 211 in addons/acre2/ui_scripts/RadioChannels.sqf

View workflow job for this annotation

GitHub Actions / build

Using `ctrladdeventhandler` with unknown event `setfocus`

unknown event `setfocus`

Check warning on line 211 in addons/acre2/ui_scripts/RadioChannels.sqf

View workflow job for this annotation

GitHub Actions / build

Using `ctrladdeventhandler` with unknown event `setfocus`

unknown event `setfocus`
_ctrlGroup ctrladdeventhandler ["killfocus",{with uinamespace do {RadioChannels_ctrlGroup = nil;};}];

Check warning on line 212 in addons/acre2/ui_scripts/RadioChannels.sqf

View workflow job for this annotation

GitHub Actions / build

Using `ctrladdeventhandler` with unknown event `killfocus`

unknown event `killfocus`



Expand All @@ -218,7 +218,7 @@

//Tree EH for keyboard number presses
_ctrlTree = _ctrlGroup controlsGroupCtrl 189438;
_ctrlTree ctrladdeventhandler ["keyDown",{with uinamespace do {['keydown',[RadioChannels_ctrlGroup,_this select 1,_this select 2,_this select 3],objnull] call RadioChannels_script;};}];

Check warning on line 221 in addons/acre2/ui_scripts/RadioChannels.sqf

View workflow job for this annotation

GitHub Actions / build

Using `ctrladdeventhandler` with unknown event `keyDown`

unknown event `keyDown`


{
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion addons/adminmenu/XEH_preInit.sqf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "\x\tmf\addons\adminmenu\script_component.hpp"

#include "XEH_PREP.sqf"
#include "XEH_PREP.hpp"

#include "initSettings.sqf"

Expand Down
5 changes: 5 additions & 0 deletions addons/adminmenu/addon.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[rapify]
enabled = false # Default: true
exclude = [
"adminMenu.hpp"
]
2 changes: 1 addition & 1 deletion addons/adminmenu/functions/fnc_modal_ACRE2Radios.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -131,5 +131,5 @@ _ctrlButton ctrlAddEventHandler ["ButtonClick", {
};

[_radios, _network] remoteExecCall [QFUNC(modal_ACRE2Languages_assign), GVAR(utilityData)];
[format ["%1 Assigned radios %2 on network %3 to ",profileName,_radio,_network,GVAR(utilityData) apply {name _x}],false,"Admin Menu"] call FUNC(log);
[format ["%1 Assigned radios %2 on network %3 to ",profileName,_radio,_network],false,"Admin Menu"] call FUNC(log);
}];
2 changes: 0 additions & 2 deletions addons/adminmenu/functions/fnc_utility_quickRespawn_local.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ if (_oldUnitdata isEqualType []) then {
[_newUnit, _faction, _role] call EFUNC(assignGear,assignGear);
};

setPlayable _newUnit;
selectPlayer _newUnit;
deleteVehicle _oldUnit;

// Re-enable other text/marker channels
Expand Down
1 change: 1 addition & 0 deletions addons/adminmenu/initKeybinds.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "\x\tmf\addons\adminmenu\script_component.hpp"
["TMF", QGVAR(openKey), ["Open Admin Menu", "Only available for admins and in singleplayer"], FUNC(keyPressed), {false}, [59, [true, false, false]], false, 0] call CBA_fnc_addKeybind; // Shift + F1
["TMF", QGVAR(spectatorRemoteControl), ["Control Focused Spectator Unit", "Only available in TMF Spectator, and only for admins and in singleplayer"], FUNC(keyPressed), {false}, [0, [false, false, false]], false, 0] call CBA_fnc_addKeybind; // No default bind

Expand Down
1 change: 1 addition & 0 deletions addons/adminmenu/initSettings.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "\x\tmf\addons\adminmenu\script_component.hpp"
private _fnc_settings = {
[
QGVAR(printToChat),
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion addons/ai/XEH_preInit.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#include "script_component.hpp"

#include "XEH_PREP.sqf"
#include "XEH_PREP.hpp"
2 changes: 1 addition & 1 deletion addons/ai/XEH_preStart.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#include "script_component.hpp"

#include "XEH_PREP.sqf"
#include "XEH_PREP.hpp"
4 changes: 2 additions & 2 deletions addons/ai/modules/arty.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class GVAR(artillery) : Module_F
tooltip = "Shows units";
property = "Debug";
control = "Checkbox";
defaultValue = false;
defaultValue = 0;
expression = "_this setVariable ['%s',_value];";
typeName = "BOOL";
};
Expand Down Expand Up @@ -57,7 +57,7 @@ class GVAR(artillery) : Module_F
tooltip = "If empty will use the loaded ammo.";
control = "Edit";
property = "Round";
defaultValue = 'default';
defaultValue = 1;
expression = "_this setVariable ['%s',_value];";
typeName = "STRING";
validate = "none";
Expand Down
10 changes: 5 additions & 5 deletions addons/ai/modules/garrison.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class GVAR(garrison) : Module_F
tooltip = "Shows units";
property = "debug";
control = "Checkbox";
defaultValue = false;
defaultValue = 0;
expression = "_this setVariable ['%s',_value];";
};
class Hold
Expand All @@ -27,7 +27,7 @@ class GVAR(garrison) : Module_F
tooltip = "Forces units to stay put and never move.";
property = "holdPos";
control = "Checkbox";
defaultValue = false;
defaultValue = 0;
expression = "_this setVariable ['%s',_value];";
};
class unitRatio
Expand Down Expand Up @@ -78,7 +78,7 @@ class GVAR(garrisonQuantity) : Module_F
tooltip = "Shows units";
property = "debug";
control = "Checkbox";
defaultValue = false;
defaultValue = 0;
expression = "_this setVariable ['%s',_value];";
};
class Hold
Expand All @@ -87,7 +87,7 @@ class GVAR(garrisonQuantity) : Module_F
tooltip = "Forces units to stay put and never move.";
property = "holdPos";
control = "Checkbox";
defaultValue = true;
defaultValue = 1;
expression = "_this setVariable ['%s',_value];";
};
class aiNumberToSpawn
Expand All @@ -106,7 +106,7 @@ class GVAR(garrisonQuantity) : Module_F
tooltip = "Enable AI to move if any enemies are close";
property = "WakeUp";
control = "Checkbox";
defaultValue = false;
defaultValue = 0;
expression = "_this setVariable ['%s',_value];";
};
};
Expand Down
6 changes: 3 additions & 3 deletions addons/ai/modules/waveSpawner.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ class GVAR(wavespawn) : Module_F {
icon = QPATHTOEF(common,UI\logo_tmf_small_ca.paa);
function = QFUNC(waveInit);
functionPriority = 10;
isGlobal = false;
isTriggerActivated = true;
isDisposable = false;
isGlobal = 0;
isTriggerActivated = 1;
isDisposable = 0;

class EventHandlers: EventHandlers {
init = "if(isServer && !is3DEN) then {[{_this call tmf_AI_fnc_waveInit;}, [_this select 0,[],false]] call CBA_fnc_execNextFrame;};_this call bis_fnc_moduleInit;";
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion addons/assigngear/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

LOG("Preinit");

#include "XEH_PREP.sqf"
#include "XEH_PREP.hpp"

if (is3DEN) then {
[] call FUNC(onEdenMissionChange);
Expand Down
2 changes: 1 addition & 1 deletion addons/assigngear/XEH_preStart.sqf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "script_component.hpp"

#include "XEH_PREP.sqf"
#include "XEH_PREP.hpp"

// Cache the facesets to uiNamespace.

Expand Down
5 changes: 5 additions & 0 deletions addons/assigngear/addon.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[rapify]
enabled = false # Default: true
exclude = [
"TMF_RscAttributeLoadout.hpp"
]
1 change: 0 additions & 1 deletion addons/assigngear/config.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "script_component.hpp"
#include "\a3\3den\UI\macros.inc"
#include "\a3\3DEN\UI\macroexecs.inc"
#include "\a3\ui_f\hpp\defineCommon.inc"

class CfgPatches
Expand Down
37 changes: 20 additions & 17 deletions addons/assigngear/functions/fnc_addBackpackItems.sqf
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
#include "\x\tmf\addons\assignGear\script_component.hpp"
#include "\x\tmf\addons\assigngear\script_component.hpp"
/*
* Name = TMF_assignGear_fnc_addBackpackItems
* Author = Nick
*
* Arguments:
* 0: Object. Unit
* 1: ARRAY. Array of items to add
*
* Return:
* 0: ARRAY. Array of items that could not be added
*
* Description:
* Tries to add items to a units' backpack. Logs those that were skipped
* name = TMF_assignGear_fnc_addBackpackItems
* Author = Nick
*
* Arguments:
* 0: Object. Unit
* 1: ARRAY. Array of items to add
*
* Return:
* 0: ARRAY. Array of items that could not be added
*
* Description:
* Tries to add items to a units' backpack. Logs those that were skipped
*/
params ["_unit","_items"];
params ["_unit", "_items"];

if (isNil "_unit" || isNil "_items") exitWith {};
{
if (!(isNil "_x") && {_unit canAddItemToBackpack _x}) then {
if (!(isNil "_x") && {
_unit canAddItemToBackpack _x
}) then {
_unit addItemToBackpack _x;
} else {
WARNING_3("Adding item to backpack failed. Unit: %1, Item: %2.",_unit,_x);
WARNING_2("Adding item to backpack failed. Unit: %1, Item: %2.", _unit, _x);
continue;
};
} forEach _items;
} forEach _items;
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Description:
* Internal Use Only
*/
#include "\a3\3den\UI\dikCodes.inc"
#include "\a3\ui_f\hpp\defineDIKCodes.inc"
#include "\a3\3DEN\UI\resincl.inc"

disableSerialization;
Expand Down
4 changes: 2 additions & 2 deletions addons/assigngear/functions/fnc_testGear.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ private _fncTestUnit = {
_weaponMags = _weaponMags apply {toLower _x};
private _weaponMagCount = {_x in _weaponMags} count _mags;
if (_weaponMagCount < 3 && !(_weaponMags isEqualTo [])) then {
_output pushBack [1,format["Role: %2 - %3 has less than 3 compatible mags for primary weapon.", _x,_faction,_role]];
_output pushBack [1,format["Role: %1 - %2 has less than 3 compatible mags for primary weapon.",_faction,_role]];
};
};

Expand All @@ -220,7 +220,7 @@ private _fncTestUnit = {
_weaponMags = _weaponMags apply {toLower _x};
private _weaponMagCount = {_x in _weaponMags} count _mags;
if (_weaponMagCount == 0) then {
_output pushBack [1,format["Role: %2 - %3 has no compatible mag for sidearm.", _x,_faction,_role]];
_output pushBack [1,format["Role: %1 - %2 has no compatible mag for sidearm.",_faction,_role]];
};
};

Expand Down
File renamed without changes.
Loading
Loading