Skip to content

Commit 08ad3a5

Browse files
committed
Merge branch 'master' into useCompileScriptInCacheCode
2 parents da09eea + 263286f commit 08ad3a5

File tree

103 files changed

+2733
-288
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+2733
-288
lines changed

.github/workflows/pboproject.yml

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: pboProject
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request_target:
8+
9+
jobs:
10+
pboproject:
11+
runs-on: windows-2019
12+
steps:
13+
- name: Install Arma 3 Tools
14+
uses: arma-actions/arma3-tools@master
15+
with:
16+
toolsUrl: ${{ secrets.ARMA3_TOOLS_URL }}
17+
- name: Install Mikero Tools
18+
uses: arma-actions/mikero-tools@2021-11-06
19+
- name: Download game data
20+
run: |
21+
Invoke-WebRequest "$env:ARMA3_DATA_URL" -OutFile arma3.zip
22+
$files = @("arma3.zip")
23+
ForEach ($file in $files) {
24+
Extract-7Zip -Path $file -DestinationPath .
25+
Remove-Item $file
26+
}
27+
env:
28+
ARMA3_DATA_URL: ${{ secrets.ARMA3_DATA_URL }}
29+
- name: Checkout CBA A3
30+
uses: actions/checkout@v2
31+
with:
32+
path: x\cba
33+
persist-credentials: false
34+
- name: Checkout pull request
35+
uses: actions/checkout@v2
36+
if: ${{ github.event_name == 'pull_request_target' }}
37+
with:
38+
path: pullrequest
39+
ref: 'refs/pull/${{ github.event.number }}/merge'
40+
- name: Replace addons with pull request addons
41+
if: ${{ github.event_name == 'pull_request_target' }}
42+
run: |
43+
rm -r x\cba\addons\
44+
rm -r x\cba\optionals\
45+
xcopy /e /h /q pullrequest\addons x\cba\addons\
46+
xcopy /e /h /q pullrequest\optionals x\cba\optionals\
47+
- name: Setup build environment
48+
run: |
49+
subst P: .
50+
pboproject -P
51+
- name: Build
52+
run: py P:\x\cba\tools\make.py ci
53+
env:
54+
PYTHONUNBUFFERED: 1
55+
- name: Archive logs
56+
uses: actions/upload-artifact@v2
57+
if: ${{ always() }}
58+
with:
59+
name: logs
60+
path: temp/*.log
61+
- name: Archive @cba_a3
62+
uses: actions/upload-artifact@v2
63+
with:
64+
name: '@cba_a3-${{ github.sha }}'
65+
path: x\cba\release\@cba_a3

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Thumbs.db
1616
*.log
1717
/store/function_library/*
1818
/store/wiki/*
19+
.vscode/*
1920

2021
*.7z
2122

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Community Base Addons
22
[![](https://img.shields.io/travis/CBATeam/CBA_A3.svg?style=flat-square)](https://travis-ci.org/CBATeam/CBA_A3)
33
[![](https://img.shields.io/badge/Changelog-Link-orange.svg?style=flat-square)](https://github.com/CBATeam/CBA_A3/releases/latest)
4-
[![](https://img.shields.io/badge/Release-3.15.3-blue.svg?style=flat-square)](https://github.com/CBATeam/CBA_A3/releases/latest)
4+
[![](https://img.shields.io/badge/Release-3.15.8-blue.svg?style=flat-square)](https://github.com/CBATeam/CBA_A3/releases/latest)
55
[![](https://img.shields.io/badge/Github-Wiki-lightgrey.svg?style=flat-square)](https://github.com/CBATeam/CBA_A3/wiki)
66
[![](https://img.shields.io/badge/BIF-Thread-lightgrey.svg?style=flat-square)](https://forums.bistudio.com/topic/168277-cba-community-base-addons-arma-3)
77
[![](https://img.shields.io/badge/Function-Documentation-yellow.svg?style=flat-square)](https://cbateam.github.io/CBA_A3/docs/files/overview-txt.html)

addons/accessory/XEH_preInit.sqf

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ if (!hasInterface) exitWith {};
2121
}, {}, [DIK_SUBTRACT, [true, false, false]]] call CBA_fnc_addKeybind;
2222

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

3333
[
34-
"##AccessorySights", "ALL", [LSTRING(opticNext), LSTRING(opticNext_tooltip)], nil, nil, {
34+
"##AccessorySights", "OPTIC", [LSTRING(opticNext), LSTRING(opticNext_tooltip)], nil, nil, {
3535
params ["", "", "_item"];
3636
count (_item call CBA_fnc_switchableAttachments) > 1 // return
3737
}, {

addons/accessory/fnc_switchAttachment.sqf

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Description:
66
Switches weapon accessories for the player.
77
88
Parameters:
9-
0: _itemType - Attachment type (0: muzzle, 1: rail, 2: optic). <NUMBER>
9+
0: _itemType - Attachment type (0: muzzle, 1: rail, 2: optic, 3: bipod). <NUMBER>
1010
1: _switchTo - Switch to "next" or "prev" attachement <STRING>
1111
1212
Returns:
@@ -23,6 +23,7 @@ Author:
2323
---------------------------------------------------------------------------- */
2424

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

