Skip to content

Commit

Permalink
Merge branch 'master' into missile_sdb
Browse files Browse the repository at this point in the history
  • Loading branch information
PabstMirror committed Jan 10, 2025
2 parents 72921ae + d69f047 commit 791d931
Show file tree
Hide file tree
Showing 300 changed files with 6,095 additions and 980 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/arma.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:
uses: actions/checkout@v4
- name: Setup HEMTT
uses: arma-actions/hemtt@v1
with:
annotate: false
- name: Run HEMTT build
run: hemtt build
- name: Rename build folder
Expand Down
3 changes: 3 additions & 0 deletions .hemtt/lints.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[config.file_type]
options.allow_no_extension = true

[sqf.banned_commands]
options.ignore = [
"addPublicVariableEventHandler", # Alt syntax is broken, we are using main syntax
Expand Down
4 changes: 3 additions & 1 deletion addons/advanced_throwing/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
<Polish>Zezwól na podnoszenie przyczepionych obiektów miotanych</Polish>
<Portuguese>Permitir pegar arremessáveis fixados</Portuguese>
<Russian>Вкл. подбор прикрепленных гранат</Russian>
<German>Aktiviere erneute Aufnahme befestigter Wurfobjekte</German>
<German>Erlaube erneute Aufnahme befestigter Wurfobjekte</German>
<Korean>부착 투척물 줍기 활성화</Korean>
<Japanese>装着済の投擲物の拾い上げを有効化</Japanese>
<Chinese>啟用可撿取附著投擲物</Chinese>
Expand Down Expand Up @@ -133,6 +133,7 @@
<German>Zeige während des werfens Windinformationen an, um Rauchgranaten effektiver zu platzieren.</German>
<Korean>연막탄을 효과적으로 배치하는 데 도움이 되도록 투척하는 동안 일시적으로 바람 정보를 표시합니다.</Korean>
<Japanese>投擲行動中に風向きの情報を一時的に表示し、発煙手榴弾の煙幕を効果的に展開しやすくします。</Japanese>
<Chinesesimp>准备投掷时显示风速风向信息, 来帮助烟雾弹投掷</Chinesesimp>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_EnableTempWindInfo_DisplayName">
<English>Show Temporary Wind Info</English>
Expand All @@ -143,6 +144,7 @@
<German>Zeige temporäre Windinformationen</German>
<Korean>바람 정보 임시로 표시</Korean>
<Japanese>一時的に風の情報を表示</Japanese>
<Chinesesimp>临时显示风场信息</Chinesesimp>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_Enable_Description">
<English>Enables advanced throwing system.</English>
Expand Down
2 changes: 2 additions & 0 deletions addons/ai/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<German>Rüstet NVG nachts aus dem Inventar aus und entfernt es tagsüber.\nFügt keine NVGs zum Inventar hinzu!</German>
<Korean>야간에는 야투경을 소지품에 장착하고 주간에는 장착을 해제합니다.\n주의! 소지품에 야투경을 추가하는 것이 아닙니다!</Korean>
<Japanese>インベントリ内の暗視装置を夜間に装備し、日中は解除し収納します。\nこれはNVGをインベントリに追加しません。</Japanese>
<Chinesesimp>在夜晚自动佩戴夜视仪, 在白天自动摘下来\n不会将夜视仪添加进物品栏中!</Chinesesimp>
</Key>
<Key ID="STR_ACE_AI_AssignNVG_DisplayName">
<English>Auto-Equip NVGs</English>
Expand All @@ -24,6 +25,7 @@
<German>Automatisch NVGs ausrüsten</German>
<Korean>야투경 자동 창착</Korean>
<Japanese>暗視装置の自動装備</Japanese>
<Chinesesimp>自动佩戴夜视仪</Chinesesimp>
</Key>
<Key ID="STR_ACE_AI_DisplayName">
<English>AI</English>
Expand Down
2 changes: 2 additions & 0 deletions addons/aircraft/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<German>Folge-Entfernung</German>
<Korean>따라가는 거리</Korean>
<Japanese>追跡距離</Japanese>
<Chinesesimp>跟随距离</Chinesesimp>
</Key>
<Key ID="STR_ACE_Aircraft_DroneFollowHint">
<English>Following unit within %1m</English>
Expand All @@ -37,6 +38,7 @@
<German>Folgt Einheit bis zu %1m</German>
<Korean>%1m 이내로 유닛을 따라갑니다</Korean>
<Japanese>%1m 間隔で 目標を追跡します</Japanese>
<Chinesesimp>在%1m内跟随单位</Chinesesimp>
</Key>
<Key ID="STR_ACE_Aircraft_GatlingDescriptionAP">
<English>30mm DU Armor Piercing</English>
Expand Down
3 changes: 3 additions & 0 deletions addons/arsenal/XEH_PREP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ PREP(sortStatement_mod);
PREP(sortStatement_protection);
PREP(sortStatement_rateOfFire);
PREP(sortStatement_scopeMag);
PREP(statCondition_existsAll);
PREP(statCondition_existsAny);
PREP(statBarStatement_accuracy);
PREP(statBarStatement_default);
PREP(statBarStatement_impact);
Expand All @@ -107,6 +109,7 @@ PREP(statTextStatement_rateOfFire);
PREP(statTextStatement_scopeMag);
PREP(statTextStatement_scopeVisionMode);
PREP(statTextStatement_smokeChemTTL);
PREP(statTextStatement_yesno);
PREP(updateCamPos);
PREP(updateRightPanel);
PREP(updateCurrentItemsList);
Expand Down
13 changes: 10 additions & 3 deletions addons/arsenal/functions/fnc_addListBoxItem.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,21 @@ if (_skip) exitWith {};
private _configPath = ([configFile, campaignConfigFile, missionConfigFile] select _configRoot) >> _configCategory >> _className;
private _dlcName = _configPath call EFUNC(common,getAddon);

// Get DLC requirements
([_configPath] call EFUNC(common,getDLC)) params ["_dlcClass", "_dlcSteamID"];
private _dlcPicture = "";
if (_dlcClass != "") then {
_dlcPicture = getText (configFile >> "CfgMods" >> _dlcClass >> "logo");
};

// If _pictureEntryName is empty, then this item has no picture (e.g. faces)
[configName _configPath, getText (_configPath >> "displayName"), if (_pictureEntryName == "") then {""} else {getText (_configPath >> _pictureEntryName)}, if (_dlcName != "") then {(modParams [_dlcName, ["logo"]]) param [0, ""]} else {""}]
}, true]) params ["_className", "_displayName", "_itemPicture", "_modPicture"];
[configName _configPath, getText (_configPath >> "displayName"), if (_pictureEntryName == "") then {""} else {getText (_configPath >> _pictureEntryName)}, if (_dlcName != "") then {(modParams [_dlcName, ["logo"]]) param [0, ""]} else {""}, _dlcPicture]
}, true]) params ["_className", "_displayName", "_itemPicture", "_modPicture", "_dlcPicture"];

