Skip to content

Commit

Permalink
Use ACE arsenal actions instead of UI button (#12)
Browse files Browse the repository at this point in the history
* Start actions

* ACE arsenal actions

* Update ACE_Arsenal_Actions.hpp
  • Loading branch information
johnb432 authored May 22, 2024
1 parent 087d868 commit 8e04adf
Show file tree
Hide file tree
Showing 8 changed files with 145 additions and 265 deletions.
27 changes: 27 additions & 0 deletions addons/main/ACE_Arsenal_Actions.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
class ace_arsenal_actions {
class ADDON {
displayName = CSTRING(ModuleOnChest_Displayname);
condition = QUOTE((_this select 0) call FUNC(canMovePack) && {backpack (_this select 0) != '' || {(_this select 0) call FUNC(chestpack) != ''}});
scopeEditor = 0; // editor modules exist for chestpacks
tabs[] = {5};
class GVAR(chestpack) {
condition = QUOTE((_this select 0) call FUNC(chestpack) != '');
textStatement = QUOTE(getText (configFile >> 'CfgVehicles' >> (_this select 0) call FUNC(chestpack) >> 'displayName'));
};
class GVAR(onChest) {
label = CSTRING(OnChest);
condition = QUOTE((_this select 0) call FUNC(canMovePack) && {backpack (_this select 0) != ''} && {(_this select 0) call FUNC(chestpack) == ''});
statement = QUOTE((_this select 0) call FUNC(actionOnChest));
};
class GVAR(onBack) {
label = CSTRING(OnBack);
condition = QUOTE((_this select 0) call FUNC(canMovePack) && {backpack (_this select 0) == ''} && {(_this select 0) call FUNC(chestpack) != ''});
statement = QUOTE((_this select 0) call FUNC(actionOnBack));
};
class GVAR(swap) {
label = CSTRING(Swap);
condition = QUOTE((_this select 0) call FUNC(canMovePack) && {backpack (_this select 0) != ''} && {(_this select 0) call FUNC(chestpack) != ''});
statement = QUOTE((_this select 0) call FUNC(actionSwap));
};
};
};
232 changes: 116 additions & 116 deletions addons/main/Stringtable.xml
Original file line number Diff line number Diff line change
@@ -1,116 +1,116 @@
<?xml version="1.0" encoding="utf-8" ?>
<Project name="BOCR">
<Package name="Main">
<Key ID="STR_BOCR_Main_Disable">
<Original>Disable BackpackOnChest</Original>
<English>Disable BackpackOnChest</English>
<Chinese>禁用胸前背包</Chinese>
<Chinesesimp>背包前置功能已禁用</Chinesesimp>
<French>Interdire le sac en position ventral </French>
<German>BackpackOnChest verbieten</German>
<Japanese>BackpackOnChest を制限</Japanese>
<Spanish>Prohibir BackpackOnChest</Spanish>
<Turkish>BackpackOnChest'i Kapat</Turkish>
</Key>
<Key ID="STR_BOCR_Main_Disable_Description">
<Original>Prohibit BackpackOnChest features</Original>
<English>Prohibit BackpackOnChest features</English>
<Turkish>BackpackOnChest özelliklerini yasaklayın</Turkish>
</Key>
<Key ID="STR_BOCR_Main_Walk">
<Original>Force Walking</Original>
<English>Force Walking</English>
<Turkish>Zorla Yürüme</Turkish>
</Key>
<Key ID="STR_BOCR_Main_Walk_Description">
<Original>Player is forced to walk when backpack is on chest</Original>
<English>Player is forced to walk when backpack is on chest</English>
<Turkish>Oyuncu sırt çantası gövdesindeyken yürümeye zorlanır</Turkish>
</Key>
<Key ID="STR_BOCR_Main_ModuleAdd_Displayname">
<Original>Add Chestpack</Original>
<English>Add Chestpack</English>
<Chinese>增加胸前背包</Chinese>
<Chinesesimp>增加背包</Chinesesimp>
<French>Ajouter un sac ventral</French>
<German>Chestpack hinzufügen</German>
<Japanese>チェストパック追加</Japanese>
<Spanish>Agregar mochila al pecho</Spanish>
<Turkish>Chestpack Ekle</Turkish>
</Key>
<Key ID="STR_BOCR_Main_ModuleAdd_Description">
<Original>Adds a chestpack (with invenory) to all syncronized Units.</Original>
<English>Adds a chestpack (with invenory) to all syncronized Units.</English>
<Chinese>增加胸前背包(包括內容物)給全部同步中的單位。</Chinese>
<Chinesesimp>给所有已同步的单位增加前置背包(包含库存)</Chinesesimp>
<French>Ajoute un sac ventral (avec inventaire) à toutes les unités syncronisées.</French>
<German>Fügt einen Chestpack allen syncronisierten Einheiten hinzu.</German>
<Japanese>同期された全ユニットにチェストパック(インベントリ付)を追加します。</Japanese>
<Spanish>Agrega una mochila al pecho (con inventario) a todas las unidades sincronizadas</Spanish>
<Turkish>Tüm senkronize Birimlere bir Chestpack (envanter ile) ekler.</Turkish>
</Key>
<Key ID="STR_BOCR_Main_ModuleOnChest_Displayname">
<Original>Backpack on Chest</Original>
<English>Backpack on Chest</English>
<Chinese>胸前背包</Chinese>
<Chinesesimp>启用背包前置</Chinesesimp>
<French>Sac à dos en position ventral</French>
<German>Rucksack auf den Bauch</German>
<Japanese>前側にバックパック</Japanese>
<Spanish>Mochila al pecho</Spanish>
<Turkish>Gövede de Sırt Çantası</Turkish>
</Key>
<Key ID="STR_BOCR_Main_ModuleOnChest_Description">
<Original>Puts current backpack on the chest.</Original>
<English>Puts current backpack on the chest.</English>
<Chinese>把目前背包放置胸前</Chinese>
<Chinesesimp>将当前背包置于胸前</Chinesesimp>
<French>Place le sac à dos actuel en position ventral.</French>
<German>Schnallt den aktuellen Rucksack auf den Bauch.</German>
<Japanese>現在のバックパックを前側に置きます。</Japanese>
<Spanish>Pone la mochila actual en el pecho.</Spanish>
<Turkish>Mevcut sırt çantasını göğsüne koyar.</Turkish>
</Key>
<Key ID="STR_BOCR_Main_OnChest">
<Original>Put backpack on chest</Original>
<English>Put backpack on chest</English>
<Chinese>把背包放置胸前</Chinese>
<Chinesesimp>将背包置于胸前</Chinesesimp>
<French>Mettre le sac à dos en position ventral</French>
<German>Rucksack auf den Bauch schnallen</German>
<Japanese>バックパックを前側にする</Japanese>
<Spanish>Poner mochila en el pecho</Spanish>
<Turkish>Sırt çantasını gövdenize asın</Turkish>
</Key>
<Key ID="STR_BOCR_Main_OnBack">
<Original>Put backpack on back</Original>
<English>Put backpack on back</English>
<Chinese>把背包背著</Chinese>
<Chinesesimp>将背包置于后背</Chinesesimp>
<French>Remettre le sac à dos ventral dans le dos</French>
<German>Rucksack auf den Rücken</German>
<Japanese>バックパックを後ろ側にする</Japanese>
<Spanish>Poner mochila en la espalda</Spanish>
<Turkish>Sırt çantasını sırtınıza asın</Turkish>
</Key>
<Key ID="STR_BOCR_Main_Swap">
<Original>Swap rucksacks</Original>
<English>Swap rucksacks</English>
<Chinese>前後背包交換</Chinese>
<Chinesesimp>交换背包位置</Chinesesimp>
<French>Intervertir les sacs</French>
<German>Rucksäcke tauschen</German>
<Japanese>バックパックを入れ替え</Japanese>
<Spanish>Intercambiar mochilas</Spanish>
<Turkish>Sırt çantalarını değiştirin (Bölge)</Turkish>
</Key>
<Key ID="STR_BOCR_Main_Lower">
<Original>Lower chestpack</Original>
<English>Lower chestpack</English>
</Key>
<Key ID="STR_BOCR_Main_cutLoweringLine">
<Original>Cut Lowering Line</Original>
<English>Cut Lowering Line</Original>
</Key>
</Package>
</Project>
<?xml version="1.0" encoding="utf-8" ?>
<Project name="BOCR">
<Package name="Main">
<Key ID="STR_BOCR_Main_Disable">
<Original>Disable BackpackOnChest</Original>
<English>Disable BackpackOnChest</English>
<Chinese>禁用胸前背包</Chinese>
<Chinesesimp>背包前置功能已禁用</Chinesesimp>
<French>Interdire le sac en position ventral </French>
<German>BackpackOnChest verbieten</German>
<Japanese>BackpackOnChest を制限</Japanese>
<Spanish>Prohibir BackpackOnChest</Spanish>
<Turkish>BackpackOnChest'i Kapat</Turkish>
</Key>
<Key ID="STR_BOCR_Main_Disable_Description">
<Original>Prohibit BackpackOnChest features</Original>
<English>Prohibit BackpackOnChest features</English>
<Turkish>BackpackOnChest özelliklerini yasaklayın</Turkish>
</Key>
<Key ID="STR_BOCR_Main_Walk">
<Original>Force Walking</Original>
<English>Force Walking</English>
<Turkish>Zorla Yürüme</Turkish>
</Key>
<Key ID="STR_BOCR_Main_Walk_Description">
<Original>Player is forced to walk when backpack is on chest</Original>
<English>Player is forced to walk when backpack is on chest</English>
<Turkish>Oyuncu sırt çantası gövdesindeyken yürümeye zorlanır</Turkish>
</Key>
<Key ID="STR_BOCR_Main_ModuleAdd_Displayname">
<Original>Add Chestpack</Original>
<English>Add Chestpack</English>
<Chinese>增加胸前背包</Chinese>
<Chinesesimp>增加背包</Chinesesimp>
<French>Ajouter un sac ventral</French>
<German>Chestpack hinzufügen</German>
<Japanese>チェストパック追加</Japanese>
<Spanish>Agregar mochila al pecho</Spanish>
<Turkish>Chestpack Ekle</Turkish>
</Key>
<Key ID="STR_BOCR_Main_ModuleAdd_Description">
<Original>Adds a chestpack (with invenory) to all syncronized Units.</Original>
<English>Adds a chestpack (with invenory) to all syncronized Units.</English>
<Chinese>增加胸前背包(包括內容物)給全部同步中的單位。</Chinese>
<Chinesesimp>给所有已同步的单位增加前置背包(包含库存)</Chinesesimp>
<French>Ajoute un sac ventral (avec inventaire) à toutes les unités syncronisées.</French>
<German>Fügt einen Chestpack allen syncronisierten Einheiten hinzu.</German>
<Japanese>同期された全ユニットにチェストパック(インベントリ付)を追加します。</Japanese>
<Spanish>Agrega una mochila al pecho (con inventario) a todas las unidades sincronizadas</Spanish>
<Turkish>Tüm senkronize Birimlere bir Chestpack (envanter ile) ekler.</Turkish>
</Key>
<Key ID="STR_BOCR_Main_ModuleOnChest_Displayname">
<Original>Backpack on Chest</Original>
<English>Backpack on Chest</English>
<Chinese>胸前背包</Chinese>
<Chinesesimp>启用背包前置</Chinesesimp>
<French>Sac à dos en position ventral</French>
<German>Rucksack auf den Bauch</German>
<Japanese>前側にバックパック</Japanese>
<Spanish>Mochila al pecho</Spanish>
<Turkish>Gövede de Sırt Çantası</Turkish>
</Key>
<Key ID="STR_BOCR_Main_ModuleOnChest_Description">
<Original>Puts current backpack on the chest.</Original>
<English>Puts current backpack on the chest.</English>
<Chinese>把目前背包放置胸前</Chinese>
<Chinesesimp>将当前背包置于胸前</Chinesesimp>
<French>Place le sac à dos actuel en position ventral.</French>
<German>Schnallt den aktuellen Rucksack auf den Bauch.</German>
<Japanese>現在のバックパックを前側に置きます。</Japanese>
<Spanish>Pone la mochila actual en el pecho.</Spanish>
<Turkish>Mevcut sırt çantasını göğsüne koyar.</Turkish>
</Key>
<Key ID="STR_BOCR_Main_OnChest">
<Original>Put backpack on chest</Original>
<English>Put backpack on chest</English>
<Chinese>把背包放置胸前</Chinese>
<Chinesesimp>将背包置于胸前</Chinesesimp>
<French>Mettre le sac à dos en position ventral</French>
<German>Rucksack auf den Bauch schnallen</German>
<Japanese>バックパックを前側にする</Japanese>
<Spanish>Poner mochila en el pecho</Spanish>
<Turkish>Sırt çantasını gövdenize asın</Turkish>
</Key>
<Key ID="STR_BOCR_Main_OnBack">
<Original>Put backpack on back</Original>
<English>Put backpack on back</English>
<Chinese>把背包背著</Chinese>
<Chinesesimp>将背包置于后背</Chinesesimp>
<French>Remettre le sac à dos ventral dans le dos</French>
<German>Rucksack auf den Rücken</German>
<Japanese>バックパックを後ろ側にする</Japanese>
<Spanish>Poner mochila en la espalda</Spanish>
<Turkish>Sırt çantasını sırtınıza asın</Turkish>
</Key>
<Key ID="STR_BOCR_Main_Swap">
<Original>Swap rucksacks</Original>
<English>Swap rucksacks</English>
<Chinese>前後背包交換</Chinese>
<Chinesesimp>交换背包位置</Chinesesimp>
<French>Intervertir les sacs</French>
<German>Rucksäcke tauschen</German>
<Japanese>バックパックを入れ替え</Japanese>
<Spanish>Intercambiar mochilas</Spanish>
<Turkish>Sırt çantalarını değiştirin (Bölge)</Turkish>
</Key>
<Key ID="STR_BOCR_Main_Lower">
<Original>Lower chestpack</Original>
<English>Lower chestpack</English>
</Key>
<Key ID="STR_BOCR_Main_cutLoweringLine">
<Original>Cut Lowering Line</Original>
<English>Cut Lowering Line</Original>
</Key>
</Package>
</Project>
3 changes: 0 additions & 3 deletions addons/main/XEH_PREP.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
PREP(ace_arsenal_onButtonClick);
PREP(ace_arsenal_opened);
PREP(ace_arsenal_updateUI);
PREP(actionCutLoweringLine);
PREP(actionLower);
PREP(actionOnBack);
Expand Down
2 changes: 2 additions & 0 deletions addons/main/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ class CfgPatches {
#include "CfgModuleCategories.hpp"
#include "CfgVehicles.hpp"
#include "CfgFunctions.hpp"

#include "ACE_Arsenal_Actions.hpp"
42 changes: 0 additions & 42 deletions addons/main/functions/fnc_ace_arsenal_onButtonClick.sqf

This file was deleted.

47 changes: 0 additions & 47 deletions addons/main/functions/fnc_ace_arsenal_opened.sqf

This file was deleted.

Loading

0 comments on commit 8e04adf

Please sign in to comment.