2728
private ["_currItem", "_switchItem"];
2829
private _unit = call CBA_fnc_currentUnit;

addons/accessory/stringtable.xml

+10-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<Turkish>Community Base Addons - Aksesuar Fonksiyonları</Turkish>
1414
<Italian>Community Base Addons - Funzioni per Accessori</Italian>
1515
<Czech>Community Base Addons - Funkce doplňků</Czech>
16+
<Korean>커뮤니티 베이스 애드온 - 부착물 기능</Korean>
1617
</Key>
1718
<Key ID="STR_CBA_accessory_railNext">
1819
<English>Next rail item state</English>
@@ -26,6 +27,7 @@
2627
<Turkish>Sonraki ray aksesuarı</Turkish>
2728
<Italian>Stato successivo dell'oggetto sulla slitta</Italian>
2829
<Czech>Další režim doplňku na liště</Czech>
30+
<Korean>다음 레일 아이템 상태</Korean>
2931
</Key>
3032
<Key ID="STR_CBA_accessory_railNext_tooltip">
3133
<English>Cycles to the next mode available for your rail slot attachment</English>
@@ -39,6 +41,7 @@
3941
<Turkish>Ray aksesuarınızı sonraki moda geçirir</Turkish>
4042
<Italian>Passa alla modalità successiva del tuo accessorio sulla slitta</Italian>
4143
<Czech>Přepíná na další možný režim doplňku na liště</Czech>
44+
<Korean>레일 부착물에 이용 가능한 다음 모드로 전환</Korean>
4245
</Key>
4346
<Key ID="STR_CBA_accessory_railPrev">
4447
<English>Prev rail item state</English>
@@ -52,6 +55,7 @@
5255
<Turkish>Önceki ray aksesuarı</Turkish>
5356
<Italian>Stato precedente dell'oggetto sulla slitta</Italian>
5457
<Czech>Předchozí režim doplňku na liště</Czech>
58+
<Korean>이전 레일 아이템 상태</Korean>
5559
</Key>
5660
<Key ID="STR_CBA_accessory_railPrev_tooltip">
5761
<English>Cycles to the previous mode available for your rail slot attachment</English>
@@ -65,6 +69,7 @@
6569
<Turkish>Ray aksesuarınızı önceki moda geçirir</Turkish>
6670
<Italian>Passa alla modalità precedente del tuo accessorio sulla slitta</Italian>
6771
<Czech>Přepíná na předchozí možný režim doplňku na liště</Czech>
72+
<Korean>레일 부착물에 이용 가능한 이전 모드로 전환</Korean>
6873
</Key>
6974
<Key ID="STR_CBA_accessory_opticNext">
7075
<English>Next optics state</English>
@@ -78,6 +83,7 @@
7883
<Turkish>Sonraki nişangah modu</Turkish>
7984
<Italian>Stato successivo dell'ottica</Italian>
8085
<Czech>Další režim zaměřovače</Czech>
86+
<Korean>다음 광학장치 상태</Korean>
8187
</Key>
8288
<Key ID="STR_CBA_accessory_opticNext_tooltip">
8389
<English>Cycles to the next mode available for your optics slot attachment</English>
@@ -91,6 +97,7 @@
9197
<Turkish>Varolan nişangahınızı sonraki moduna geçirir</Turkish>
9298
<Italian>Passa alla modalità successiva della tua ottica</Italian>
9399
<Czech>Přepíná na další možný režim doplňku slotu pro zaměřovač</Czech>
100+
<Korean>광학장치 부착물에 이용 가능한 다음 모드로 전환</Korean>
94101
</Key>
95102
<Key ID="STR_CBA_accessory_opticPrev">
96103
<English>Prev optics state</English>
@@ -104,6 +111,7 @@
104111
<Turkish>Önceki nişangah modu</Turkish>
105112
<Italian>Stato precedente dell'ottica</Italian>
106113
<Czech>Předchozí režim zaměřovače</Czech>
114+
<Korean>이전 광학장치 상태</Korean>
107115
</Key>
108116
<Key ID="STR_CBA_accessory_opticPrev_tooltip">
109117
<English>Cycles to the previous mode available for your optics slot attachment</English>
@@ -115,8 +123,9 @@
115123
<Polish>Przełącza na poprzedni dostępny tryb optyki</Polish>
116124
<French>Basculer sur le mode précédent de l'optique.</French>
117125
<Turkish>Varolan nişangahınızı önceki moduna geçirir</Turkish>
118-
<Italian>Passa alla modalità precedenta della tua ottica</Italian>
126+
<Italian>Passa alla modalità precedente della tua ottica</Italian>
119127
<Czech>Přepíná na předchozí možný režim doplňku slotu pro zaměřovač</Czech>
128+
<Korean>광학장치 부착물에 이용 가능한 이전 모드로 전환</Korean>
120129
</Key>
121130
</Package>
122131
</Project>

