Skip to content

Commit

Permalink
Merge branch 'master' into useCompileScriptInCacheCode
Browse files Browse the repository at this point in the history
  • Loading branch information
PabstMirror committed Aug 17, 2023
2 parents da09eea + 263286f commit 08ad3a5
Show file tree
Hide file tree
Showing 103 changed files with 2,733 additions and 288 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/pboproject.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: pboProject

on:
push:
branches:
- master
pull_request_target:

jobs:
pboproject:
runs-on: windows-2019
steps:
- name: Install Arma 3 Tools
uses: arma-actions/arma3-tools@master
with:
toolsUrl: ${{ secrets.ARMA3_TOOLS_URL }}
- name: Install Mikero Tools
uses: arma-actions/mikero-tools@2021-11-06
- name: Download game data
run: |
Invoke-WebRequest "$env:ARMA3_DATA_URL" -OutFile arma3.zip
$files = @("arma3.zip")
ForEach ($file in $files) {
Extract-7Zip -Path $file -DestinationPath .
Remove-Item $file
}
env:
ARMA3_DATA_URL: ${{ secrets.ARMA3_DATA_URL }}
- name: Checkout CBA A3
uses: actions/checkout@v2
with:
path: x\cba
persist-credentials: false
- name: Checkout pull request
uses: actions/checkout@v2
if: ${{ github.event_name == 'pull_request_target' }}
with:
path: pullrequest
ref: 'refs/pull/${{ github.event.number }}/merge'
- name: Replace addons with pull request addons
if: ${{ github.event_name == 'pull_request_target' }}
run: |
rm -r x\cba\addons\
rm -r x\cba\optionals\
xcopy /e /h /q pullrequest\addons x\cba\addons\
xcopy /e /h /q pullrequest\optionals x\cba\optionals\
- name: Setup build environment
run: |
subst P: .
pboproject -P
- name: Build
run: py P:\x\cba\tools\make.py ci
env:
PYTHONUNBUFFERED: 1
- name: Archive logs
uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: logs
path: temp/*.log
- name: Archive @cba_a3
uses: actions/upload-artifact@v2
with:
name: '@cba_a3-${{ github.sha }}'
path: x\cba\release\@cba_a3
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Thumbs.db
*.log
/store/function_library/*
/store/wiki/*
.vscode/*

*.7z

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Community Base Addons
[![](https://img.shields.io/travis/CBATeam/CBA_A3.svg?style=flat-square)](https://travis-ci.org/CBATeam/CBA_A3)
[![](https://img.shields.io/badge/Changelog-Link-orange.svg?style=flat-square)](https://github.com/CBATeam/CBA_A3/releases/latest)
[![](https://img.shields.io/badge/Release-3.15.3-blue.svg?style=flat-square)](https://github.com/CBATeam/CBA_A3/releases/latest)
[![](https://img.shields.io/badge/Release-3.15.8-blue.svg?style=flat-square)](https://github.com/CBATeam/CBA_A3/releases/latest)
[![](https://img.shields.io/badge/Github-Wiki-lightgrey.svg?style=flat-square)](https://github.com/CBATeam/CBA_A3/wiki)
[![](https://img.shields.io/badge/BIF-Thread-lightgrey.svg?style=flat-square)](https://forums.bistudio.com/topic/168277-cba-community-base-addons-arma-3)
[![](https://img.shields.io/badge/Function-Documentation-yellow.svg?style=flat-square)](https://cbateam.github.io/CBA_A3/docs/files/overview-txt.html)
Expand Down
4 changes: 2 additions & 2 deletions addons/accessory/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if (!hasInterface) exitWith {};
}, {}, [DIK_SUBTRACT, [true, false, false]]] call CBA_fnc_addKeybind;

[
"##AccessoryPointer", "ALL", [LSTRING(railNext), LSTRING(railNext_tooltip)], nil, nil, {
"##AccessoryPointer", "POINTER", [LSTRING(railNext), LSTRING(railNext_tooltip)], nil, nil, {
params ["", "", "_item"];
count (_item call CBA_fnc_switchableAttachments) > 1 // return
}, {
Expand All @@ -31,7 +31,7 @@ if (!hasInterface) exitWith {};
] call CBA_fnc_addItemContextMenuOption;

[
"##AccessorySights", "ALL", [LSTRING(opticNext), LSTRING(opticNext_tooltip)], nil, nil, {
"##AccessorySights", "OPTIC", [LSTRING(opticNext), LSTRING(opticNext_tooltip)], nil, nil, {
params ["", "", "_item"];
count (_item call CBA_fnc_switchableAttachments) > 1 // return
}, {
Expand Down
3 changes: 2 additions & 1 deletion addons/accessory/fnc_switchAttachment.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Description:
Switches weapon accessories for the player.
Parameters:
0: _itemType - Attachment type (0: muzzle, 1: rail, 2: optic). <NUMBER>
0: _itemType - Attachment type (0: muzzle, 1: rail, 2: optic, 3: bipod). <NUMBER>
1: _switchTo - Switch to "next" or "prev" attachement <STRING>
Returns:
Expand All @@ -23,6 +23,7 @@ Author:
---------------------------------------------------------------------------- */

