Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
Timi007 committed Nov 24, 2024
2 parents ae1d102 + df9dc08 commit d2bf0c0
Show file tree
Hide file tree
Showing 43 changed files with 125 additions and 95 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/arma.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ jobs:
- name: Checkout the source code
uses: actions/checkout@v4
- name: Setup HEMTT
uses: arma-actions/hemtt@v1
uses: arma-actions/hemtt@main
- name: Run HEMTT build
run: hemtt build
run: hemtt build --no-bin
12 changes: 7 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup HEMTT
uses: arma-actions/hemtt@v1
uses: arma-actions/hemtt@main

- name: Setup Tools
run: |
Expand Down Expand Up @@ -60,11 +60,13 @@ jobs:
run: mv .hemttout/release .hemttout/@${{ env.MOD_NAME }}

- name: Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.MOD_NAME }}
path: .hemttout/@*
retention-days: 1
include-hidden-files: true # Because .hemttout is a hidden directory
if-no-files-found: error


publish-release:
Expand All @@ -73,7 +75,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download Artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4

- name: Prepare Archives
run: |
Expand All @@ -84,7 +86,7 @@ jobs:
- name: Prepare GitHub Release
id: release_drafter
uses: release-drafter/release-drafter@v5
uses: release-drafter/release-drafter@v6
with:
name: Version ${{ needs.build.outputs.VERSION_SHORT }}
tag: v${{ needs.build.outputs.VERSION }}
Expand All @@ -93,7 +95,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload mod archive to GitHub Release
uses: shogo82148/[email protected].2
uses: shogo82148/[email protected].7
with:
upload_url: ${{ steps.release_drafter.outputs.upload_url }}
asset_path: ./${{ needs.build.outputs.MOD_NAME }}_${{ needs.build.outputs.VERSION_SHORT }}.zip
Expand Down
8 changes: 0 additions & 8 deletions .hemtt/project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@ authority = "mts_markers"
path = "addons/markers/script_version.hpp"
git_hash = 0

[asc]
enabled = true
exclude = [
"/initsettings.sqf",
"/initkeybinds.sqf",
"/xeh_prep.sqf",
]

[hemtt.config]
preset = "Hemtt"

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<p align="center">
<a href="https://github.com/Metis-Team/mts_marker/releases/latest">
<img src="https://img.shields.io/badge/Version-1.8.1-blue.svg?style=flat-square" alt="Metis Marker Version">
<img src="https://img.shields.io/badge/Version-1.8.2-blue.svg?style=flat-square" alt="Metis Marker Version">
</a>
<a href="https://github.com/Metis-Team/mts_marker/releases/latest">
<img src="https://img.shields.io/github/downloads/Metis-Team/mts_marker/total.svg?style=flat-square&label=Downloads" alt="Metis Marker Downloads">
Expand Down
2 changes: 1 addition & 1 deletion addons/markers/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ADDON = true;

// Print version to rpt log
private _version = getText (configFile >> "CfgPatches" >> "mts_markers" >> "versionStr");
INFO_1("Metis Marker version: %1.", _version);
INFO_1("Metis Marker version: %1.",_version);