addons/ai/fnc_searchNearby.sqf

+1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ if ((leader _group) distanceSqr _building > 250e3) exitwith {};
6666
sleep 2;
6767
};
6868
} forEach _units;
69+
sleep 0.25;
6970
};
7071
_group lockWP false;
7172
};

addons/ai/stringtable.xml

+21-5
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@
66
<German>Community Base Addons - Künstliche Intelligenz</German>
77
<Japanese>Community Base Addons - 人工知能</Japanese>
88
<Chinese>社群基礎模組 - 人工智能</Chinese>
9-
<Chinesesimp>社群基础模组 - 人工智能</Chinesesimp>
9+
<Chinesesimp>社群基础模组 - AI</Chinesesimp>
1010
<Russian>Community Base Addons - Искуственный Интеллект</Russian>
1111
<French>Community Base Addons - Intelligence artificielle</French>
1212
<Polish>Community Base Addons - Sztuczna Inteligencja</Polish>
1313
<Turkish>Community Base Addons - Yapay Zeka</Turkish>
1414
<Italian>Community Base Addons - Intelligenza Artificiale</Italian>
1515
<Czech>Community Base Addons - Umělá inteligence</Czech>
16+
<Korean>커뮤니티 베이스 애드온- 인공지능</Korean>
1617
</Key>
1718
<Key ID="STR_CBA_AI_BuildingPos">
1819
<English>AI Building Position</English>
@@ -21,35 +22,50 @@
2122
<Turkish>AI Bina Pozisyonu</Turkish>
2223
<Japanese>AI の建物内での位置</Japanese>
2324
<Chinese>AI在建築物內位置</Chinese>
25+
<Chinesesimp>AI在建筑内部位置</Chinesesimp>
2426
<French>Position IA bâtiment</French>
2527
<Russian>ИИ Место строительства</Russian>
2628
<Polish>Pozycja AI w budynku</Polish>
29+
<Italian>Posizione edificio AI</Italian>
30+
<Korean>인공지능 건물 위치</Korean>
2731
</Key>
2832
<Key ID="STR_CBA_AI_InvisibleTargetSoldier">
2933
<English>Invisible Target Soldier</English>
3034
<German>Unsichtbares Ziel - Soldat</German>
31-
<Chinese>隱形目標士兵</Chinese>
35+
<Chinese>隱形目標(士兵)</Chinese>
3236
<French>Cible invisible - Soldat</French>
3337
<Spanish>Soldado objetivo invisible</Spanish>
34-
<Italian>Soldato obiettivo invisibile</Italian>
38+
<Italian>Obiettivo invisibile - Soldato</Italian>
3539
<Polish>Żołnierz - niewidoczny cel</Polish>
3640
<Russian>Невидимая цель - солдат</Russian>
37-
<Czech>Neviditelný cíl (voják)</Czech>
41+
<Czech>Neviditelný cíl (Voják)</Czech>
3842
<Portuguese>Soldado alvo invisível</Portuguese>
3943
<Korean>보이지 않는 표적 병사</Korean>
40-
<Chinesesimp>看不见的目标士兵</Chinesesimp>
44+
<Chinesesimp>隐形目标(士兵)</Chinesesimp>
4145
<Japanese>隠れた標的兵士</Japanese>
4246
<Turkish>Görünmez Hedef Asker</Turkish>
4347
</Key>
4448
<Key ID="STR_CBA_AI_InvisibleTargetVehicle">
4549
<English>Invisible Target Vehicle</English>
4650
<German>Unsichtbares Ziel - Fahrzeug</German>
4751
<French>Cible invisible - Véhicule</French>
52+
<Polish>Pojazd - niewidoczny cel</Polish>
53+
<Chinese>隱形目標(車輛)</Chinese>
54+
<Chinesesimp>隐形目标(车辆)</Chinesesimp>
55+
<Czech>Neviditelný cíl (Vozidlo)</Czech>
56+
<Italian>Obiettivo invisibile - Veicolo</Italian>
57+
<Korean>보이지 않는 표적 차량</Korean>
4858
</Key>
4959
<Key ID="STR_CBA_AI_InvisibleTargetAir">
5060
<English>Invisible Target Airplane</English>
5161
<German>Unsichtbares Ziel - Flugzeug</German>
5262
<French>Cible invisible - Avion</French>
63+
<Polish>Samolot - niewidoczny cel</Polish>
64+
<Chinese>隱形目標(飛機)</Chinese>
65+
<Chinesesimp>隐形目标(飞机)</Chinesesimp>
66+
<Czech>Neviditelný cíl (Letoun)</Czech>
67+
<Italian>Obiettivo invisibile - Velivolo</Italian>
68+
<Korean>보이지 않는 표적 항공기</Korean>
5369
</Key>
5470
</Package>
5571
</Project>