params ["_itemType", "_switchTo"];
if (!isNull curatorCamera) exitWith {};

private ["_currItem", "_switchItem"];
private _unit = call CBA_fnc_currentUnit;
Expand Down
11 changes: 10 additions & 1 deletion addons/accessory/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<Turkish>Community Base Addons - Aksesuar Fonksiyonları</Turkish>
<Italian>Community Base Addons - Funzioni per Accessori</Italian>
<Czech>Community Base Addons - Funkce doplňků</Czech>
<Korean>커뮤니티 베이스 애드온 - 부착물 기능</Korean>
</Key>
<Key ID="STR_CBA_accessory_railNext">
<English>Next rail item state</English>
Expand All @@ -26,6 +27,7 @@
<Turkish>Sonraki ray aksesuarı</Turkish>
<Italian>Stato successivo dell'oggetto sulla slitta</Italian>
<Czech>Další režim doplňku na liště</Czech>
<Korean>다음 레일 아이템 상태</Korean>
</Key>
<Key ID="STR_CBA_accessory_railNext_tooltip">
<English>Cycles to the next mode available for your rail slot attachment</English>
Expand All @@ -39,6 +41,7 @@
<Turkish>Ray aksesuarınızı sonraki moda geçirir</Turkish>
<Italian>Passa alla modalità successiva del tuo accessorio sulla slitta</Italian>
<Czech>Přepíná na další možný režim doplňku na liště</Czech>
<Korean>레일 부착물에 이용 가능한 다음 모드로 전환</Korean>
</Key>
<Key ID="STR_CBA_accessory_railPrev">
<English>Prev rail item state</English>
Expand All @@ -52,6 +55,7 @@
<Turkish>Önceki ray aksesuarı</Turkish>
<Italian>Stato precedente dell'oggetto sulla slitta</Italian>
<Czech>Předchozí režim doplňku na liště</Czech>
<Korean>이전 레일 아이템 상태</Korean>
</Key>
<Key ID="STR_CBA_accessory_railPrev_tooltip">
<English>Cycles to the previous mode available for your rail slot attachment</English>
Expand All @@ -65,6 +69,7 @@
<Turkish>Ray aksesuarınızı önceki moda geçirir</Turkish>
<Italian>Passa alla modalità precedente del tuo accessorio sulla slitta</Italian>
<Czech>Přepíná na předchozí možný režim doplňku na liště</Czech>
<Korean>레일 부착물에 이용 가능한 이전 모드로 전환</Korean>
</Key>
<Key ID="STR_CBA_accessory_opticNext">
<English>Next optics state</English>
Expand All @@ -78,6 +83,7 @@
<Turkish>Sonraki nişangah modu</Turkish>
<Italian>Stato successivo dell'ottica</Italian>
<Czech>Další režim zaměřovače</Czech>
<Korean>다음 광학장치 상태</Korean>
</Key>
<Key ID="STR_CBA_accessory_opticNext_tooltip">
<English>Cycles to the next mode available for your optics slot attachment</English>
Expand All @@ -91,6 +97,7 @@
<Turkish>Varolan nişangahınızı sonraki moduna geçirir</Turkish>
<Italian>Passa alla modalità successiva della tua ottica</Italian>
<Czech>Přepíná na další možný režim doplňku slotu pro zaměřovač</Czech>
<Korean>광학장치 부착물에 이용 가능한 다음 모드로 전환</Korean>
</Key>
<Key ID="STR_CBA_accessory_opticPrev">
<English>Prev optics state</English>
Expand All @@ -104,6 +111,7 @@
<Turkish>Önceki nişangah modu</Turkish>
<Italian>Stato precedente dell'ottica</Italian>
<Czech>Předchozí režim zaměřovače</Czech>
<Korean>이전 광학장치 상태</Korean>
</Key>
<Key ID="STR_CBA_accessory_opticPrev_tooltip">
<English>Cycles to the previous mode available for your optics slot attachment</English>
Expand All @@ -115,8 +123,9 @@
<Polish>Przełącza na poprzedni dostępny tryb optyki</Polish>
<French>Basculer sur le mode précédent de l'optique.</French>
<Turkish>Varolan nişangahınızı önceki moduna geçirir</Turkish>
<Italian>Passa alla modalità precedenta della tua ottica</Italian>
<Italian>Passa alla modalità precedente della tua ottica</Italian>
<Czech>Přepíná na předchozí možný režim doplňku slotu pro zaměřovač</Czech>
<Korean>광학장치 부착물에 이용 가능한 이전 모드로 전환</Korean>
</Key>
</Package>
</Project>
1 change: 1 addition & 0 deletions addons/ai/fnc_searchNearby.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ if ((leader _group) distanceSqr _building > 250e3) exitwith {};
sleep 2;
};
} forEach _units;
sleep 0.25;
};
_group lockWP false;
};
26 changes: 21 additions & 5 deletions addons/ai/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
<German>Community Base Addons - Künstliche Intelligenz</German>
<Japanese>Community Base Addons - 人工知能</Japanese>
<Chinese>社群基礎模組 - 人工智能</Chinese>
<Chinesesimp>社群基础模组 - 人工智能</Chinesesimp>
<Chinesesimp>社群基础模组 - AI</Chinesesimp>
<Russian>Community Base Addons - Искуственный Интеллект</Russian>
<French>Community Base Addons - Intelligence artificielle</French>
<Polish>Community Base Addons - Sztuczna Inteligencja</Polish>
<Turkish>Community Base Addons - Yapay Zeka</Turkish>
<Italian>Community Base Addons - Intelligenza Artificiale</Italian>
<Czech>Community Base Addons - Umělá inteligence</Czech>
<Korean>커뮤니티 베이스 애드온- 인공지능</Korean>
</Key>
<Key ID="STR_CBA_AI_BuildingPos">
<English>AI Building Position</English>
Expand All @@ -21,35 +22,50 @@
<Turkish>AI Bina Pozisyonu</Turkish>
<Japanese>AI の建物内での位置</Japanese>
<Chinese>AI在建築物內位置</Chinese>
<Chinesesimp>AI在建筑内部位置</Chinesesimp>
<French>Position IA bâtiment</French>
<Russian>ИИ Место строительства</Russian>
<Polish>Pozycja AI w budynku</Polish>
<Italian>Posizione edificio AI</Italian>
<Korean>인공지능 건물 위치</Korean>
</Key>
<Key ID="STR_CBA_AI_InvisibleTargetSoldier">
<English>Invisible Target Soldier</English>
<German>Unsichtbares Ziel - Soldat</German>
<Chinese>隱形目標士兵</Chinese>
<Chinese>隱形目標(士兵)</Chinese>
<French>Cible invisible - Soldat</French>
<Spanish>Soldado objetivo invisible</Spanish>
<Italian>Soldato obiettivo invisibile</Italian>
<Italian>Obiettivo invisibile - Soldato</Italian>
<Polish>Żołnierz - niewidoczny cel</Polish>
<Russian>Невидимая цель - солдат</Russian>
<Czech>Neviditelný cíl (voják)</Czech>
<Czech>Neviditelný cíl (Voják)</Czech>
<Portuguese>Soldado alvo invisível</Portuguese>
<Korean>보이지 않는 표적 병사</Korean>
<Chinesesimp>看不见的目标士兵</Chinesesimp>
<Chinesesimp>隐形目标(士兵)</Chinesesimp>
<Japanese>隠れた標的兵士</Japanese>
<Turkish>Görünmez Hedef Asker</Turkish>
</Key>
<Key ID="STR_CBA_AI_InvisibleTargetVehicle">
<English>Invisible Target Vehicle</English>
<German>Unsichtbares Ziel - Fahrzeug</German>
<French>Cible invisible - Véhicule</French>
<Polish>Pojazd - niewidoczny cel</Polish>
<Chinese>隱形目標(車輛)</Chinese>
<Chinesesimp>隐形目标(车辆)</Chinesesimp>
<Czech>Neviditelný cíl (Vozidlo)</Czech>
<Italian>Obiettivo invisibile - Veicolo</Italian>
<Korean>보이지 않는 표적 차량</Korean>
</Key>
<Key ID="STR_CBA_AI_InvisibleTargetAir">
<English>Invisible Target Airplane</English>
<German>Unsichtbares Ziel - Flugzeug</German>
<French>Cible invisible - Avion</French>
<Polish>Samolot - niewidoczny cel</Polish>
<Chinese>隱形目標(飛機)</Chinese>
<Chinesesimp>隐形目标(飞机)</Chinesesimp>
<Czech>Neviditelný cíl (Letoun)</Czech>
<Italian>Obiettivo invisibile - Velivolo</Italian>
<Korean>보이지 않는 표적 항공기</Korean>
</Key>
</Package>
</Project>
1 change: 1 addition & 0 deletions addons/arrays/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<Turkish>Community Base Addons - Diziler</Turkish>
<Italian>Community Base Addons - Array</Italian>
<Czech>Community Base Addons - Pole</Czech>
<Korean>커뮤니티 베이스 애드온 - 어레이</Korean>
</Key>
</Package>
</Project>
10 changes: 10 additions & 0 deletions addons/characters/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,21 @@
<English>Community Base Addons - Characters</English>
<German>Community Base Addons - Charaktere</German>
<French>Community Base Addons - Personnages</French>
<Polish>Community Base Addons - Postacie</Polish>
<Chinese>社區基礎插件 - 角色</Chinese>
<Chinesesimp>社区基础插件-角色</Chinesesimp>
<Italian>Community Base Addons - Personaggi</Italian>
<Korean>커뮤니티 베이스 애드온 - 캐릭터</Korean>
</Key>
<Key ID="STR_CBA_Characters_MenMalariaInfected">
<English>Men (Malaria-Infected)</English>
<German>Männer (Malaria infiziert)</German>
<French>Hommes (Infectés par la malaria)</French>
<Polish>Ludzie (Zainfekowani malarią)</Polish>
<Chinese>男子(瘧疾感染者)</Chinese>
<Chinesesimp>男子(疟疾感染者)</Chinesesimp>
<Italian>Uomo (Infetto da malaria)</Italian>
<Korean>사람(말라리아 감염)</Korean>
</Key>
</Package>
</Project>
8 changes: 7 additions & 1 deletion addons/common/Cfg3DEN.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ class Cfg3DEN {
class Init {
class Attributes {
class Callsign {
expression = "[_this, _value] call CBA_fnc_setCallsign";
expression = "\
if (isNil 'CBA_fnc_setCallsign') then {\
_this setGroupID [_value];\
} else {\
[_this, _value] call CBA_fnc_setCallsign;\
};\
";
};
};
};
Expand Down
6 changes: 6 additions & 0 deletions addons/common/CfgFunctions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ class CfgFunctions {
PATHTO_FNC(getNearestBuilding);
};

class DateTime {
PATHTO_FNC(weekDay);
};

class Misc {
PATHTO_FNC(addPerFrameHandler);
PATHTO_FNC(removePerFrameHandler);
Expand All @@ -127,9 +131,11 @@ class CfgFunctions {
PATHTO_FNC(directCall);
PATHTO_FNC(objectRandom);
PATHTO_FNC(execNextFrame);
PATHTO_FNC(execAfterNFrames);
PATHTO_FNC(waitAndExecute);
PATHTO_FNC(waitUntilAndExecute);
PATHTO_FNC(compileFinal);
PATHTO_FNC(createUUID);
};

class Broken {
Expand Down
21 changes: 13 additions & 8 deletions addons/common/fnc_addItem.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Description:
Parameters:
_unit - the unit <OBJECT>
_item - name of the weapon to add <STRING>
_verify - if true, then put item on the ground if it can't be added <BOOLEAN>
_verify - if true, then put item in vehicle or on the ground if it can't be added <BOOLEAN>
Returns:
true on success, false otherwise <BOOLEAN>
Expand Down Expand Up @@ -52,16 +52,21 @@ if (_verify) then {
_unit addItem _item;
_return = true;
} else {
_unit switchMove "ainvpknlmstpslaywrfldnon_1";
private _vehicle = vehicle _unit;
if (_vehicle isEqualTo _unit) then {
_unit switchMove "ainvpknlmstpslaywrfldnon_1";

private _weaponHolder = nearestObject [_unit, "WeaponHolder"];
private _weaponHolder = nearestObject [_unit, "WeaponHolder"];

if (isNull _weaponHolder || {_unit distance _weaponHolder > 2}) then {
_weaponHolder = createVehicle ["GroundWeaponHolder", [0,0,0], [], 0, "NONE"];
_weaponHolder setPosASL getPosASL _unit;
};
if (isNull _weaponHolder || {_unit distance _weaponHolder > 2}) then {
_weaponHolder = createVehicle ["GroundWeaponHolder", [0,0,0], [], 0, "NONE"];
_weaponHolder setPosASL getPosASL _unit;
};

[_weaponHolder, _item] call CBA_fnc_addItemCargo;
[_weaponHolder, _item, 1, _verify] call CBA_fnc_addItemCargo;
} else {
[_vehicle, _item, 1, _verify] call CBA_fnc_addItemCargo;
};
};
} else {
_unit addItem _item;
Expand Down
Loading

0 comments on commit 08ad3a5

Please sign in to comment.