Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into release-candidate-3-10
Browse files Browse the repository at this point in the history
  • Loading branch information
ViperMaul committed Mar 9, 2019
2 parents 879b147 + c44e419 commit e88a533
Show file tree
Hide file tree
Showing 31 changed files with 584 additions and 37 deletions.
3 changes: 3 additions & 0 deletions addons/ai/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ class CfgVehicles {
class B_TargetSoldier;
class CBA_B_InvisibleTarget: B_TargetSoldier {
scope = 2;
scopeArsenal = 0;
model = QPATHTOF(InvisibleTarget.p3d);
icon = "CBA_iconInvisibleTarget";

Expand All @@ -11,6 +12,7 @@ class CfgVehicles {
class O_TargetSoldier;
class CBA_O_InvisibleTarget: O_TargetSoldier {
scope = 2;
scopeArsenal = 0;
model = QPATHTOF(InvisibleTarget.p3d);
icon = "CBA_iconInvisibleTarget";

Expand All @@ -20,6 +22,7 @@ class CfgVehicles {
class I_TargetSoldier;
class CBA_I_InvisibleTarget: I_TargetSoldier {
scope = 2;
scopeArsenal = 0;
model = QPATHTOF(InvisibleTarget.p3d);
icon = "CBA_iconInvisibleTarget";

Expand Down
2 changes: 1 addition & 1 deletion addons/common/fnc_getMuzzles.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Returns:
Examples:
(begin example)
_muzzles = "M4A1_RCO_GL" call CBA_fnc_determineMuzzles
_muzzles = "M4A1_RCO_GL" call CBA_fnc_getMuzzles
-> ["M4_ACOG_Muzzle", "M203Muzzle"]
(end)
Expand Down
4 changes: 4 additions & 0 deletions addons/common/init_perFrameHandler.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ GVAR(waitUntilAndExecArray) = [];

// per frame handler system
[QFUNC(onFrame), {
SCRIPT(onFrame);
private _tickTime = diag_tickTime;
call FUNC(missionTimePFH);

Expand Down Expand Up @@ -103,6 +104,7 @@ if (isMultiplayer) then {
if (isServer) then {
// multiplayer server
[QFUNC(missionTimePFH), {
SCRIPT(missionTimePFH_server);
if (time != GVAR(lastTime)) then {
CBA_missionTime = CBA_missionTime + (_tickTime - GVAR(lastTickTime));
GVAR(lastTime) = time; // used to detect paused game
Expand All @@ -126,6 +128,7 @@ if (isMultiplayer) then {
GVAR(lastTickTime) = diag_tickTime; // prevent time skip on clients

[QFUNC(missionTimePFH), {
SCRIPT(missionTimePFH_client);
if (time != GVAR(lastTime)) then {
CBA_missionTime = CBA_missionTime + (_tickTime - GVAR(lastTickTime));
GVAR(lastTime) = time; // used to detect paused game
Expand All @@ -148,6 +151,7 @@ if (isMultiplayer) then {
} else {
// single player
[QFUNC(missionTimePFH), {
SCRIPT(missionTimePFH_sp);
if (time != GVAR(lastTime)) then {
CBA_missionTime = CBA_missionTime + (_tickTime - GVAR(lastTickTime)) * accTime;
GVAR(lastTime) = time; // used to detect paused game
Expand Down
1 change: 1 addition & 0 deletions addons/common/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<French>Vous devez d'abord commencer une mission.</French>
<Polish>Należy najpierw uruchomić misję.</Polish>
<Turkish>Önce bir görev başlatmalısınız.</Turkish>
<Japanese>ミッションを開始しておく必要があります。</Japanese>
</Key>
</Package>
</Project>
23 changes: 18 additions & 5 deletions addons/events/fnc_addPlayerEventHandler.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ if (_id != -1) then {
GVAR(oldLoadout) = [];
GVAR(oldLoadoutNoAmmo) = [];
GVAR(oldVehicle) = objNull;
GVAR(inVehicle) = false;
GVAR(oldTurret) = [];
GVAR(oldVisionMode) = -1;
GVAR(oldCameraView) = "";
Expand All @@ -134,6 +135,7 @@ if (_id != -1) then {

GVAR(playerEHInfo) pushBack addMissionEventHandler ["EachFrame", {call FUNC(playerEH_EachFrame)}];
[QFUNC(playerEH_EachFrame), {
SCRIPT(playerEH_EachFrame);
private _player = missionNamespace getVariable ["bis_fnc_moduleRemoteControl_unit", player];
if !(_player isEqualTo GVAR(oldUnit)) then {
[QGVAR(unitEvent), [_player, GVAR(oldUnit)]] call CBA_fnc_localEvent;
Expand Down Expand Up @@ -184,12 +186,21 @@ if (_id != -1) then {
if !(_data isEqualTo GVAR(oldVehicle)) then {
GVAR(oldVehicle) = _data;
[QGVAR(vehicleEvent), [_player, _data]] call CBA_fnc_localEvent;
GVAR(inVehicle) = _data != _player;
if (!GVAR(inVehicle)) then {
_data = _player call CBA_fnc_turretPath;
if !(_data isEqualTo GVAR(oldTurret)) then {
GVAR(oldTurret) = _data;
[QGVAR(turretEvent), [_player, _data]] call CBA_fnc_localEvent;
};
};
};

_data = _player call CBA_fnc_turretPath;
if !(_data isEqualTo GVAR(oldTurret)) then {
GVAR(oldTurret) = _data;
[QGVAR(turretEvent), [_player, _data]] call CBA_fnc_localEvent;
if (GVAR(inVehicle)) then {
_data = _player call CBA_fnc_turretPath;
if !(_data isEqualTo GVAR(oldTurret)) then {
GVAR(oldTurret) = _data;
[QGVAR(turretEvent), [_player, _data]] call CBA_fnc_localEvent;
};
};

// handle controlling UAV, UAV entity needed for visionMode
Expand Down Expand Up @@ -224,6 +235,7 @@ if (_id != -1) then {

GVAR(playerEHInfo) pushBack addMissionEventHandler ["Map", {call FUNC(playerEH_Map)}];
[QFUNC(playerEH_Map), {
SCRIPT(playerEH_Map);
params ["_data"]; // visibleMap is updated one frame later
if !(_data isEqualTo GVAR(oldVisibleMap)) then {
GVAR(oldVisibleMap) = _data;
Expand All @@ -244,6 +256,7 @@ if (_id != -1) then {
};

GVAR(playerEHInfo) pushBack ([{
SCRIPT(playerEH_featureCamera);
private _data = call CBA_fnc_getActiveFeatureCamera;
if !(_data isEqualTo GVAR(oldFeatureCamera)) then {
GVAR(oldFeatureCamera) = _data;
Expand Down
2 changes: 1 addition & 1 deletion addons/events/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

#define GETOBJ(obj) (if (obj isEqualType grpNull) then {leader obj} else {obj})

#include "\a3\editor_f\Data\Scripts\dikCodes.h"
#include "\a3\ui_f\hpp\defineDIKCodes.inc"

// key handler system
#define MOUSE_OFFSET 0xF0
Expand Down
4 changes: 2 additions & 2 deletions addons/help/XEH_preStart.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ _mods = _mods apply {
if (isText (_entry >> "description")) then {
private _description = getText (_entry >> "description") call CBA_fnc_sanitizeHTML;

_x = _x + format ["<br/>%1", _description];
_x = _x + format ["<br/>%1<br/>", _description];
};
};

_x
};

_mods = _mods joinString "<br/><br/>";
_mods = _mods joinString "<br/>";

uiNamespace setVariable [QGVAR(mods), compileFinal str _mods];
2 changes: 1 addition & 1 deletion addons/jam/CfgWeapons.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class CfgWeapons {
};

class SMG_03_TR_BASE: Rifle_Base_F {
magazineWell[] = {"CBA_57x28_FNP90"};
magazineWell[] = {"CBA_57x28_P90"};
};

class SMG_05_base_F: Rifle_Short_Base_F {
Expand Down
1 change: 1 addition & 0 deletions addons/jam/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<Polish>Community Base Addons - Wspólna Amunicja oraz Magazynki</Polish>
<French>Community Base Addons - Munitions et Chargeurs joints</French>
<Turkish>Community Base Addons - Birleştirilmiş Cephane Şarjörleri</Turkish>
<Japanese>Community Base Addons - 統合的弾倉</Japanese>
</Key>
</Package>
</Project>
21 changes: 21 additions & 0 deletions addons/jam/test.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#define DEBUG_MODE_FULL
#include "script_component.hpp"
// ----------------------------------------------------------------------------
// execVM "x\cba\addons\jam\test.sqf"

LOG("=== Testing Jam ===");

private _wellsChecked = [];
{
private _wpnCfg = _x;
private _xWellArray = getArray (_wpnCfg >> "magazineWell");
{
if ((_wellsChecked pushBackUnique _x) > -1) then {
if (isNull (configFile >> "CfgMagazineWells" >> _x)) then {
diag_log text format ["ERROR: Well [%1] not valid, used in [%2]", _x,configName _wpnCfg];
};
};
} forEach _xWellArray;
} forEach (configProperties [configFile >> "CfgWeapons", "(isClass _x) && {2 == getNumber (_x >> 'scope')}"]);

nil;
4 changes: 2 additions & 2 deletions addons/keybinding/fnc_addKeybind.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Description:
a function with that keybind being pressed.
This file should be included for readable DIK codes:
#include "\a3\editor_f\Data\Scripts\dikCodes.h"
#include "\a3\ui_f\hpp\defineDIKCodes.inc"
Additional DIK codes usable with this function:
0xF0: Left mouse button
Expand Down Expand Up @@ -40,7 +40,7 @@ Returns:
Examples:
(begin example)
// Register a simple keypress to an action
#include "\a3\editor_f\Data\Scripts\dikCodes.h"
#include "\a3\ui_f\hpp\defineDIKCodes.inc"
["MyMod", "MyKey", ["My Pretty Key Name", "My Pretty Tool Tip"], {
_this call mymod_fnc_keyDown
Expand Down
4 changes: 1 addition & 3 deletions addons/main_a3/CfgMods.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ class CfgMods {
class PREFIX {
author = "$STR_CBA_Author";
dir = "@CBA_A3";
name = "Community Base Addons v3.9.1";
name = "Community Base Addons v0.0.0";
picture = "x\cba\addons\main\logo_cba_ca.paa";
hidePicture = 1;
hideName = 1;
actionName = "Website";
action = "$STR_CBA_URL";
description = "Bugtracker: https://github.com/CBATeam/CBA_A3/issues<br/>Documentation: https://github.com/CBATeam/CBA_A3/wiki";
logo = "logo_cba_ca.paa";
logoOver = "logo_cba_ca.paa";
tooltip = "Community Base Addons";
tooltipOwned = "Community Base Addons Owned";
overview = "What does the name Community Base Addons mean? It is a system that offers a range of features for addon-makers and mission designers. This includes a collection of community-built functions, an integrated keybinding system, and extend event-handler support for compatibility with other 3rd-party addons; and much much more.";
Expand Down
5 changes: 4 additions & 1 deletion addons/settings/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,10 @@
#define IS_LOCAL_SETTING(setting) (GVAR(default) getVariable [setting, []] param [7, 0] == 2)

#define SANITIZE_PRIORITY(setting,priority,source) (call {\
private _priority = [0,1,2] select priority;\
private _priority = priority;\
if (_priority isEqualType false) then {\
_priority = parseNumber _priority;\
};\
if (IS_GLOBAL_SETTING(setting) && {source != "mission"}) exitWith {_priority max 1};\
if (IS_LOCAL_SETTING(setting)) exitWith {_priority min 0};\
_priority\
Expand Down
13 changes: 8 additions & 5 deletions addons/settings/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<English>Configure Addons</English>
<German>Modifikationen anpassen</German>
<Polish>Konfiguracja addonów</Polish>
<Japanese>アドオン設定</Japanese>
<Japanese>アドオンの設定</Japanese>
<Chinese>模組設定</Chinese>
<Chinesesimp>模组设定</Chinesesimp>
<Portuguese>Configurar as Extensões</Portuguese>
Expand Down Expand Up @@ -55,6 +55,7 @@
<French>Adjust addon settings.</French>
<Polish>Zmień ustawienia addonów.</Polish>
<Turkish>Eklenti ayarlarını değiştir.</Turkish>
<Japanese>アドオンの設定を調整します。</Japanese>
</Key>
<Key ID="STR_cba_settings_3den_shortcut">
<English>Addon Options...</English>
Expand Down Expand Up @@ -251,7 +252,7 @@
<Key ID="STR_cba_settings_overwrite_clients">
<English>Overwrite\nClients</English>
<German>Clients\nüberschreiben</German>
<Japanese>クライアント側から\n上書き</Japanese>
<Japanese>クライアント側で\n上書き</Japanese>
<Chinese>覆寫\n客戶端</Chinese>
<Chinesesimp>覆写\n客户端</Chinesesimp>
<Portuguese>Sobrescrever \nClientes</Portuguese>
Expand All @@ -263,7 +264,7 @@
<Key ID="STR_cba_settings_overwrite_mission">
<English>Overwrite\nMission</English>
<German>Mission\nüberschreiben</German>
<Japanese>ミッション側から\n上書き</Japanese>
<Japanese>ミッション側で\n上書き</Japanese>
<Chinese>覆寫\n任務</Chinese>
<Chinesesimp>覆写\n任务</Chinesesimp>
<Portuguese>Sobrescrever \nMissão</Portuguese>
Expand All @@ -275,7 +276,7 @@
<Key ID="STR_cba_settings_overwrite_server">
<English>Overwrite\nServer</English>
<German>Server\nüberschreiben</German>
<Japanese>サーバー側から\n上書き</Japanese>
<Japanese>サーバー側で\n上書き</Japanese>
<Chinese>覆寫\n伺服器</Chinese>
<Chinesesimp>覆写\n伺服器</Chinesesimp>
<Portuguese>Sobrescrever \nServidor</Portuguese>
Expand All @@ -290,13 +291,15 @@
<French>Ce paramètre s'applique.</French>
<Polish>To ustawienie dotyczy.</Polish>
<Turkish>Bu ayar geçerli.</Turkish>
<Japanese>設定を適用します。</Japanese>
</Key>
<Key ID="STR_cba_settings_need_restart">
<English>This setting applies after the next mission restart.</English>
<German>Diese Einstellung gilt nach dem nächsten Neustart der Mission.</German>
<French>Ce paramètre s'applique après le prochain redémarrage de la mission.</French>
<Polish>To ustawienie zostanie zastosowanie po restarcie misji.</Polish>
<Turkish>Bu ayar oyun baştan başladıktan sonra geçerli olur.</Turkish>
<Japanese>この設定は次のミッション開始後に適用されます。</Japanese>
</Key>
<Key ID="STR_cba_settings_overwritten_by_client_tooltip">
<English>This setting is overwritten by the clients.</English>
Expand Down Expand Up @@ -363,7 +366,7 @@
<Russian>Показать настройки по умолчанию:</Russian>
<Chinese>顯示預設值:</Chinese>
<Chinesesimp>显示预设值:</Chinesesimp>
<Japanese>標準の変数を表示:</Japanese>
<Japanese>標準値を表示:</Japanese>
<French>Afficher les valeurs par défaut :</French>
<Polish>Pokaż domyślnę wartości:</Polish>
<Turkish>Varsayılan değerleri göster:</Turkish>
Expand Down
6 changes: 6 additions & 0 deletions addons/ui/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,10 @@ class Extended_DisplayLoad_EventHandlers {
class RscDisplayRemoteMissions {
ADDON = QUOTE(_this call (uiNamespace getVariable 'FUNC(initDisplayRemoteMissions)'));
};
class Display3DEN {
ADDON = QUOTE(_this call (uiNamespace getVariable 'FUNC(initDisplay3DEN)'));
};
class RscDisplayCurator {
ADDON = QUOTE(_this call (uiNamespace getVariable 'FUNC(initDisplayCurator)'));
};
};
3 changes: 0 additions & 3 deletions addons/ui/CfgFunctions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ class CfgFunctions {
class flexiMenu_keyUp {
file = QUOTE(PATHTOF(flexiMenu\fnc_keyUp.sqf));
};
class menu {
file = QUOTE(PATHTOF(flexiMenu\fnc_menu.sqf));
};
class flexiMenu_menu {
file = QUOTE(PATHTOF(flexiMenu\fnc_menu.sqf));
};
Expand Down
12 changes: 6 additions & 6 deletions addons/ui/RscDisplayOptionsLayout.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ class RscDisplayOptionsLayout {
class Element021;
class Element022: Element021 {
idc = 12022;
onMouseEnter = "with uinamespace do {['mouseEnter',_this,''] call RscDisplayOptionsLayout_script;};";
onMouseExit = "with uinamespace do {['mouseExit',_this,''] call RscDisplayOptionsLayout_script;};";
onMouseHolding = "with uinamespace do {['mouseMoving',_this,''] call RscDisplayOptionsLayout_script;};";
onMouseMoving = "with uinamespace do {['mouseMoving',_this,''] call RscDisplayOptionsLayout_script;};";
onMouseButtonDown = "with uinamespace do {['mouseButtonDown',_this,''] call RscDisplayOptionsLayout_script;};";
onMouseButtonUp = "with uinamespace do {['mouseButtonUp',_this,''] call RscDisplayOptionsLayout_script;};";
onMouseEnter = "with uiNamespace do {['mouseEnter',_this,''] call RscDisplayOptionsLayout_script;};";
onMouseExit = "with uiNamespace do {['mouseExit',_this,''] call RscDisplayOptionsLayout_script;};";
onMouseHolding = "with uiNamespace do {['mouseMoving',_this,''] call RscDisplayOptionsLayout_script;};";
onMouseMoving = "with uiNamespace do {['mouseMoving',_this,''] call RscDisplayOptionsLayout_script;};";
onMouseButtonDown = "with uiNamespace do {['mouseButtonDown',_this,''] call RscDisplayOptionsLayout_script;};";
onMouseButtonUp = "with uiNamespace do {['mouseButtonUp',_this,''] call RscDisplayOptionsLayout_script;};";
};
#define ADD_ELEMENT(var1) class Element##var1: Element022 {\
idc = __EVAL(12000 + var1);\
Expand Down
16 changes: 16 additions & 0 deletions addons/ui/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,19 @@ if (hasInterface) then {
};
}];
};

// legacy function names
FUNC(Add) = CBA_fnc_flexiMenu_Add;
FUNC(Remove) = CBA_fnc_flexiMenu_Remove;
FUNC(setObjectMenuSource) = CBA_fnc_flexiMenu_setObjectMenuSource;
FUNC(openMenuByDef) = CBA_fnc_flexiMenu_openMenuByDef;
FUNC(keyDown) = CBA_fnc_flexiMenu_keyDown;
FUNC(keyUp) = CBA_fnc_flexiMenu_keyUp;
FUNC(menu) = CBA_fnc_flexiMenu_menu;
FUNC(list) = CBA_fnc_flexiMenu_list;
FUNC(getMenuDef) = CBA_fnc_flexiMenu_getMenuDef;
FUNC(getMenuOption) = CBA_fnc_flexiMenu_getMenuOption;
FUNC(menuShortcut) = CBA_fnc_flexiMenu_menuShortcut;
FUNC(mouseButtonDown) = CBA_fnc_flexiMenu_mouseButtonDown;
FUNC(highlightCaretKey) = CBA_fnc_flexiMenu_highlightCaretKey;
FUNC(execute) = CBA_fnc_flexiMenu_execute;
7 changes: 7 additions & 0 deletions addons/ui/XEH_preStart.sqf
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
#include "script_component.hpp"

if (!hasInterface) exitWith {};

PREP(initDisplayInterrupt);
PREP(initDisplayMultiplayerSetup);
PREP(initDisplayOptionsLayout);
PREP(initDisplayPassword);
PREP(initDisplayRemoteMissions);
PREP(initDisplay3DEN);
PREP(initDisplayCurator);

PREP(preload3DEN);
PREP(preloadCurator);
2 changes: 1 addition & 1 deletion addons/ui/flexiMenu/fnc_add.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
TRACE_1("",_this);

// _this = ["player", [DIK_LSHIFT], -3, ["mission\weapon_menuDef.sqf", ["main"]]]
// Note: calling script may require this file for dik codes: #include "\a3\editor_f\Data\Scripts\dikCodes.h"
// Note: calling script may require this file for dik codes: #include "\a3\ui_f\hpp\defineDIKCodes.inc"

private _msg = "FLEXIMENU: Unknown Error in fnc_add.sqf"; //Initialize
private _key = [];
Expand Down
Loading

0 comments on commit e88a533

Please sign in to comment.