addons/arrays/stringtable.xml

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<Turkish>Community Base Addons - Diziler</Turkish>
1414
<Italian>Community Base Addons - Array</Italian>
1515
<Czech>Community Base Addons - Pole</Czech>
16+
<Korean>커뮤니티 베이스 애드온 - 어레이</Korean>
1617
</Key>
1718
</Package>
1819
</Project>

addons/characters/stringtable.xml

+10
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,21 @@
55
<English>Community Base Addons - Characters</English>
66
<German>Community Base Addons - Charaktere</German>
77
<French>Community Base Addons - Personnages</French>
8+
<Polish>Community Base Addons - Postacie</Polish>
9+
<Chinese>社區基礎插件 - 角色</Chinese>
10+
<Chinesesimp>社区基础插件-角色</Chinesesimp>
11+
<Italian>Community Base Addons - Personaggi</Italian>
12+
<Korean>커뮤니티 베이스 애드온 - 캐릭터</Korean>
813
</Key>
914
<Key ID="STR_CBA_Characters_MenMalariaInfected">
1015
<English>Men (Malaria-Infected)</English>
1116
<German>Männer (Malaria infiziert)</German>
1217
<French>Hommes (Infectés par la malaria)</French>
18+
<Polish>Ludzie (Zainfekowani malarią)</Polish>
19+
<Chinese>男子(瘧疾感染者)</Chinese>
20+
<Chinesesimp>男子(疟疾感染者)</Chinesesimp>
21+
<Italian>Uomo (Infetto da malaria)</Italian>
22+
<Korean>사람(말라리아 감염)</Korean>
1323
</Key>
1424
</Package>
1525
</Project>

