Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/CBATeam/CBA_A3 into fixhe…
Browse files Browse the repository at this point in the history
…lpmodule
  • Loading branch information
commy2 committed Feb 18, 2016
2 parents 2f133d0 + c478cf2 commit 191965f
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 7 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Community Base Addons

[![](https://img.shields.io/badge/Changelog-2.2.0-orange.svg?style=flat-square)](https://github.com/CBATeam/CBA_A3/issues?q=is%3Aclosed+milestone%3A2.1.2)
[![](https://img.shields.io/badge/Release-2.2.0-blue.svg?style=flat-square)](https://github.com/CBATeam/CBA_A3/releases/tag/v2.2.0.151130)
[![](https://img.shields.io/badge/Changelog-2.3.0-orange.svg?style=flat-square)](https://github.com/CBATeam/CBA_A3/issues?q=milestone%3A2.3+is%3Aclosed)
[![](https://img.shields.io/badge/Release-2.3.0-blue.svg?style=flat-square)](https://github.com/CBATeam/CBA_A3/releases/tag/v2.3.0.160217)
[![](https://img.shields.io/badge/Github-Wiki-lightgrey.svg?style=flat-square)](https://github.com/CBATeam/CBA_A3/wiki)
[![](https://img.shields.io/badge/Function-Documentation-yellow.svg?style=flat-square)](https://cbateam.github.io/CBA_A3/docs/files/overview-txt.html)

Expand All @@ -19,7 +19,6 @@ PBO | Description
cba_cache_disable.pbo | Disables CBA's function caching. (Dev Tool)
cba_diagnostic_disable_xeh_logging.pbo | Disables all additional XEH RPT logging.
cba_diagnostic_enable_logging.pbo | Enables additional logging (Dev Tool)
cba_enable_auto_xeh.pbo | Automatically add Extended Event Handler functionality to units and vehicles that do not have XEH enabled. This might cause unpredictable behavior.

### CBA Caching

Expand Down
12 changes: 12 additions & 0 deletions addons/common/CfgFunctions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ class CfgFunctions
description = "Creates a marker all at once.";
file = "\x\cba\addons\common\fnc_createMarker.sqf";
};
// CBA_fnc_createNamespace
class createNamespace
{
description = "Creates a namespace. Used to store and read variables via setVariable and getVariable.";
file = "\x\cba\addons\common\fnc_createNamespace.sqf";
};
// CBA_fnc_createTrigger
class createTrigger
{
Expand All @@ -105,6 +111,12 @@ class CfgFunctions
description = "A function used to delete entities";
file = "\x\cba\addons\common\fnc_deleteEntity.sqf";
};
// CBA_fnc_deleteNamespace
class deleteNamespace
{
description = "Deletes a namespace created with CBA_fnc_createNamespace.";
file = "\x\cba\addons\common\fnc_deleteNamespace.sqf";
};
// CBA_fnc_determineMuzzles
class determineMuzzles
{
Expand Down
13 changes: 13 additions & 0 deletions addons/common/CfgLocationTypes.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

class CfgLocationTypes {
class CBA_NamespaceDummy {
name = "";
drawStyle = "name";
texture = "";
color[] = {0,0,0,0};
size = 0;
textSize = 0;
shadow = 0;
font = "PuristaMedium";
};
};
1 change: 1 addition & 0 deletions addons/common/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class CfgPatches {
#include "CfgFunctions.hpp"
#include "CfgPerFrame.hpp"
#include "CfgRemoteExec.hpp"
#include "CfgLocationTypes.hpp"

class CBA_DirectCall {
class dummy;
Expand Down
25 changes: 25 additions & 0 deletions addons/common/fnc_createNamespace.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* ----------------------------------------------------------------------------
Function: CBA_fnc_createNamespace
Description:
Creates a namespace. Used to store and read variables via setVariable and getVariable.
The Namespace is destroyed after the mission ends. getVariable ARRAY is not supported.
Parameters:
None
Returns:
_namespace - a namespace <LOCATION>
Examples:
(begin example)
_namespace = call CBA_fnc_createNamespace;
(end)
Author:
commy2
---------------------------------------------------------------------------- */
#include "script_component.hpp"
SCRIPT(createNamespace);

createLocation ["CBA_NamespaceDummy", [-1000, -1000, 0], 0, 0]
26 changes: 26 additions & 0 deletions addons/common/fnc_deleteNamespace.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/* ----------------------------------------------------------------------------
Function: CBA_fnc_deleteNamespace
Description:
Deletes a namespace created with CBA_fnc_createNamespace.
Parameters:
_namespace - a namespace <LOCATION>
Returns:
None
Examples:
(begin example)
_namespace call CBA_fnc_deleteNamespace;
(end)
Author:
commy2
---------------------------------------------------------------------------- */
#include "script_component.hpp"
SCRIPT(deleteNamespace);

params [["_namespace", locationNull, [locationNull]]];

deleteLocation _namespace;
4 changes: 2 additions & 2 deletions addons/main/script_mod.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
#define MAJOR 2
#define MINOR 3
#define PATCHLVL 0
#define BUILD 160128
#define BUILD 160217
//We will use the DATE for the BUILD# in the format YYMMDD - VM

#define VERSION MAJOR.MINOR.PATCHLVL.BUILD
#define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD


// MINIMAL required version for the Mod. Components can specify others..
#define REQUIRED_VERSION 1.50
#define REQUIRED_VERSION 1.54

/*
// Defined DEBUG_MODE_NORMAL in a few CBA_fncs to prevent looped logging :)
Expand Down
5 changes: 3 additions & 2 deletions addons/versioning/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ SCRIPT(XEH_postInit);
*/

if (!SLX_XEH_DisableLogging) then {
private "_logMsg";
private ["_logMsg", "_filter"];
_logMsg = "CBA_VERSIONING: ";
[GVAR(versions), { _logMsg = (_logMsg + format["%1=%2, ", _key, (_value select 0) joinString "."])}] call CBA_fnc_hashEachPair;
_filter = {if (_x isEqualType 1) then {[_x] call CBA_fnc_formatNumber} else {_x}};
[GVAR(versions), { _logMsg = (_logMsg + format["%1=%2, ", _key, ([_value select 0, _filter] call CBA_fnc_filter) joinString "."])}] call CBA_fnc_hashEachPair;

diag_log [diag_frameNo, diag_tickTime, time, _logMsg];
};
Expand Down

0 comments on commit 191965f

Please sign in to comment.