Set up and integrated HEMTT for easier dev workflow. Adjusted core addon name 'logistics' to 'main'. Fixed several issues caught by HEMTT

This commit is contained in:
Clarky committed 2026-08-29 14:38:47 +10:00
1 parent 00eee092c3
commit 8ef33973bd
61 files changed
+4002 -82

No files matched your search

-1
View File
@@ -1 +0,0 @@
z\clf\addons\logistics
-1
View File
@@ -1 +0,0 @@
#include "script_component.hpp"
-17
View File
@@ -1,17 +0,0 @@
#define COMPONENT logistics
#define COMPONENT_BEAUTIFIED Logistics
#include "\z\clf\addons\logistics\script_mod.hpp"
// #define DEBUG_MODE_FULL
#define DISABLE_COMPILE_CACHE
// #define ENABLE_PERFORMANCE_COUNTERS
//#ifdef DEBUG_ENABLED_MAIN
// #define DEBUG_MODE_FULL
//#endif
//#ifdef DEBUG_SETTINGS_MAIN
// #define DEBUG_SETTINGS DEBUG_SETTINGS_MAIN
//#endif
#include "\z\clf\addons\logistics\script_macros.hpp"
-14
View File
@@ -1,14 +0,0 @@
#include "\x\cba\addons\main\script_macros_common.hpp"
#include "\x\cba\addons\xeh\script_xeh.hpp"
// New PREP macros
#undef PREP
#ifdef DISABLE_COMPILE_CACHE
// no compile cache
#define PREP(fncName) TRIPLES(ADDON,fnc,fncName) = compile preprocessFileLineNumbers QPATHTOF(functions\DOUBLES(fnc,fncName).sqf)
#define PREP_S(fncName,subfolder) TRIPLES(ADDON,fnc,fncName) = compile preprocessFileLineNumbers QPATHTOF(functions\subfolder\DOUBLES(fnc,fncName).sqf)
#else
// compile cache
#define PREP(fncName) [QPATHTOF(functions\DOUBLES(fnc,fncName).sqf), QFUNC(fncName)] call CBA_fnc_compileFunction
#define PREP_S(fncName,subfolder) [QPATHTOF(functions\subfolder\DOUBLES(fnc,fncName).sqf), QFUNC(fncName)] call CBA_fnc_compileFunction
#endif
-4
View File
@@ -1,4 +0,0 @@
#define MAJOR 1
#define MINOR 1
#define PATCHLVL 1
#define BUILD 1
+1
View File
@@ -0,0 +1 @@
z\clf\addons\main
@@ -4,4 +4,4 @@ class CfgEditorSubcategories {
displayName = CSTRING(Category_Logistics);
};
};
*/
*/
@@ -23,4 +23,4 @@ class Extended_PostInit_EventHandlers
// init = "call compile preprocessFileLineNumbers 'logistics\\XEH_preInit.sqf'";
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};
};
};
@@ -37,4 +37,4 @@ class CfgFunctions
};
};
*/
*/
@@ -18,4 +18,4 @@ class CfgFactionClasses {
side = 7;
};
*/
};
};
File renamed without changes.
@@ -29,4 +29,4 @@ PREP_S(moduleInitFOB,modules);
PREP_S(moduleInitHQ,modules);
PREP_S(moduleInitMaterielDepot,modules);
PREP_S(moduleInitOreDepot,modules);
PREP_S(moduleInitSupplyVehicle,modules);
PREP_S(moduleInitSupplyVehicle,modules);
+1
View File
@@ -0,0 +1 @@
#include "script_component.hpp"
@@ -12,7 +12,9 @@
] call CBA_settings_fnc_init;
*/
PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
// Setting up for auto-naming of new bases etc. in mission
GVAR(baseNames) = [
@@ -50,4 +52,4 @@ GVAR(opforBaseIndex) = 0;
GVAR(independentBaseIndex) = 0;
GVAR(civilianBaseIndex) = 0;
#include "initSettings.inc.sqf"
#include "initSettings.inc.sqf"
File renamed without changes.
@@ -4,6 +4,7 @@ class CfgPatches
{
class ADDON
{
name = QUOTE(COMPONENT);
units[] = {
QGVAR(initHQ),
QGVAR(initFOB),
@@ -25,24 +26,24 @@ class CfgPatches
};
};
/*
class CfgMods {
class PREFIX {
dir = "@ace";
name = "Advanced Combat Environment 3";
picture = "A3\Ui_f\data\Logos\arma3_expansion_alpha_ca";
hidePicture = "true";
dir = "@clf";
name = "Clarkson's Logi Framework";
//picture = "A3\Ui_f\data\Logos\arma3_expansion_alpha_ca";
//hidePicture = "true";
hideName = "true";
actionName = "Website";
action = CSTRING(URL);
description = "Issue Tracker: https://github.com/acemod/ACE3/issues";
//actionName = "Website";
//action = CSTRING(URL);
//description = "Issue Tracker: https://github.com/acemod/ACE3/issues";
};
};
*/
#include "CfgEventHandlers.hpp"
#include "CfgFunctions.hpp"
#include "CfgVehicles.hpp"
#include "CfgModuleCategories.hpp"
// #include "ui\gui.hpp"
// #include "ui\gui.hpp"
File renamed without changes.
@@ -41,4 +41,4 @@ if (_hq isNotEqualTo "") then {
"CLF_fnc_initEngineeringBayInteractions",
0,
true
];
];
@@ -24,7 +24,7 @@
params ["_engineering"];
_factory addAction [
_engineering addAction [
"<t color='#71BDA6'>Open Vehicle Engineering</t>",
{
@@ -45,4 +45,4 @@ _factory addAction [
"",
"true", // Figure out a way to lock this to player side checks (macros?)
6
];
];
@@ -54,4 +54,4 @@ _fob setVariable [
"CLF_fnc_initFOBInteractions",
0,
true
];
];
@@ -82,7 +82,7 @@ _factory setVariable [
_currentOre = _currentOre + (_x getVariable ["currentOre", 0]);
} forEach _oreDepots;
if !(_currentOre > 0) exitWith {};
if (_currentOre <= 0) exitWith {};
private _freeSpace = 0;
@@ -111,7 +111,7 @@ _factory setVariable [
{
// If the _amount is now at 0, exit the loop early
if (_amount <= 0) exitWith {};
if (_amountToConvert <= 0) exitWith {};
// Get currently looped depot's materiel and draw down from it
private _depotMateriel = _x getVariable "currentMateriel";
@@ -52,4 +52,4 @@ _factory addAction [
"",
"true",
6
];
];
@@ -69,8 +69,8 @@ switch (_side) do
};
private _baseMarker = createMarker [format ["%1 [HQ]", _name], _hq];
_baseMarker setMarkerShape "ICON";
_baseMarker setMarkerType "mil_dot";
_baseMarker setMarkerShapeLocal "ICON";
_baseMarker setMarkerTypeLocal "mil_dot";
_baseMarker setMarkerText format ["%1 [HQ]", _name];
// TODO - Set colour based on side. Also figure out better icon.
@@ -94,4 +94,4 @@ _hq setVariable [
QFUNC(initHQInteractions),
0,
true
];
];
@@ -23,7 +23,7 @@ if (!isServer) exitWith {};
_depot setVariable ["isSupplyDepot", true, true];
_depot setVariable ["maxMateriel", _maxMateriel, true];
_depot setVariable ["currentMateriel", _currentMateriel, true];
_depot setVariable ["materielRate", _materielRate, true];
_depot setVariable ["generationRate", _generationRate, true];
// Wait to run the initialisaion for mission start -- Prevents base push until HQ object is initialised
if (_base isNotEqualTo "") then {
@@ -54,7 +54,7 @@ if (_generationRate > 0) then {
[
{
params ["_args", "_handle"];
_args params ["_depot", "_materielRate"];
_args params ["_depot", "_generationRate"];
if (!alive _depot || isNull _depot) then {
[_handle] call CBA_fnc_removePerFrameHandler;
@@ -70,7 +70,7 @@ if (_generationRate > 0) then {
_depotMax - _depotCurrent;
private _amount =
(_materielRate min _freeSpace);
(_generationRate min _freeSpace);
_depot setVariable [
"currentMateriel",
@@ -79,6 +79,6 @@ if (_generationRate > 0) then {
];
},
30,
[_depot, _materielRate]
[_depot, _generationRate]
] call CBA_fnc_addPerFrameHandler;
};
@@ -23,7 +23,7 @@ if (!isServer) exitWith {};
_depot setVariable ["isOreDepot", true, true];
_depot setVariable ["maxOre", _maxOre, true];
_depot setVariable ["currentOre", _currentOre, true];
_depot setVariable ["oreRate", _generationRate, true];
_depot setVariable ["generationRate", _generationRate, true];
// Wait to run the initialisaion for mission start -- Prevents base push until HQ object is initialised
if (_base isNotEqualTo "") then {
@@ -70,7 +70,7 @@ if (_generationRate > 0) then {
_depotMax - _depotCurrent;
private _amount =
(_oreRate min _freeSpace);
(_generationRate min _freeSpace);
_depot setVariable [
"currentOre",
@@ -79,6 +79,6 @@ if (_generationRate > 0) then {
];
},
30,
[_depot, _oreRate]
[_depot, _generationRate]
] call CBA_fnc_addPerFrameHandler;
};
@@ -55,4 +55,4 @@ _depot addAction [
"",
"true",
6
];
];
@@ -21,7 +21,7 @@ params ["_vehicle", "_maxLoad", "_currentMateriel", "_currentOre", "_transferRat
if (!isServer) exitWith {};
_vehicle setVariable ["isSupplyVehicle", true, true];
_vehicle setVariable ["maxLoad", _maxMateriel, true];
_vehicle setVariable ["maxLoad", _maxLoad, true];
_vehicle setVariable ["currentMateriel", _currentMateriel, true];
_vehicle setVariable ["currentOre", _currentOre, true];
_vehicle setVariable ["transferRate", _transferRate, true];
@@ -284,4 +284,4 @@ _vehicle addAction [
false, // Remove on completion
false, // Show in unconscious state
true // Show on screen
] call BIS_fnc_holdActionAdd;
] call BIS_fnc_holdActionAdd;
@@ -27,4 +27,4 @@ diag_log format [
diag_log format [
"Attached objects: %1",
attachedObjects _logic
];
];
@@ -10,4 +10,4 @@
2
]
] call CBA_fnc_addSetting;
*/
*/
+13
View File
@@ -0,0 +1,13 @@
#define COMPONENT main
#define COMPONENT_BEAUTIFIED Main
#include "\z\clf\addons\main\script_mod.hpp"
//#ifdef DEBUG_ENABLED_MAIN
// #define DEBUG_MODE_FULL
//#endif
//#ifdef DEBUG_SETTINGS_MAIN
// #define DEBUG_SETTINGS DEBUG_SETTINGS_MAIN
//#endif
#include "\z\clf\addons\main\script_macros.hpp"
+11
View File
@@ -0,0 +1,11 @@
// Fast Recompiling via function
// To Use: [] call ADDON_PREP_RECOMPILE; where ADDON is your prefix, e.g. TUT
#ifdef DISABLE_COMPILE_CACHE
#define LINKFUNC(x) {call FUNC(x)}
#define PREP_RECOMPILE_START if (isNil QUOTE(DOUBLES(ADDON,PREP_RECOMPILE))) then {DOUBLES(ADDON,RECOMPILES) = []; DOUBLES(ADDON,PREP_RECOMPILE) = {{call _x} forEach DOUBLES(ADDON,RECOMPILES);}}; private _recomp = {
#define PREP_RECOMPILE_END }; call _recomp; DOUBLES(ADDON,RECOMPILES) pushBack _recomp;
#else
#define LINKFUNC(x) FUNC(x)
#define PREP_RECOMPILE_START ; // disabled
#define PREP_RECOMPILE_END ; // disabled
#endif
+33
View File
@@ -0,0 +1,33 @@
#include "\x\cba\addons\main\script_macros_common.hpp"
#include "\x\cba\addons\xeh\script_xeh.hpp"
#include "script_debug.hpp"
// Disables compile cache when debug mode is enabled. Makes file patching work.
#ifdef DEBUG_MODE_FULL
#define DISABLE_COMPILE_CACHE
#endif
/*
// New PREP macros - including a subfolder variant which will enable me to organise my functions for my own sanity
#undef PREP
#ifdef DISABLE_COMPILE_CACHE
// no compile cache
#define PREP(function) TRIPLES(ADDON,fnc,function) = compile preprocessFileLineNumbers QPATHTOF(functions\DOUBLES(fnc,function).sqf)
#define PREP_S(function,subfolder) TRIPLES(ADDON,fnc,function) = compile preprocessFileLineNumbers QPATHTOF(functions\subfolder\DOUBLES(fnc,function).sqf)
#else
// compile cache
#define PREP(function) [QPATHTOF(functions\DOUBLES(fnc,function).sqf), QFUNC(function)] call CBA_fnc_compileFunction
#define PREP_S(function,subfolder) [QPATHTOF(functions\subfolder\DOUBLES(fnc,function).sqf), QFUNC(function)] call CBA_fnc_compileFunction
#endif
*/
// Utilising helper PREP maccro redefines from https://github.com/flufflesamy/CBA-Tutorial/
// CBA XEH PREP macro override for when compile cache is disabled.
#ifdef DISABLE_COMPILE_CACHE
#undef PREP
#define PREP(function) TRIPLES(ADDON,fnc,function) = compile preprocessFileLineNumbers '\MAINPREFIX\PREFIX\SUBPREFIX\COMPONENT_F\functions\DOUBLES(fnc,function).sqf'
#define PREP_S(function,subfolder) TRIPLES(ADDON,fnc,function) = compile preprocessFileLineNumbers '\MAINPREFIX\PREFIX\SUBPREFIX\COMPONENT_F\functions\subfolder\DOUBLES(fnc,function).sqf'
#else
#undef PREP
#define PREP(function) ['\MAINPREFIX\PREFIX\SUBPREFIX\COMPONENT_F\functions\DOUBLES(fnc,function).sqf', 'TRIPLES(ADDON,fnc,function)'] call SLX_XEH_COMPILE_NEW
#define PREP_S(function,subfolder) ['\MAINPREFIX\PREFIX\SUBPREFIX\COMPONENT_F\functions\subfolder\DOUBLES(fnc,function).sqf', 'TRIPLES(ADDON,fnc,function)'] call SLX_XEH_COMPILE_NEW
#endif
@@ -4,13 +4,14 @@
#define PREFIX clf
#define SUBPREFIX addons
#define ADDON DOUBLES(PREFIX,COMPONENT)
// Enables debug mode. Comment out on release.
#define DEBUG_MODE_FULL
#include "script_version.hpp"
#define VERSION MAJOR.MINOR
#define VERSION_STR MAJOR.MINOR.PATCHLVL.BUILD
#define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD
#define VERSION_STR MAJOR.MINOR.PATCH.BUILD
#define VERSION_AR MAJOR,MINOR,PATCH,BUILD
// MINIMAL required version for the Mod. Components can specify others..
#define REQUIRED_VERSION 2.22
+4
View File
@@ -0,0 +1,4 @@
#define MAJOR 0
#define MINOR 1
#define PATCH 1
#define BUILD 20
@@ -18,4 +18,4 @@
<Ukrainian>UPDATE ME</Ukrainian>
</Key>
</Package>
</Project>
</Project>
@@ -21,4 +21,4 @@ class RscDisplayAttributes {
class ButtonOK;
class ButtonCancel;
};
};
};