//create namespace
if (isServer || (!isMultiplayer)) then {
Expand Down
2 changes: 1 addition & 1 deletion addons/markers/functions/fnc_convertCreateMarkerParams.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ if (_frameshape isEqualType "") then {
_markerParameter set [0, [_frameshape, _dashedFrameshape, false]];
};

TRACE_2("Converted createMarker params", _params, _createMarkerParams);
TRACE_2("Converted createMarker params",_params,_createMarkerParams);

_params
4 changes: 2 additions & 2 deletions addons/markers/functions/fnc_copyMarker.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
*/

params [["_mapCtrl", controlNull, [controlNull]]];
CHECKRET(isNull _mapCtrl, false);
CHECKRET(isNull _mapCtrl,false);

private _namePrefix = [_mapCtrl, true] call FUNC(getMouseOverMarkerPrefix);
CHECKRET(_namePrefix isEqualTo "", false);
CHECKRET(_namePrefix isEqualTo "",false);

private _scale = [_namePrefix] call FUNC(getMarkerScale);
private _alpha = [_namePrefix] call FUNC(getMarkerAlpha);
Expand Down
2 changes: 1 addition & 1 deletion addons/markers/functions/fnc_createMarker.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ params [
["_alpha", MARKER_ALPHA, [0]]
];

CHECKRET(((_broadcastChannel > 5) || (_broadcastChannel < -1)), ERROR("Channel ID not supported"));
CHECKRET(((_broadcastChannel > 5) || (_broadcastChannel < -1)),ERROR("Channel ID not supported"));

//get player UID
private _playerUID = getPlayerUID player;
Expand Down
30 changes: 15 additions & 15 deletions addons/markers/functions/fnc_createMarkerLocal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ _markerParameter params [
_size params [["_grpsize", 0, [0]], ["_reinforced", false, [false]], ["_reduced", false, [false]]];

CHECK(!hasInterface);
CHECKRET(_namePrefix isEqualTo "", ERROR("No marker prefix"));
CHECKRET((_frameshape select 0) isEqualTo "", ERROR("No frameshape or wrong format. Expected format: [STRING, BOOLEAN, BOOLEAN]"));
CHECKRET(_namePrefix isEqualTo "",ERROR("No marker prefix"));
CHECKRET((_frameshape select 0) isEqualTo "",ERROR("No frameshape or wrong format. Expected format: [STRING, BOOLEAN, BOOLEAN]"));

_frameshape params [["_identity", "", [""]], ["_dashedFrameshape", false, [false]], ["_isHq", false, [false]]];
_identity = toLower _identity;
Expand All @@ -85,14 +85,14 @@ if (_alpha < 0 || _alpha > 1) then {
};

if !(_identity in ["blu", "red", "neu", "unk"]) exitWith {
ERROR_1("Unknown Identity %1", _identity);
ERROR_1("Unknown Identity %1",_identity);
};

CHECKRET(_operationalCondition < 0 || _operationalCondition > 2, ERROR("Operational condition must be a number between 0 and 2."));
CHECKRET(_operationalCondition < 0 || _operationalCondition > 2,ERROR("Operational condition must be a number between 0 and 2."));

_direction = toUpper _direction;
if (_direction isNotEqualTo "" && {!(_direction in GVAR(directions))}) exitWith {
ERROR_2("Unknown direction of movement %1. Allowed values: %2", _direction, GVAR(directions) joinString ", ");
ERROR_2("Unknown direction of movement %1. Allowed values: %2",_direction,GVAR(directions) joinString ", ");
};

//create frameshape marker
Expand Down Expand Up @@ -121,7 +121,7 @@ private _frameshapeColor = if (GVAR(useVanillaColors)) then {
} else {
format ["mts_%1_color", _identity]
};
CHECKRET(_frameshapeColor isEqualTo "", ERROR_1("Could not get corresponding vanilla color for identity %1.", _identity));
CHECKRET(_frameshapeColor isEqualTo "",ERROR_1("Could not get corresponding vanilla color for identity %1.",_identity));

_markerFrame setMarkerColorLocal _frameshapeColor;

Expand All @@ -139,7 +139,7 @@ if (_direction isEqualTo "" && _isHq) then {

// Direction of Movement Arrow
if (_direction isNotEqualTo "") then {
private _mod = if (_isHq) then { "dir_hq" } else { "dir" };
private _mod = ["dir", "dir_hq"] select _isHq;
private _markerName = format ["%1_%2_%3", _namePrefix, _mod, _direction];
private _markerType = format ["mts_%1_%2_%3", _identity, _mod, _direction];

Expand Down Expand Up @@ -204,14 +204,14 @@ if (_additionalInfo isNotEqualTo "") then {

// create text marker (bottom left of marker)
if ((count _uniqueDesignation) > 0) then {
TRACE_1("uniqueDesignation input", _uniqueDesignation);
TRACE_1("uniqueDesignation input",_uniqueDesignation);
scopeName "textLeftCreation";

//only take the first three characters of the left text
if ((count _uniqueDesignation) > UNIQUE_DESIGNATION_MAX_CHARS) then {
_uniqueDesignation resize UNIQUE_DESIGNATION_MAX_CHARS;
};


//check if all characters are valid & make all characters uppercase
{
_x = toUpper _x;
Expand All @@ -231,7 +231,7 @@ if ((count _uniqueDesignation) > 0) then {
private _letter = _uniqueDesignation select _numIndex;

([_namePrefix, "uniqueDesignation", _letterPos, _letter] call FUNC(getCharMarkerType)) params ["_letterType", "_markerName"];
TRACE_3("uniqueDesignation", _letter, _letterType, _markerName);
TRACE_3("uniqueDesignation",_letter,_letterType,_markerName);

private _markerUniqueDesignation = createMarkerLocal [_markerName, _pos];
_markerUniqueDesignation setMarkerTypeLocal _letterType;
Expand All @@ -246,9 +246,9 @@ if ((count _uniqueDesignation) > 0) then {

// create text marker (bottom right of marker)
if ((count _higherFormation) > 0) then {
TRACE_1("higherFormation input", _higherFormation);

TRACE_1("higherFormation input",_higherFormation);
scopeName "textRightCreation";

//only take the first n characters of the left text
if ((count _higherFormation) > HIGHER_FORMATION_MAX_CHARS) then {
_higherFormation resize HIGHER_FORMATION_MAX_CHARS;
Expand All @@ -270,7 +270,7 @@ if ((count _higherFormation) > 0) then {
private _letter = _x;

([_namePrefix, "higherFormation", _forEachIndex, _letter] call FUNC(getCharMarkerType)) params ["_letterType", "_markerName"];
TRACE_3("higherFormation", _letter, _letterType, _markerName);
TRACE_3("higherFormation",_letter,_letterType,_markerName);

private _markerHigherFormation = createMarkerLocal [_markerName, _pos];
_markerHigherFormation setMarkerTypeLocal _letterType;
Expand Down Expand Up @@ -304,7 +304,7 @@ if ((count _dateTimeGroup) > 0) then {
// Returns array in format [D, D, H, H, M, M, Z, mmm, Y, Y].
private _dtgCharacters = _dateTimeGroup call FUNC(toDTGCharaters);

CHECKRET(_dtgCharacters isEqualTo [], WARNING_1("Date-Time Group is invalid. Will not create DTG markers. DTG: %1", _dateTimeGroup));
CHECKRET(_dtgCharacters isEqualTo [],WARNING_1("Date-Time Group is invalid. Will not create DTG markers. DTG: %1",_dateTimeGroup));

// Iterate reversed because char pos starts closest to frameshape, meaning with the year.
// DDHHMMZmmmYY ┌───────┐
Expand Down Expand Up @@ -339,7 +339,7 @@ if (_markerInformation isEqualTo []) then { //save in mts_markers_namespace
if (is3DEN) then {
//save 3DEN marker data in a hidden attribute
private _3denData = "Scenario" get3DENMissionAttribute QGVAR(3denData);
_3denData pushbackUnique _this;
_3denData pushBackUnique _this;
set3DENMissionAttributes [["Scenario", QGVAR(3denData), _3denData]];
};
};
Expand Down
4 changes: 2 additions & 2 deletions addons/markers/functions/fnc_deleteMarker.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

params [["_namePrefix", "", [""]]];

CHECKRET(_namePrefix isEqualTo "", ERROR("No marker prefix"); false);
CHECKRET(_namePrefix isEqualTo "",ERROR("No marker prefix"); false);

//get channel ID from marker prefix
private _broadcastChannel = [_namePrefix] call FUNC(getBroadcastChannel);

CHECKRET(((_broadcastChannel > 5) || (_broadcastChannel < -1)), ERROR("Invalid marker prefix. No MTS marker"); false);
CHECKRET(((_broadcastChannel > 5) || (_broadcastChannel < -1)),ERROR("Invalid marker prefix. No MTS marker"); false);

//broadcast marker depending on channel ID
[_namePrefix] remoteExecCall [QFUNC(deleteMarkerLocal), ([_broadcastChannel] call FUNC(getBroadcastTargets)), true];
Expand Down
4 changes: 2 additions & 2 deletions addons/markers/functions/fnc_deleteMarkerLocal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

params [["_namePrefix", "", [""]]];
CHECK(!hasInterface);
CHECKRET(_namePrefix isEqualTo "", ERROR("No marker prefix"));
CHECKRET(_namePrefix isEqualTo "",ERROR("No marker prefix"));

//get marker set
private _markerFamily = [_namePrefix] call FUNC(getMarkerFamily);
Expand All @@ -35,7 +35,7 @@ GVAR(localMarkers) deleteAt _namePrefix;
if (is3DEN) then {
//delete 3DEN marker from attribute
private _3denData = "Scenario" get3DENMissionAttribute QGVAR(3denData);
private _index = _3denData findif {(_x select 0) isEqualTo _namePrefix};
private _index = _3denData findIf {(_x select 0) isEqualTo _namePrefix};
_3denData deleteAt _index;
set3DENMissionAttributes [["Scenario", QGVAR(3denData), _3denData]];
};
2 changes: 1 addition & 1 deletion addons/markers/functions/fnc_generateUniquePrefix.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
params [["_editable", true, [true]], ["_broadcastChannel", -1, [0]], ["_playerUID", "0", [""]]];
private ["_namePrefix"];

CHECKRET(((_broadcastChannel > 5) || (_broadcastChannel < -1)), ERROR("Channel ID not supported"));
CHECKRET(((_broadcastChannel > 5) || (_broadcastChannel < -1)),ERROR("Channel ID not supported"));

//generate unique marker name & return
private _uniqueName = false;
Expand Down
2 changes: 1 addition & 1 deletion addons/markers/functions/fnc_getBroadcastChannel.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

params [["_namePrefix", "", [""]]];

CHECKRET(_namePrefix isEqualTo "", ERROR("No marker prefix"));
CHECKRET(_namePrefix isEqualTo "",ERROR("No marker prefix"));

switch ([_namePrefix] call FUNC(isMtsMarker)) do {
case 1: {
Expand Down
2 changes: 1 addition & 1 deletion addons/markers/functions/fnc_getMarkerAlpha.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@

params [["_namePrefix", "", [""]]];

CHECKRET(_namePrefix isEqualTo "", ERROR("No marker prefix"));
CHECKRET(_namePrefix isEqualTo "",ERROR("No marker prefix"));

(markerAlpha format ["%1_frame", _namePrefix])
2 changes: 1 addition & 1 deletion addons/markers/functions/fnc_getMarkerConfig.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@

params [["_namePrefix", "", [""]]];

CHECKRET(_namePrefix isEqualTo "", ERROR("No marker prefix"));
CHECKRET(_namePrefix isEqualTo "",ERROR("No marker prefix"));

(GVAR(namespace) getVariable [_namePrefix, []]) param [1, []]
2 changes: 1 addition & 1 deletion addons/markers/functions/fnc_getMarkerFamily.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

params [["_namePrefix", "", [""]]];
CHECKRET(_namePrefix isEqualTo "", []);
CHECKRET(_namePrefix isEqualTo "",[]);

private _markerInformation = GVAR(namespace) getVariable [_namePrefix, [[]]];

Expand Down
2 changes: 1 addition & 1 deletion addons/markers/functions/fnc_getMarkerPos.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@

params [["_namePrefix", "", [""]], ["_preserveElevation", false, [false]]];

CHECKRET(_namePrefix isEqualTo "", ERROR("No marker prefix"));
CHECKRET(_namePrefix isEqualTo "",ERROR("No marker prefix"));

getMarkerPos [format["%1_frame", _namePrefix], _preserveElevation]
2 changes: 1 addition & 1 deletion addons/markers/functions/fnc_getMarkerScale.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@

params [["_namePrefix", "", [""]]];

CHECKRET(_namePrefix isEqualTo "", ERROR("No marker prefix"));
CHECKRET(_namePrefix isEqualTo "",ERROR("No marker prefix"));

(getMarkerSize format ["%1_frame", _namePrefix]) select 0
6 changes: 3 additions & 3 deletions addons/markers/functions/fnc_getMouseOverMarkerPrefix.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
*/

params [["_mapCtrl", controlNull, [controlNull]], ["_includeNoEditMarker", false, [false]]];
CHECKRET(isNull _mapCtrl, "");
CHECKRET(isNull _mapCtrl,"");

private _mouseOverMarker = ctrlMapMouseOver _mapCtrl;
private _type = _mouseOverMarker param [0, ""];
CHECKRET(_type isNotEqualTo "marker", "");
CHECKRET(_type isNotEqualTo "marker","");
private _markerName = _mouseOverMarker select 1;

private _isMtsMarker = [_markerName] call FUNC(isMtsMarker);
CHECKRET(_isMtsMarker isEqualTo 0, "");
CHECKRET(_isMtsMarker isEqualTo 0,"");

if (_isMtsMarker isEqualTo 1 || _includeNoEditMarker) exitWith {
(_markerName splitString "_") select 0
Expand Down
2 changes: 1 addition & 1 deletion addons/markers/functions/fnc_getPlayerUID.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

params [["_namePrefix", "", [""]]];

CHECKRET([_namePrefix] call FUNC(isMtsMarker) isNotEqualTo 1, QUOTE(-1));
CHECKRET([_namePrefix] call FUNC(isMtsMarker) isNotEqualTo 1,"-1");

(_namePrefix splitString "/") param [1, "-1"]

2 changes: 1 addition & 1 deletion addons/markers/functions/fnc_getTimeZone.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

params [["_time", [], [[]], [2, 7]], ["_timeUtc", [], [[]], [2, 7]]];

CHECKRET((_time isEqualTo []) || (_timeUtc isEqualTo []), []);
CHECKRET((_time isEqualTo []) || (_timeUtc isEqualTo []),[]);

// time is passed from systemTime command
if ((count _time) isEqualTo 7) then {
Expand Down
2 changes: 1 addition & 1 deletion addons/markers/functions/fnc_getTimeZoneIdentifier.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
params [["_time", [], [[]]], ["_timeUtc", [], [[]]]];

private _timeZone = [_time, _timeUtc] call FUNC(getTimeZone); // _timeDiffH hour is in range -12..+12
CHECKRET(_timeZone isEqualTo [], "");
CHECKRET(_timeZone isEqualTo [],"");

// Simplify time zones according to ATP 6-02.70 Appendix E
// Do not consider the minutes
Expand Down
2 changes: 1 addition & 1 deletion addons/markers/functions/fnc_getUIData.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ private _mainDisplay = findDisplay MAIN_DISPLAY;

//get identity
private _identity = (_mainDisplay displayCtrl FRIENDLY_BTN_FRAME) getVariable [QGVAR(currentIdentitySelected), ""];
CHECKRET(_identity isEqualTo "", ERROR("No identity"));
CHECKRET(_identity isEqualTo "",ERROR("No identity"));

// Check if frameshape is dashed or HQ
private _dashedFrameshape = cbChecked (_mainDisplay displayCtrl SUSPECT_CHECKBOX);
Expand Down
2 changes: 1 addition & 1 deletion addons/markers/functions/fnc_initializeDTGUI.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ params [["_parentDisplay", displayNull, [displayNull]]];

// Open Date-Time Group configuration
private _dtgDisplay = _parentDisplay createDisplay QGVAR(DTGDialog);
CHECKRET(isNull _dtgDisplay, ERROR("Failed to create DTG dialog"));
CHECKRET(isNull _dtgDisplay,ERROR("Failed to create DTG dialog"));

private _dateYearCtrl = _dtgDisplay displayCtrl DTG_YEAR_DROPDOWN;
private _dateMonthCtrl = _dtgDisplay displayCtrl DTG_MONTH_DROPDOWN;
Expand Down
Loading

0 comments on commit d2bf0c0

Please sign in to comment.