addons/common/Cfg3DEN.hpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,13 @@ class Cfg3DEN {
2727
class Init {
2828
class Attributes {
2929
class Callsign {
30-
expression = "[_this, _value] call CBA_fnc_setCallsign";
30+
expression = "\
31+
if (isNil 'CBA_fnc_setCallsign') then {\
32+
_this setGroupID [_value];\
33+
} else {\
34+
[_this, _value] call CBA_fnc_setCallsign;\
35+
};\
36+
";
3137
};
3238
};
3339
};

addons/common/CfgFunctions.hpp

+6
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ class CfgFunctions {
114114
PATHTO_FNC(getNearestBuilding);
115115
};
116116

117+
class DateTime {
118+
PATHTO_FNC(weekDay);
119+
};
120+
117121
class Misc {
118122
PATHTO_FNC(addPerFrameHandler);
119123
PATHTO_FNC(removePerFrameHandler);
@@ -127,9 +131,11 @@ class CfgFunctions {
127131
PATHTO_FNC(directCall);
128132
PATHTO_FNC(objectRandom);
129133
PATHTO_FNC(execNextFrame);
134+
PATHTO_FNC(execAfterNFrames);
130135
PATHTO_FNC(waitAndExecute);
131136
PATHTO_FNC(waitUntilAndExecute);
132137
PATHTO_FNC(compileFinal);
138+
PATHTO_FNC(createUUID);
133139
};
134140

135141
class Broken {

addons/common/fnc_addItem.sqf

+13-8
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Description:
1111
Parameters:
1212
_unit - the unit <OBJECT>
1313
_item - name of the weapon to add <STRING>
14-
_verify - if true, then put item on the ground if it can't be added <BOOLEAN>
14+
_verify - if true, then put item in vehicle or on the ground if it can't be added <BOOLEAN>
1515
1616
Returns:
1717
true on success, false otherwise <BOOLEAN>
@@ -52,16 +52,21 @@ if (_verify) then {
5252
_unit addItem _item;
5353
_return = true;
5454
} else {
55-
_unit switchMove "ainvpknlmstpslaywrfldnon_1";
55+
private _vehicle = vehicle _unit;
56+
if (_vehicle isEqualTo _unit) then {
57+
_unit switchMove "ainvpknlmstpslaywrfldnon_1";
5658

57-
private _weaponHolder = nearestObject [_unit, "WeaponHolder"];
59+
private _weaponHolder = nearestObject [_unit, "WeaponHolder"];
5860

59-
if (isNull _weaponHolder || {_unit distance _weaponHolder > 2}) then {
60-
_weaponHolder = createVehicle ["GroundWeaponHolder", [0,0,0], [], 0, "NONE"];
61-
_weaponHolder setPosASL getPosASL _unit;
62-
};
61+
if (isNull _weaponHolder || {_unit distance _weaponHolder > 2}) then {
62+
_weaponHolder = createVehicle ["GroundWeaponHolder", [0,0,0], [], 0, "NONE"];
63+
_weaponHolder setPosASL getPosASL _unit;
64+
};
6365

64-
[_weaponHolder, _item] call CBA_fnc_addItemCargo;
66+
[_weaponHolder, _item, 1, _verify] call CBA_fnc_addItemCargo;
67+
} else {
68+
[_vehicle, _item, 1, _verify] call CBA_fnc_addItemCargo;
69+
};
6570
};
6671
} else {
6772
_unit addItem _item;

0 commit comments

Comments
 (0)