private _lbAdd = _ctrlPanel lbAdd _displayName;
_ctrlPanel lbSetData [_lbAdd, _className];
_ctrlPanel lbSetPicture [_lbAdd, _itemPicture];
_ctrlPanel lbSetPictureRight [_lbAdd, ["", _modPicture] select GVAR(enableModIcons)];
_ctrlPanel lbSetPictureRight [_lbAdd, ["", _modPicture, _dlcPicture] select GVAR(enableModIcons)];
_ctrlPanel lbSetTooltip [_lbAdd, format ["%1\n%2", _displayName, _className]];

if ((toLowerANSI _className) in GVAR(favorites)) then {
Expand Down
2 changes: 1 addition & 1 deletion addons/arsenal/functions/fnc_fillLeftPanel.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ private _selectedItem = if (_idxVirt != -1) then { // Items
_lbAdd = _ctrlPanel lbAdd _displayName;
_ctrlPanel lbSetData [_lbAdd, _x];
_ctrlPanel lbSetTooltip [_lbAdd, format ["%1\n%2", _displayName, _x]];
_ctrlPanel lbSetPictureRight [_lbAdd, ["", _modPicture] select GVAR(enableModIcons)];
_ctrlPanel lbSetPictureRight [_lbAdd, ["", _modPicture, ""] select GVAR(enableModIcons)];
} forEach GVAR(faceCache); // HashMap, not array

GVAR(currentFace)
Expand Down
24 changes: 24 additions & 0 deletions addons/arsenal/functions/fnc_fillLoadoutsList.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,21 @@ if (GVAR(currentLoadoutsTab) != IDC_buttonSharedLoadouts) then {
// Change color on loadout lines that have items that aren't available or don't exist
if (_nullItemsList isNotEqualTo []) then {
_contentPanelCtrl lnbSetColor [[_newRow, 1], [1, 0, 0, 0.8]]; // Red

if (GVAR(showUnavailableItems) == 2) then {
_contentPanelCtrl lnbSetTooltip [[_newRow, 0], format [LLSTRING(missingItems), (_nullItemsList arrayIntersect _nullItemsList) joinString endl]];
};
} else {
if (_unavailableItemsList isNotEqualTo []) then {
_contentPanelCtrl lnbSetColor [[_newRow, 1], [1, 1, 1, 0.25]]; // Gray

if (GVAR(showUnavailableItems) > 0) then {
private _itemDisplayNames = _unavailableItemsList arrayIntersect _unavailableItemsList;
if (GVAR(showUnavailableItems) != 2) then { // Prettify
_itemDisplayNames = _itemDisplayNames apply {getText (_x call CBA_fnc_getItemConfig >> "displayName")};
};
_contentPanelCtrl lnbSetTooltip [[_newRow, 0], format [LLSTRING(unavailableItems), _itemDisplayNames joinString endl]];
};
};
};

Expand Down Expand Up @@ -148,9 +160,21 @@ if (GVAR(currentLoadoutsTab) != IDC_buttonSharedLoadouts) then {
// Change color on loadout lines that have items that aren't available or don't exist
if (_nullItemsList isNotEqualTo []) then {
_contentPanelCtrl lnbSetColor [[_newRow, 1], [1, 0, 0, 0.8]]; // Red

if (GVAR(showUnavailableItems) == 2) then {
_contentPanelCtrl lnbSetTooltip [[_newRow, 0], format [LLSTRING(missingItems), (_nullItemsList arrayIntersect _nullItemsList) joinString endl]];
};
} else {
if (_unavailableItemsList isNotEqualTo []) then {
_contentPanelCtrl lnbSetColor [[_newRow, 1], [1, 1, 1, 0.25]]; // Gray

if (GVAR(showUnavailableItems) > 0) then {
private _itemDisplayNames = _unavailableItemsList arrayIntersect _unavailableItemsList;
if (GVAR(showUnavailableItems) != 2) then { // Prettify
_itemDisplayNames = _itemDisplayNames apply {getText (_x call CBA_fnc_getItemConfig >> "displayName")};
};
_contentPanelCtrl lnbSetTooltip [[_newRow, 0], format [LLSTRING(unavailableItems), _itemDisplayNames joinString endl]];
};
};
};
};
Expand Down
22 changes: 22 additions & 0 deletions addons/arsenal/functions/fnc_statCondition_existsAll.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#include "..\script_component.hpp"
/*
* Author: LinkIsGrim
* Stat condition to only show stats if all exist.
*
* Arguments:
* 0: Stats <ARRAY>
* 1: Item config path <CONFIG>
*
* Return Value:
* Show stat <BOOL>
*
* Example:
* ["ACE_maxZeroing", _config] call ace_arsenal_fnc_statCondition_existsAll
*
* Public: Yes
*/

params ["_stats", "_config"];
TRACE_2("statCondition_existsAll",_stats,_config);

(_stats findIf {isNull (_config >> _x)}) == -1
22 changes: 22 additions & 0 deletions addons/arsenal/functions/fnc_statCondition_existsAny.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#include "..\script_component.hpp"
/*
* Author: LinkIsGrim
* Stat condition to only show stats if at least one exists.
*
* Arguments:
* 0: Stats <ARRAY>
* 1: Item config path <CONFIG>
*
* Return Value:
* Show stat <BOOL>
*
* Example:
* ["ACE_maxZeroing", _config] call ace_arsenal_fnc_statCondition_existsAny
*
* Public: Yes
*/

params ["_stats", "_config"];
TRACE_2("statCondition_existsAny",_stats,_config);

(_stats findIf {!isNull (_config >> _x)}) != -1
25 changes: 25 additions & 0 deletions addons/arsenal/functions/fnc_statTextStatement_yesno.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#include "..\script_component.hpp"
/*
* Author: LinkIsGrim
* Generic Yes/No/None Text statement for boolean stats.
*
* Arguments:
* 0: Stat <STRING>
* 1: Item config path <CONFIG>
*
* Return Value:
* Stat Text <STRING>
*
* Example:
* ["ACE_hasEHP", _config] call ace_arsenal_fnc_statTextStatement_yesno
*
* Public: Yes
*/

params ["_stat", "_config"];
TRACE_2("statTextStatement_yesno",_stat,_config);

private _statConfig = _config >> _stat;
if (isNull _statConfig) exitWith { LELSTRING(common,none) };

localize ([ELSTRING(common,No), ELSTRING(common,Yes)] select (getNumber _statConfig > 0))
16 changes: 13 additions & 3 deletions addons/arsenal/initSettings.inc.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ private _category = LLSTRING(settingCategory);

[
QGVAR(enableModIcons),
"CHECKBOX",
"LIST",
[LSTRING(modIconsSetting), LSTRING(modIconsTooltip)],
_category,
true
[[0, 1, 2], [ELSTRING(common,Disabled), ELSTRING(common,Enabled), LSTRING(DLCRequirement)], 1],
false
] call CBA_fnc_addSetting;

[
Expand Down Expand Up @@ -72,14 +73,23 @@ private _loadoutCategory = LLSTRING(loadoutSubcategory);
true
] call CBA_fnc_addSetting;

[
QGVAR(showUnavailableItems),
"LIST",
[LSTRING(unavailableItemsSetting), LSTRING(unavailableItemsTooltip)],
[_category, _loadoutCategory],
[[0, 1, 2], [ELSTRING(common,Disabled), ELSTRING(common,Enabled), ELSTRING(common,Debug)], 0],
2 // never overwrite the client
] call CBA_fnc_addSetting;

[
QGVAR(EnableRPTLog),
"CHECKBOX",
[LSTRING(printToRPTSetting),
LSTRING(printToRPTTooltip)],
[_category, _loadoutCategory],
false,
false
2 // never overwrite the client
] call CBA_fnc_addSetting;

[
Expand Down
Loading

0 comments on commit 791d931

Please sign in to comment.