From 1c6098d05105f74bde27cafcb083b85a687bf72f Mon Sep 17 00:00:00 2001 From: commy2 Date: Fri, 22 Feb 2019 13:06:00 +0100 Subject: [PATCH 1/8] add event for confirming changes in Layout Editor --- addons/ui/fnc_initDisplayOptionsLayout.sqf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/addons/ui/fnc_initDisplayOptionsLayout.sqf b/addons/ui/fnc_initDisplayOptionsLayout.sqf index 863a209d3..618e64d42 100644 --- a/addons/ui/fnc_initDisplayOptionsLayout.sqf +++ b/addons/ui/fnc_initDisplayOptionsLayout.sqf @@ -4,6 +4,12 @@ params ["_display"]; +private _ok = _display displayCtrl IDC_OK; + +_ok ctrlAddEventHandler ["ButtonClick", { + ["CBA_layoutEditorSaved", []] call CBA_fnc_localEvent; +}]; + for "_idc" from IDCBASE to (IDCBASE + 99) do { private _control = _display displayCtrl _idc; From 9743fc58d34ff77b420748d5ff483b27e86827b9 Mon Sep 17 00:00:00 2001 From: commy2 Date: Fri, 22 Feb 2019 20:28:14 +0100 Subject: [PATCH 2/8] fix admin macros (#1074) --- addons/main/script_macros_common.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/main/script_macros_common.hpp b/addons/main/script_macros_common.hpp index 9c66ae1ee..18f33c785 100644 --- a/addons/main/script_macros_common.hpp +++ b/addons/main/script_macros_common.hpp @@ -1752,7 +1752,8 @@ Macro: IS_ADMIN Author: commy2 ------------------------------------------- */ -#define IS_ADMIN serverCommandAvailable '#kick' +#define IS_ADMIN_SYS(x) x##kick +#define IS_ADMIN serverCommandAvailable 'IS_ADMIN_SYS(#)' /* ------------------------------------------- Macro: IS_ADMIN_LOGGED @@ -1772,7 +1773,8 @@ Macro: IS_ADMIN_LOGGED Author: commy2 ------------------------------------------- */ -#define IS_ADMIN_LOGGED serverCommandAvailable '#shutdown' +#define IS_ADMIN_LOGGED_SYS(x) x##shutdown +#define IS_ADMIN_LOGGED serverCommandAvailable 'IS_ADMIN_LOGGED_SYS(#)' /* ------------------------------------------- Macro: FILE_EXISTS From 93499f8da69e067bf570484edf75a2756a730dda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Dahlgren?= Date: Fri, 22 Feb 2019 21:48:45 +0100 Subject: [PATCH 3/8] Add Magazine Well support for MAAWS (#1072) --- addons/jam/CfgMagazineWells.hpp | 6 ++++++ addons/jam/CfgWeapons.hpp | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/addons/jam/CfgMagazineWells.hpp b/addons/jam/CfgMagazineWells.hpp index 3464eab0b..400d0eee6 100644 --- a/addons/jam/CfgMagazineWells.hpp +++ b/addons/jam/CfgMagazineWells.hpp @@ -67,6 +67,12 @@ class CfgMagazineWells { // AT and AA Launchers, ordered lexicographically class CBA_Bazooka {}; // M1, M1A1 Bazooka + class CBA_Carl_Gustaf { // MAAWS, RAWS + BI_rounds[] = { + "MRAWS_HEAT_F", + "MRAWS_HE_F" + }; + }; class CBA_Panzerschreck {}; // Panzerschreck RPzB 54 class CBA_PIAT {}; // PIAT diff --git a/addons/jam/CfgWeapons.hpp b/addons/jam/CfgWeapons.hpp index 680dafebe..b44c3ab0f 100644 --- a/addons/jam/CfgWeapons.hpp +++ b/addons/jam/CfgWeapons.hpp @@ -89,6 +89,10 @@ class CfgWeapons { magazineWell[] = {"CBA_762x54R_LINKS"}; }; + class launch_MRAWS_base_F: Launcher_Base_F { + magazineWell[] = {"CBA_Carl_Gustaf"}; + }; + class launch_RPG7_F: Launcher_Base_F { magazineWell[] = {"CBA_RPG7"}; }; From 1b622079b7939becdf636bce64e4d7d1100e72ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Dahlgren?= Date: Fri, 22 Feb 2019 21:56:12 +0100 Subject: [PATCH 4/8] Add Magazine Well support for SMAW (#1071) --- addons/jam/CfgMagazineWells.hpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/addons/jam/CfgMagazineWells.hpp b/addons/jam/CfgMagazineWells.hpp index 400d0eee6..cdd4c8825 100644 --- a/addons/jam/CfgMagazineWells.hpp +++ b/addons/jam/CfgMagazineWells.hpp @@ -66,15 +66,19 @@ class CfgMagazineWells { #include "magwells_40mm.hpp" // AT and AA Launchers, ordered lexicographically - class CBA_Bazooka {}; // M1, M1A1 Bazooka - class CBA_Carl_Gustaf { // MAAWS, RAWS + + class CBA_Bazooka {}; // M1, M1A1 Bazooka + class CBA_Panzerschreck {}; // Panzerschreck RPzB 54 + class CBA_PIAT {}; // PIAT + class CBA_SMAW {}; // Mk 153 Shoulder-Launched Multipurpose Assault Weapon + class CBA_SMAW_Spotting_Rifle {}; // Mk 153 Shoulder-Launched Multipurpose Assault Weapon - Spotting Rifle + + class CBA_Carl_Gustaf { // MAAWS, RAWS BI_rounds[] = { "MRAWS_HEAT_F", "MRAWS_HE_F" }; }; - class CBA_Panzerschreck {}; // Panzerschreck RPzB 54 - class CBA_PIAT {}; // PIAT class CBA_RPG7 { BI_rockets[] = { From ee88aacd179b166f2588be3a60fba14ef1a37dc2 Mon Sep 17 00:00:00 2001 From: commy2 Date: Fri, 22 Feb 2019 23:21:39 +0100 Subject: [PATCH 5/8] Refactor Help Component (#1073) * cleanup help * cleanup help * help docs * delete help docs * cleanup help * cleanup help * cleanup help * travis * fix a script error * addons diary * mods help * remove bugtracker, wiki diary entries * formatting * display addons, cba CfgMods * rewrite part about config key handlers * html sanitize * html sanitize * html sanitize * CBA_fnc_sanitizeHTML --- addons/events/config.cpp | 29 ++++++ addons/help/CfgEventhandlers.hpp | 4 +- addons/help/XEH_postClientInit.sqf | 56 ----------- addons/help/XEH_postInit.sqf | 43 ++++++++ addons/help/XEH_preClientInit.sqf | 147 ---------------------------- addons/help/XEH_preInit.sqf | 45 +++++++++ addons/help/XEH_preStart.sqf | 69 ++++++++++--- addons/help/config.cpp | 5 +- addons/help/fnc_setCreditsLine.sqf | 59 ----------- addons/help/fnc_setVersionLine.sqf | 100 ------------------- addons/help/gui.hpp | 78 --------------- addons/help/script_component.hpp | 18 ---- addons/help/stringtable.xml | 62 +++--------- addons/main_a3/CfgMods.hpp | 18 ++++ addons/main_a3/CfgSettings.hpp | 11 +++ addons/main_a3/config.cpp | 25 +---- addons/strings/CfgFunctions.hpp | 1 + addons/strings/fnc_sanitizeHTML.sqf | 29 ++++++ 18 files changed, 256 insertions(+), 543 deletions(-) delete mode 100644 addons/help/XEH_postClientInit.sqf create mode 100644 addons/help/XEH_postInit.sqf delete mode 100644 addons/help/XEH_preClientInit.sqf create mode 100644 addons/help/XEH_preInit.sqf delete mode 100644 addons/help/fnc_setCreditsLine.sqf delete mode 100644 addons/help/fnc_setVersionLine.sqf delete mode 100644 addons/help/gui.hpp create mode 100644 addons/main_a3/CfgMods.hpp create mode 100644 addons/main_a3/CfgSettings.hpp create mode 100644 addons/strings/fnc_sanitizeHTML.sqf diff --git a/addons/events/config.cpp b/addons/events/config.cpp index 7b3ea0226..8ed11c1ac 100644 --- a/addons/events/config.cpp +++ b/addons/events/config.cpp @@ -46,3 +46,32 @@ class CfgWeapons { }; }; #endif + +//["testcomponent1", "test1", {systemChat str 11}] call CBA_fnc_addKeyHandlerFromConfig; +//["testcomponent1", "test2", {systemChat str 12}] call CBA_fnc_addKeyHandlerFromConfig; +//["testcomponent2", "test1", {systemChat str 21}] call CBA_fnc_addKeyHandlerFromConfig; +//["testcomponent2", "test2", {systemChat str 22}] call CBA_fnc_addKeyHandlerFromConfig; + +/*class CfgSettings { + class CBA { + class events { + class testcomponent1 { + test1 = 15; + + class test2 { + key = 15; + shift = 1; + }; + }; + + class testcomponent2 { + test1 = 19; + + class test2 { + key = 19; + ctrl = 1; + }; + }; + }; + }; +};*/ diff --git a/addons/help/CfgEventhandlers.hpp b/addons/help/CfgEventhandlers.hpp index 29fcde5e3..0d3301d6e 100644 --- a/addons/help/CfgEventhandlers.hpp +++ b/addons/help/CfgEventhandlers.hpp @@ -6,12 +6,12 @@ class Extended_PreStart_EventHandlers { class Extended_PreInit_EventHandlers { class ADDON { - clientInit = QUOTE(call COMPILE_FILE(XEH_preClientInit)); + init = QUOTE(call COMPILE_FILE(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - clientInit = QUOTE(call COMPILE_FILE(XEH_postClientInit)); + init = QUOTE(call COMPILE_FILE(XEH_postInit)); }; }; diff --git a/addons/help/XEH_postClientInit.sqf b/addons/help/XEH_postClientInit.sqf deleted file mode 100644 index 8e53273cb..000000000 --- a/addons/help/XEH_postClientInit.sqf +++ /dev/null @@ -1,56 +0,0 @@ -//#define DEBUG_MODE_FULL -#include "script_component.hpp" - -if (!hasInterface) exitWith {}; - -// create diary -player createDiarySubject ["CBA_docs", "CBA"]; - -//player createDiaryRecord ["CBA_docs", [localize "STR_DN_CBA_WEBSITE_WIKI", "http://dev-heaven.net/projects/cca"]]; - -private _creditsInfo = GVAR(credits) getVariable "CfgPatches"; -private _credits_CfgPatches = _creditsInfo call FUNC(process); - -if (!isNil "_credits_CfgPatches") then { - player createDiaryRecord ["CBA_docs", [localize "STR_DN_CBA_CREDITS_ADDONS", _credits_CfgPatches]]; -}; - -if (!isNil QGVAR(docs)) then { - player createDiaryRecord ["CBA_docs", ["Docs", GVAR(docs)]]; -}; - -if (!isNil QGVAR(keys)) then { - player createDiaryRecord ["CBA_docs", [localize "STR_DN_CBA_HELP_KEYS", GVAR(keys)]]; -}; - -//player createDiaryRecord ["CBA_docs", [localize "STR_DN_CBA_CREDITS", GVAR(credits_cba)]]; -//player createDiaryRecord ["CBA_docs", ["Credits - Vehicles", (_creditsInfo getVariable "CfgVehicles") call FUNC(process)]]; -//player createDiaryRecord ["CBA_docs", ["Credits - Weapons", (_creditsInfo getVariable "CfgWeapons") call FUNC(process)]]; -//player createDiaryRecord ["CBA_docs", [localize "STR_DN_CBA_WEBSITE", "http://dev-heaven.net/projects/cca"]]; - -// add diary for scripted keybinds -0 spawn { - private _text = GVAR(keys); - - private _activeMods = allVariables EGVAR(keybinding,addons); - _activeMods sort true; - - { - (EGVAR(keybinding,addons) getVariable _x) params ["_addonName", "_addonActions"]; - - _text = _text + format ["%1:
", _addonName]; - - { - (EGVAR(keybinding,actions) getVariable (_addonName + "$" + _x)) params ["_displayName", "", "_registryKeybinds"]; - if (isLocalized _displayName) then { _displayName = localize _displayName; }; - - private _keyName = (_registryKeybinds select {_x select 0 > DIK_ESCAPE} apply {_x call CBA_fnc_localizeKey}) joinString " "; - - _text = _text + format [" %1: %2
", _displayName, _keyName]; - } forEach _addonActions; - - _text = _text + "
"; - } forEach _activeMods; - - player createDiaryRecord ["CBA_docs", [localize "STR_DN_CBA_HELP_KEYS", _text]]; -}; diff --git a/addons/help/XEH_postInit.sqf b/addons/help/XEH_postInit.sqf new file mode 100644 index 000000000..a2854aaf1 --- /dev/null +++ b/addons/help/XEH_postInit.sqf @@ -0,0 +1,43 @@ +//#define DEBUG_MODE_FULL +#include "script_component.hpp" + +if (!hasInterface) exitWith {}; + +{ + // create diary, entries added in reverse order + private _unit = player; + _unit createDiarySubject [QGVAR(docs), "CBA"]; + + // add diary for scripted keybinds + private _keys = GVAR(keys); + + private _addons = allVariables EGVAR(keybinding,addons); + _addons sort true; + + { + (EGVAR(keybinding,addons) getVariable _x) params ["_addon", "_addonActions"]; + + _keys = _keys + format ["%1:
", _addon]; + + { + (EGVAR(keybinding,actions) getVariable (_addon + "$" + _x)) params ["_displayName", "", "_keybinds"]; + + if (isLocalized _displayName) then { + _displayName = localize _displayName; + }; + + private _keyName = (_keybinds select {_x select 0 > DIK_ESCAPE} apply {_x call CBA_fnc_localizeKey}) joinString " "; + + _keys = _keys + format [" %1: %2
", _displayName, _keyName]; + } forEach _addonActions; + + _keys = _keys + "
"; + } forEach _addons; + + // delete last line breaks + _keys = _keys select [0, count _keys - 10]; + + _unit createDiaryRecord [QGVAR(docs), [localize "STR_CBA_Help_Keys", _keys]]; + _unit createDiaryRecord [QGVAR(docs), [localize "STR_CBA_Credits", call (uiNamespace getVariable QGVAR(credits))]]; + _unit createDiaryRecord [QGVAR(docs), [localize "STR_CBA_Addons", call (uiNamespace getVariable QGVAR(mods))]]; +} call CBA_fnc_execNextFrame; diff --git a/addons/help/XEH_preClientInit.sqf b/addons/help/XEH_preClientInit.sqf deleted file mode 100644 index d6396050f..000000000 --- a/addons/help/XEH_preClientInit.sqf +++ /dev/null @@ -1,147 +0,0 @@ -//#define DEBUG_MODE_FULL -#include "script_component.hpp" - -LOG(MSG_INIT); - -ADDON = false; - -[QFUNC(help), {call BIS_fnc_help}] call CBA_fnc_compileFinal; - -[QFUNC(process), { - params ["_hash1", "_hash2", "_hash3"]; - - private _result = []; - - { - private _entry = format [ - "%1, v%2, (%3)
Author: %4", - _x, - _hash3 getVariable _x, - _hash2 getVariable _x, - (_hash1 getVariable _x) joinString ", " - ]; - - _result pushBack _entry; - } forEach allVariables _hash1; - - _result joinString "

"; -}] call CBA_fnc_compileFinal; - -// keys -private _fnc_getKeyName = { - private _shift = [0, DIK_LSHIFT] select (_shift > 0); - private _ctrl = [0, DIK_LCONTROL] select (_ctrl > 0); - private _alt = [0, DIK_LMENU] select (_alt > 0); - - private _keys = [_shift, _ctrl, _alt, _key]; - - private _result = "^"; - - { - private _keyName = call compile format ["format ['%1', %2]", "%1", keyName _x]; - _keyName = [_keyName, " "] call CBA_fnc_split; - - private _keyText = "^"; - - { - _keyText = _keyText + " " + _x; - } forEach _keyName; - - _keyText = [_keyText, "^ ", ""] call CBA_fnc_replace; - _result = _result + "-" + _keyText; - } forEach _keys; - - _result = [_result, "^ ", ""] call CBA_fnc_replace; - _result = [_result, "^-", ""] call CBA_fnc_replace; - _result = [_result, "^", "None"] call CBA_fnc_replace; - _result -}; - -private _text = ""; - -private _config = configFile >> "CfgSettings" >> "CBA" >> "events"; - -{ - private _addonConfig = _x; - private _addonName = configName _addonConfig; - - private _addonNameArr = [_addonName, "_"] call CBA_fnc_split; - private _addonText = "^"; - - { - if (_x != "sys") then { - _addonText = format ["%1 %2", _addonText, _x]; - }; - } forEach _addonNameArr; - - _addonText = [_addonText, "^ ", ""] call CBA_fnc_replace; - _addonText = format ["%1:", _addonText]; - - { - private _entry = _x; - private _actionName = configName _entry; - - _actionName = [_actionName, "_", " "] call CBA_fnc_replace; - - private _keyState = if (isNumber _entry) then { - [getNumber _entry, 0, 0, 0 ] - } else { - [ - getNumber (_entry >> "key"), - getNumber (_entry >> "shift"), - getNumber (_entry >> "ctrl"), - getNumber (_entry >> "alt") - ] - }; - - private _keyName = _keyState call _fnc_getKeyName; - - _actionName = format [" %1: %2", _actionName, _keyName]; - - _text = _text + _actionName + "
"; - } forEach configProperties [_addonConfig, "isNumber _x || isClass _x", true]; - - _text = _text + "
"; -} forEach ("true" configClasses _config); - -GVAR(keys) = _text; - -// credits -GVAR(credits) = call CBA_fnc_createNamespace; - -private _fnc_readCreditsFromConfig = { - params ["_type"]; - - private _config = configFile >> _type; - - private _hash1 = call CBA_fnc_createNamespace; - private _hash2 = call CBA_fnc_createNamespace; - private _hash3 = call CBA_fnc_createNamespace; - - { - private _entry = _x; - - _hash1 setVariable [configName _entry, getArray (_entry >> "author")]; - _hash2 setVariable [configName _entry, getText (_entry >> "authorUrl")]; - _hash3 setVariable [configName _entry, getText (_entry >> "version")]; - } forEach ("isArray (_x >> 'author')" configClasses _config); - - [_hash1, _hash2, _hash3] -}; - -{ - GVAR(credits) setVariable [_x, _x call _fnc_readCreditsFromConfig]; -} forEach ["CfgPatches"]; //, "CfgVehicles", "CfgWeapons"]; - -// docs -GVAR(docs) = ""; - -private _config = configFile >> "CfgMods"; - -{ - private _entry = format ["* %1 - %2
%3

", configName _x, getText (_x >> "name"), getText (_x >> "description")]; - - GVAR(docs) + _entry; -} forEach ("isText (_x >> 'description')" configClasses _config); - -ADDON = true; diff --git a/addons/help/XEH_preInit.sqf b/addons/help/XEH_preInit.sqf new file mode 100644 index 000000000..7130d8ddb --- /dev/null +++ b/addons/help/XEH_preInit.sqf @@ -0,0 +1,45 @@ +//#define DEBUG_MODE_FULL +#include "script_component.hpp" + +if (!hasInterface) exitWith {}; + +ADDON = false; + +// bwc +FUNC(help) = BIS_fnc_help; + +// keys +private _keys = ""; + +private _config = configFile >> "CfgSettings" >> "CBA" >> "events"; + +{ + private _addon = configName _x; + + _keys = _keys + format ["%1:
", _addon]; + + { + private _action = configName _x; + + private _keybind = if (isNumber _x) then { + [getNumber _x, false, false, false] + } else { + [ + getNumber (_x >> "key"), + getNumber (_x >> "shift") > 0, + getNumber (_x >> "ctrl") > 0, + getNumber (_x >> "alt") > 0 + ] + }; + + private _keyName = _keybind call CBA_fnc_localizeKey; + + _keys = _keys + format [" %1: %2
", _action, _keyName]; + } forEach configProperties [_x, "isNumber _x || isClass _x"]; + + _keys = _keys + "
"; +} forEach ("true" configClasses _config); + +GVAR(keys) = _keys; + +ADDON = true; diff --git a/addons/help/XEH_preStart.sqf b/addons/help/XEH_preStart.sqf index e307f1748..1148c245c 100644 --- a/addons/help/XEH_preStart.sqf +++ b/addons/help/XEH_preStart.sqf @@ -1,14 +1,61 @@ +//#define DEBUG_MODE_FULL #include "script_component.hpp" -PREP(setVersionLine); -PREP(setCreditsLine); - -//Cache for CBA_help_fnc_setCreditsLine -if (!isClass (configFile >> "CfgPatches" >> "CBA_DisableCredits")) then { - uiNamespace setVariable [QGVAR(creditsCache), - "isText (_x >> 'author') && - {getText (_x >> 'author') != localize 'STR_A3_Bohemia_Interactive'} && - {getText (_x >> 'author') != ''} - " configClasses (configFile >> "CfgPatches") - ]; +if (!hasInterface) exitWith {}; + +// credits +private _addons = "true" configClasses (configFile >> "CfgPatches") select { + isText (_x >> "author") && {!(getText (_x >> "author") in [localize "STR_A3_Bohemia_Interactive", "CFGPATCHES_AUTHOR", ""])} }; + +private _credits = []; + +{ + private _name = configName _x; + + if (isText (_x >> "name")) then { + _name = getText (_x >> "name") call CBA_fnc_sanitizeHTML; + }; + + _name = format ["%1", _name]; + + private _version = ""; + + if (isText (_x >> "version")) then { + _version = format [" v%1", getText (_x >> "version")]; + }; + + private _author = getText (_x >> "author") call CBA_fnc_sanitizeHTML; + + _credits pushBack format ["%1%2 by %3", _name, _version, _author]; +} forEach _addons; + +_credits = (_credits arrayIntersect _credits) joinString "
"; + +uiNamespace setVariable [QGVAR(credits), compileFinal str _credits]; + +// mods +private _mods = "true" configClasses (configFile >> "CfgPatches") apply {configSourceMod _x}; +_mods = (_mods arrayIntersect _mods select {!isNumber (configfile >> "CfgMods" >> _x >> "appId")}) - [""]; + +_mods = _mods apply { + private _entry = configfile >> "CfgMods" >> _x; + + private _name = getText (_entry >> "name") call CBA_fnc_sanitizeHTML; + + if (isClass _entry) then { + _x = format [" %1 - %2", configName _entry, _name]; + + if (isText (_entry >> "description")) then { + private _description = getText (_entry >> "description") call CBA_fnc_sanitizeHTML; + + _x = _x + format ["
%1", _description]; + }; + }; + + _x +}; + +_mods = _mods joinString "

"; + +uiNamespace setVariable [QGVAR(mods), compileFinal str _mods]; diff --git a/addons/help/config.cpp b/addons/help/config.cpp index f044a5f06..a5d3b2e30 100644 --- a/addons/help/config.cpp +++ b/addons/help/config.cpp @@ -8,11 +8,10 @@ class CfgPatches { units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"cba_common", "cba_hashes", "cba_keybinding"}; + requiredAddons[] = {"cba_common","cba_keybinding"}; version = VERSION; - authors[] = {"alef", "Rocko", "Sickboy"}; + authors[] = {"alef","Rocko","Sickboy"}; }; }; #include "CfgEventhandlers.hpp" -#include "gui.hpp" diff --git a/addons/help/fnc_setCreditsLine.sqf b/addons/help/fnc_setCreditsLine.sqf deleted file mode 100644 index f89340f09..000000000 --- a/addons/help/fnc_setCreditsLine.sqf +++ /dev/null @@ -1,59 +0,0 @@ -#include "script_component.hpp" -/* ---------------------------------------------------------------------------- -Function: CBA_help_fnc_setCreditsLine - -Description: - Picks a random CfgPatches entry with an "author" entry and displays author, - version and URL in the main menu and ingame in the pause menu. - -Parameters: - 0: _control - Credits line control - -Returns: - None ----------------------------------------------------------------------------- */ - -params ["_control"]; - -if !(ctrlText _control isEqualTo "") exitWith {}; - -// get settings -{ - if (isNil _x) then { - missionNamespace setVariable [_x, isClass (configFile >> "CfgPatches" >> _x)]; - }; -} forEach ["CBA_DisableCredits", "CBA_MonochromeCredits"]; - -if (CBA_DisableCredits) exitWith {}; - -// find random addon with author -private _entry = selectRandom (uiNamespace getVariable [QGVAR(creditsCache), []]); - -if (isNil "_entry") exitWith {}; - -// addon name -private _name = configName _entry; - -if (isText (_entry >> "name")) then { - _name = getText (_entry >> "name"); -}; - -if (!CBA_MonochromeCredits) then { - _name = format ["%1", _name]; -}; - -// author name -private _author = getText (_entry >> "author"); - -// version if any -private _version = ""; - -if (isText (_entry >> "version")) then { - _version = format [" v%1", getText (_entry >> "version")]; -}; - -// add single line -_control ctrlSetStructuredText parseText format ["%1%2 by %3", _name, _version, _author]; - -// make credits line not obstruct other controls -_control ctrlEnable false; diff --git a/addons/help/fnc_setVersionLine.sqf b/addons/help/fnc_setVersionLine.sqf deleted file mode 100644 index 42ae24f25..000000000 --- a/addons/help/fnc_setVersionLine.sqf +++ /dev/null @@ -1,100 +0,0 @@ -#include "script_component.hpp" -/* ---------------------------------------------------------------------------- -Function: CBA_help_fnc_setVersionLine - -Description: - Displays all CfgPatches with a "versionDesc" entry in the main menu. - - Mods are cycled automatically every 4 seconds or can be browsed using LMB and RMB. - Double clicking executes the script in "versionAct". - -Parameters: - 0: _control - Either version line or button control - 1: _key - 0: LMB - next mod, 1: RMB - previous mod (optional, default: 0) - -Returns: - None ----------------------------------------------------------------------------- */ - -params ["_control", ["_key", 0]]; - -private _display = ctrlParent _control; - -private _ctrlText = _display displayCtrl IDC_VERSION_TEXT; -private _ctrlButton = _display displayCtrl IDC_VERSION_BUTTON; - -// create addon list -if (isNil {uiNamespace getVariable QGVAR(VerList)}) then { - private _verList = []; - uiNamespace setVariable [QGVAR(VerList), _verList]; - - // gather version info - { - private _entry = _x; - - private _verLine = format ["%1 v%2", getText (_entry >> "versionDesc"), getText (_entry >> "version")]; - private _verAct = getText (_entry >> "versionAct"); - - _verList pushBack [_verLine, _verAct]; - } forEach ("isText (_x >> 'versionDesc')" configClasses (configFile >> "CfgPatches")); -}; - -// start loop that cycles through all addons -terminate (uiNamespace getVariable [QGVAR(VerScript), scriptNull]); - -private _verScript = [_control] spawn { // will terminate when main menu mission exits - uiSleep 4; - isNil (uiNamespace getVariable QFUNC(setVersionLine)); // execute unscheduled -}; - -uiNamespace setVariable [QGVAR(VerScript), _verScript]; - -// start loop with mouse moving event on main menu. this is used, because loops can't be used at that point -if (isNull (uiNamespace getVariable [QGVAR(VerScriptFlag), displayNull])) then { - uiNamespace setVariable [QGVAR(VerScriptFlag), _display]; - - _display displayAddEventHandler ["MouseMoving", { - params ["_display"]; - - if (!scriptDone (uiNamespace getVariable [QGVAR(VerScript), scriptNull])) exitWith {}; - - private _verScript = [allControls _display select 0] spawn { // will terminate when main menu mission exits - uiSleep 4; - isNil (uiNamespace getVariable QFUNC(setVersionLine)); // execute unscheduled - }; - - uiNamespace setVariable [QGVAR(VerScript), _verScript]; - }]; -}; - -// left click forward, other click back -if (isNil {uiNamespace getVariable QGVAR(VerNext)}) then { - uiNamespace setVariable [QGVAR(VerNext), -1]; -}; - -private _next = uiNamespace getVariable QGVAR(VerNext); - -if (_key isEqualTo 0) then { - _next = _next + 1; -} else { - _next = _next - 1; -}; - -// stay in bounds -_verList = uiNamespace getVariable QGVAR(VerList); - -if (_next >= count _verList) then { - _next = 0; -} else { - if (_next < 0) then { - _next = count _verList - 1; - }; -}; - -uiNamespace setVariable [QGVAR(VerNext), _next]; - -// add single line -(_verList select _next) params ["_verLine", "_verAct"]; - -_ctrlText ctrlSetText _verLine; // print version line -_ctrlButton ctrlSetEventHandler ["MouseButtonDblClick", _verAct]; // set double-click action if any diff --git a/addons/help/gui.hpp b/addons/help/gui.hpp deleted file mode 100644 index e024c0ea6..000000000 --- a/addons/help/gui.hpp +++ /dev/null @@ -1,78 +0,0 @@ -class RscText; -class RscButton; - -class RscStructuredText { - class Attributes; -}; - -class GVAR(credits_base): RscStructuredText { - onLoad = QUOTE(_this call (uiNamespace getVariable 'FUNC(setCreditsLine)')); - size = POS_H(0.8); - x = POS_X_CENTERED(7); - y = POS_Y(23.1); - w = POS_W(26); - h = POS_H(0.8); - shadow = 0; - - class Attributes: Attributes { - font = "RobotoCondensedLight"; - align = "center"; - valign = "middle"; - color = "#bdcc9c"; - }; -}; - -class RscStandardDisplay; -class RscDisplayMain: RscStandardDisplay { - class controls { - class GVAR(CreditsVersion): RscText { - onLoad = QUOTE(_this call (uiNamespace getVariable 'FUNC(setVersionLine)')); - idc = IDC_VERSION_TEXT; - font = "RobotoCondensedLight"; - shadow = 0; - style = ST_RIGHT; - sizeEx = POS_H(0.8); - x = POS_X_RIGHT(12); - y = POS_Y(24.1); - w = POS_W(10); - h = POS_H(0.8); - }; - - class GVAR(CreditsVersionButton): RscButton { - onMouseButtonClick = QUOTE(_this call (uiNamespace getVariable 'FUNC(setVersionLine)')); - idc = IDC_VERSION_BUTTON; - colorText[] = {1,1,1,0}; - colorDisabled[] = {1,1,1,0}; - colorBackground[] = {0,0,0,0}; - colorBackgroundDisabled[] = {0,0,0,0}; - colorBackgroundActive[] = {0,0,0,0}; - colorFocused[] = {0,0,0,0}; - soundClick[] = {"",1,1}; - - x = POS_X_RIGHT(12); - y = POS_Y(24.1); - w = POS_W(10); - h = POS_H(0.8); - }; - - class GVAR(credits): GVAR(credits_base) { - size = POS_H_MAIN_MENU(1); - x = POS_X_MAIN_MENU(0); - y = POS_Y_MAIN_MENU(2); - w = POS_W_MAIN_MENU(0); - h = POS_H_MAIN_MENU(1); - }; - }; -}; - -class RscDisplayInterrupt: RscStandardDisplay { - class controls { - class GVAR(credits): GVAR(credits_base) {}; - }; -}; - -class RscDisplayMPInterrupt: RscStandardDisplay { - class controls { - class GVAR(credits): GVAR(credits_base) {}; - }; -}; diff --git a/addons/help/script_component.hpp b/addons/help/script_component.hpp index e490c5e01..964446e78 100644 --- a/addons/help/script_component.hpp +++ b/addons/help/script_component.hpp @@ -11,22 +11,4 @@ #include "\x\cba\addons\main\script_macros.hpp" -#include "\a3\ui_f\hpp\defineCommonGrids.inc" #include "\a3\ui_f\hpp\defineDIKCodes.inc" -#include "\a3\ui_f\hpp\defineResincl.inc" - -#define POS_X(N) ((N) * GUI_GRID_W + GUI_GRID_X) -#define POS_Y(N) ((N) * GUI_GRID_H + GUI_GRID_Y) -#define POS_W(N) ((N) * GUI_GRID_W) -#define POS_H(N) ((N) * GUI_GRID_H) - -#define POS_X_CENTERED(N) ((N) * GUI_GRID_W + GUI_GRID_CENTER_X) -#define POS_X_RIGHT(N) (safezoneW - 1 * (N) * GUI_GRID_W + GUI_GRID_X) - -#define POS_X_MAIN_MENU(N) safezoneX -#define POS_Y_MAIN_MENU(N) (safezoneY + safezoneH - 1 * (N) * (pixelH * pixelGrid * 2)) -#define POS_W_MAIN_MENU(N) safezoneW -#define POS_H_MAIN_MENU(N) ((N) * (pixelH * pixelGrid * 2)) - -#define IDC_VERSION_TEXT 222712 -#define IDC_VERSION_BUTTON 222713 diff --git a/addons/help/stringtable.xml b/addons/help/stringtable.xml index 7bc7e8e73..8268d475a 100644 --- a/addons/help/stringtable.xml +++ b/addons/help/stringtable.xml @@ -13,7 +13,7 @@ Community Base Addons - Aide Community Base Addons - Yardım - + Keybindings Tastendruckzuweisung Keybindings @@ -28,37 +28,7 @@ 按键绑定 Klavye Tuşları - - Bugtracker - Bugtracker - Bugtracker - Bugtracker - Баг трэкер - Bugtracker - Zgłaszanie błędów - traqueur de bugs - Bugtracker - バグトラッカー - 臭蟲追蹤器 - 臭虫追踪器 - Sorun Takibi - - - Wiki (Documentation) - Wiki (Documentation) - Wiki (Documentation) - Wiki (Documentation) - Wiki (Документация) - Wiki (Documentation) - Wiki (dokumentacja) - Wiki (Documentation) - Wiki (Documentation) - ウィキ (ドキュメント) - 維基 (文件) - 维基 (文件) - Wiki (Dökümantasyon) - - + Credits Credits Credits @@ -73,20 +43,20 @@ 制作组 Yapımcılar - - Credits - Addons - Credits - Addons - Credits - Addons - Credits - Addons - Кредиты - Дополнения - Credits - Addons - Twórcy - Addons - Credits - Addons - Credits - Addons - クレジット - アドオン - 製作組 - 模組 - 制作组 - 模组 - Yapımcılar - Modüller + + Addons + Addons + Addons + Addons + Дополнения + Addons + Addons + Addons + Addons + アドオン + 模組 + 模组 + Modüller diff --git a/addons/main_a3/CfgMods.hpp b/addons/main_a3/CfgMods.hpp new file mode 100644 index 000000000..ce808b1e5 --- /dev/null +++ b/addons/main_a3/CfgMods.hpp @@ -0,0 +1,18 @@ +class CfgMods { + class PREFIX { + author = "$STR_CBA_Author"; + dir = "@CBA_A3"; + name = "Community Base Addons v3.9.1"; + 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
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."; + }; +}; diff --git a/addons/main_a3/CfgSettings.hpp b/addons/main_a3/CfgSettings.hpp new file mode 100644 index 000000000..1dde5bb30 --- /dev/null +++ b/addons/main_a3/CfgSettings.hpp @@ -0,0 +1,11 @@ +class CfgSettings { + class CBA { + class Versioning { + class PREFIX { + class Dependencies { + CBA[] = {"cba_main", {1,0,0}, "(true)"}; + }; + }; + }; + }; +}; diff --git a/addons/main_a3/config.cpp b/addons/main_a3/config.cpp index 261bbf347..84fea97ca 100644 --- a/addons/main_a3/config.cpp +++ b/addons/main_a3/config.cpp @@ -14,26 +14,5 @@ class CfgPatches { }; }; -class CfgSettings { - class CBA { - class Versioning { - class PREFIX { - class Dependencies { - CBA[] = {"cba_main", {1, 0, 0}, "(true)"}; - }; - }; - }; - }; -}; - -class CfgMods { - class PREFIX { - dir = "@CBA_A3"; - name = "Community Base Addons (Arma III)"; - picture = "x\cba\addons\main\logo_cba_ca.paa"; - hidePicture = "true"; - hideName = "true"; - actionName = "Website"; - action = "$STR_CBA_URL"; - }; -}; +#include "CfgMods.hpp" +#include "CfgSettings.hpp" diff --git a/addons/strings/CfgFunctions.hpp b/addons/strings/CfgFunctions.hpp index 2e4dfae66..b48fac451 100644 --- a/addons/strings/CfgFunctions.hpp +++ b/addons/strings/CfgFunctions.hpp @@ -15,6 +15,7 @@ class CfgFunctions { PATHTO_FNC(split); PATHTO_FNC(strLen); PATHTO_FNC(trim); + PATHTO_FNC(sanitizeHTML); }; }; }; diff --git a/addons/strings/fnc_sanitizeHTML.sqf b/addons/strings/fnc_sanitizeHTML.sqf new file mode 100644 index 000000000..8aa90d89c --- /dev/null +++ b/addons/strings/fnc_sanitizeHTML.sqf @@ -0,0 +1,29 @@ +#include "script_component.hpp" +/* ---------------------------------------------------------------------------- +Function: CBA_fnc_sanitizeHTML + +Description: + Replaces all < > and & with HTML character codes. + +Parameters: + _string - String to sanitize + +Returns: + Sanitized string + +Example: + (begin example) + "&
abc" call CBA_fnc_sanitizeHTML; // "<&>
abc" + (end) + +Author: + commy2 +--------------------------------------------------------------------------- */ + +params ["_string"]; + +_string = [_string, "&", "&"] call CBA_fnc_replace; +_string = [_string, "<", "<"] call CBA_fnc_replace; +_string = [_string, ">", ">"] call CBA_fnc_replace; + +[_string, "<br/>", "
"] call CBA_fnc_replace // return From f9b748ee147e6936e1333dbbd9b4cdaf7e10aa24 Mon Sep 17 00:00:00 2001 From: Drofseh Date: Fri, 22 Feb 2019 23:45:27 -0800 Subject: [PATCH 6/8] More magwells (#1076) * Add CZ 75 magwells, some vanilla SMG magwells, change 570 to 57 - Change 570x28 to 57x28, since the cartridge is always called the 5.7x28mm - Add .45 ACP fullsize Glock magwell to SMG_01 (Vermin SMG/KRISS Vector) - Add 9x19mm Scorpion Evo 3 magwell for SMG_02 (Sting 9mm/CZ Skorpion Evo) - Add 9x19mm MP5 magwell to SMG_05 (Protector 9 mm/MP5K) - Add magwels for the CZ 75, 85, , 97, 2075, P-01, P-06, P-07, P-09 * Update CfgWeapons.hpp - readd missing line break * Remove spaces before colons Co-Authored-By: Drofseh --- addons/jam/CfgMagazineWells.hpp | 2 +- addons/jam/CfgWeapons.hpp | 15 ++++++++++++++- addons/jam/magwells_22LR.hpp | 1 + addons/jam/magwells_40SW.hpp | 7 +++++++ addons/jam/magwells_45ACP.hpp | 10 +++++++++- addons/jam/magwells_570x28.hpp | 6 ------ addons/jam/magwells_57x28.hpp | 6 ++++++ addons/jam/magwells_9x19.hpp | 27 ++++++++++++++++++++++++++- 8 files changed, 64 insertions(+), 10 deletions(-) delete mode 100644 addons/jam/magwells_570x28.hpp create mode 100644 addons/jam/magwells_57x28.hpp diff --git a/addons/jam/CfgMagazineWells.hpp b/addons/jam/CfgMagazineWells.hpp index cdd4c8825..8ae604a5b 100644 --- a/addons/jam/CfgMagazineWells.hpp +++ b/addons/jam/CfgMagazineWells.hpp @@ -32,7 +32,7 @@ class CfgMagazineWells { // Pistol calibre magwells, ordered lexicographically in metric and imperial groups #include "magwells_10mmAuto.hpp" // 10mm Auto | 10mm Automatic | 10x25mm - #include "magwells_570x28.hpp" // 5.70x28mm + #include "magwells_57x28.hpp" // 5.7x28mm #include "magwells_762x25.hpp" // 7.62x25mm Tokarev #include "magwells_762x38R.hpp" // 7.62x38mmR | 7.62 mm Nagant #include "magwells_763x25.hpp" // 7.63x25mm Mauser | .30 Mauser Automatic diff --git a/addons/jam/CfgWeapons.hpp b/addons/jam/CfgWeapons.hpp index b44c3ab0f..67a987284 100644 --- a/addons/jam/CfgWeapons.hpp +++ b/addons/jam/CfgWeapons.hpp @@ -105,7 +105,20 @@ class CfgWeapons { magazineWell[] = {"CBA_338NM_LINKS"}; }; + class SMG_01_Base: Rifle_Short_Base_F { + magazineWell[] = {"CBA_45ACP_Glock_Full"}; + }; + + class SMG_02_base_F: Rifle_Short_Base_F { + magazineWell[] = {"CBA_9x19_ScorpionEvo3"}; + }; + class SMG_03_TR_BASE: Rifle_Base_F { - magazineWell[] = {"CBA_570x28_P90"}; + magazineWell[] = {"CBA_57x28_FNP90"}; }; + + class SMG_05_base_F: Rifle_Short_Base_F { + magazineWell[] = {"CBA_9x19_MP5"}; + }; + }; diff --git a/addons/jam/magwells_22LR.hpp b/addons/jam/magwells_22LR.hpp index 65cd5bd4b..5b8a03f61 100644 --- a/addons/jam/magwells_22LR.hpp +++ b/addons/jam/magwells_22LR.hpp @@ -1,2 +1,3 @@ + class CBA_9x19_CZP09Kadet {}; // CZ P-09 Kadet in .22LR class CBA_22LR_PP {}; // Walther PP in .22LR class CBA_22LR_PPK {}; // Walther PPK in .22LR diff --git a/addons/jam/magwells_40SW.hpp b/addons/jam/magwells_40SW.hpp index 28e316f55..60cda31ab 100644 --- a/addons/jam/magwells_40SW.hpp +++ b/addons/jam/magwells_40SW.hpp @@ -1,3 +1,10 @@ + + class CBA_40SW_CZ2075 {}; // Subcompact CZ 2075 in .40 S&W + class CBA_40SW_CZ75_Cpct {}; // Compact CZ 75, CZ 85 in .40 S&W + class CBA_40SW_CZ75_Full {}; // Fullsize CZ 75, CZ 85 in .40 S&W + class CBA_40SW_CZP06 {}; // CZ P-06 in .40 S&W + class CBA_40SW_CZP07 {}; // CZ P-07 in .40 S&W + class CBA_40SW_CZP09 {}; // CZ P-09 in .40 S&W (also should fit in .40 S&W CZ P-07) class CBA_40SW_Glock_SubC {}; // Subcompact Glock in .40 S&W (Glock 27) class CBA_40SW_Glock_Cpct {}; // Compact Glock in .40 S&W (Glock 23) class CBA_40SW_Glock_Full {}; // Fullsize Glock in .40 S&W (Glock 22, 24, 35) diff --git a/addons/jam/magwells_45ACP.hpp b/addons/jam/magwells_45ACP.hpp index bdf6e5f8c..f08311b42 100644 --- a/addons/jam/magwells_45ACP.hpp +++ b/addons/jam/magwells_45ACP.hpp @@ -1,9 +1,17 @@ class CBA_45ACP_1911 {}; // Colt M1911 class CBA_45ACP_C96 {}; // Mauser C-96 in .45 ACP + class CBA_9x19_CZ97 {}; // CZ 97 in .45 ACP class CBA_45ACP_Delisle {}; // De Lisle Carbine class CBA_45ACP_Glock_Slim {}; // Slimline Glock in .45 ACP (Glock 36) class CBA_45ACP_Glock_Cpct {}; // Compact Glock in .45 ACP (Glock 29) - class CBA_45ACP_Glock_Full {}; // Fullsize Glock in .45 ACP (Glock 21, 41) + class CBA_45ACP_Glock_Full { // Fullsize Glock in .45 ACP (Glock 21, 41) + BI_mags[] = { + "30Rnd_45ACP_Mag_SMG_01", + "30Rnd_45ACP_Mag_SMG_01_tracer_green", + "30Rnd_45ACP_Mag_SMG_01_Tracer_Red", + "30Rnd_45ACP_Mag_SMG_01_Tracer_Yellow" + }; + }; class CBA_45ACP_Grease {}; // Grease Gun class CBA_45ACP_Reising {}; // M50/M55 Reising class CBA_45ACP_Thompson_Stick {}; // Thompson stick magazines diff --git a/addons/jam/magwells_570x28.hpp b/addons/jam/magwells_570x28.hpp deleted file mode 100644 index a8a23204c..000000000 --- a/addons/jam/magwells_570x28.hpp +++ /dev/null @@ -1,6 +0,0 @@ - class CBA_570x28_FN57 {}; // FN Five-Seven - class CBA_570x28_P90 { // FN P90 - BI_mags[] = { - "50Rnd_570x28_SMG_03" - }; - }; diff --git a/addons/jam/magwells_57x28.hpp b/addons/jam/magwells_57x28.hpp new file mode 100644 index 000000000..bf3153a48 --- /dev/null +++ b/addons/jam/magwells_57x28.hpp @@ -0,0 +1,6 @@ + class CBA_57x28_FN57 {}; // FN Five-Seven + class CBA_57x28_P90 { // FN P90, also 5.7x28 AR-57 + BI_mags[] = { + "50Rnd_570x28_SMG_03" + }; + }; diff --git a/addons/jam/magwells_9x19.hpp b/addons/jam/magwells_9x19.hpp index d67c8bfab..94915f585 100644 --- a/addons/jam/magwells_9x19.hpp +++ b/addons/jam/magwells_9x19.hpp @@ -1,4 +1,10 @@ class CBA_9x19_C96 {}; // Mauser C-96 in 9x19mm + class CBA_9x19_CZ2075 {}; // Subcompact CZ 2075 in 9x19mm + class CBA_9x19_CZ75_Cpct {}; // Compact CZ 75, CZ 85 in 9x19mm + class CBA_9x19_CZ75_Full {}; // Fullsize CZ 75, CZ 85 in 9x19mm + class CBA_9x19_CZP01 {}; // CZ P-01 in 9x19mm + class CBA_9x19_CZP07 {}; // CZ P-07 in 9x19mm + class CBA_9x19_CZP09 {}; // CZ P-09 in 9x19mm (also should fit in 9x19mm CZ P-07) class CBA_9x19_CZ82 {}; // CZ 82, Vz. 82, CZ 83 class CBA_9x19_GPK199 {}; // Grand Power K100 class CBA_9x19_GSh18 {}; // GSh-18 @@ -10,7 +16,14 @@ class CBA_9x19_M9 {}; // Beretta M9 class CBA_9x19_MP40 {}; // MP40, MP38 class CBA_9x19_MP443 {}; // MP-443 Grach - class CBA_9x19_MP5 {}; // H&K MP5 + class CBA_9x19_MP5 { // H&K MP5 + BI_mags[] = { + "30Rnd_9x21_Mag_SMG_02", + "30Rnd_9x21_Mag_SMG_02_Tracer_Red", + "30Rnd_9x21_Mag_SMG_02_Tracer_Yellow", + "30Rnd_9x21_Mag_SMG_02_Tracer_Green" + }; + }; class CBA_9x19_Ots27 {}; // OTs-27 Berdysh class CBA_9x19_P08 {}; // Luger P08 class CBA_9x19_P226 {}; // SIG P226 @@ -21,6 +34,18 @@ class CBA_9x19_PM84 {}; // FB PM-84 Glauberyt class CBA_9x19_PP19 {}; // PP-19 Bizon-2-01 class CBA_9x19_PP2000 {}; // PP-2000 SMG + class CBA_9x19_ScorpionEvo3 { // CZ Scorpion Evo 3 + BI_mags[] = { + "30Rnd_9x21_Mag_SMG_02", + "30Rnd_9x21_Mag_SMG_02_Tracer_Red", + "30Rnd_9x21_Mag_SMG_02_Tracer_Yellow", + "30Rnd_9x21_Mag_SMG_02_Tracer_Green", + "30Rnd_9x21_Mag", + "30Rnd_9x21_Red_Mag", + "30Rnd_9x21_Yellow_Mag", + "30Rnd_9x21_Green_Mag" + }; + }; class CBA_9x19_STEN {}; // STEN class CBA_9x19_STEYR {}; // AUG SMG, MPi, TMP class CBA_9x19_TT {}; // TT-33 Tokarev in 9x19mm (M48, Tokagypt 58, Type 54) From 9572cff9dbc9ed584e1cb646dad4eee3e667b690 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 23 Feb 2019 10:49:23 -0600 Subject: [PATCH 7/8] Fix jam base class --- addons/jam/CfgWeapons.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/jam/CfgWeapons.hpp b/addons/jam/CfgWeapons.hpp index 67a987284..5c992b835 100644 --- a/addons/jam/CfgWeapons.hpp +++ b/addons/jam/CfgWeapons.hpp @@ -3,6 +3,7 @@ class CfgWeapons { class Rifle_Base_F; class Rifle_Long_Base_F; class Launcher_Base_F; + class Rifle_Short_Base_F; class mk20_base_F: Rifle_Base_F { magazineWell[] = {"CBA_556x45_STANAG", "CBA_556x45_STANAG_L", "CBA_556x45_STANAG_XL", "CBA_556x45_STANAG_2D"}; From bc5bb825a845d48d1fd4ce603abda1d651999d9a Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 23 Feb 2019 10:49:46 -0600 Subject: [PATCH 8/8] Versioning - allow caching --- addons/versioning/CfgEventHandlers.hpp | 2 +- addons/versioning/XEH_postInitClient.sqf | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/versioning/CfgEventHandlers.hpp b/addons/versioning/CfgEventHandlers.hpp index 34f8263d7..e639e9848 100644 --- a/addons/versioning/CfgEventHandlers.hpp +++ b/addons/versioning/CfgEventHandlers.hpp @@ -14,6 +14,6 @@ class Extended_PostInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_postInit)); serverInit = QUOTE(call COMPILE_FILE(XEH_postInitServer)); - clientInit = QUOTE(if !(isServer) then {call COMPILE_FILE(XEH_postInitClient)}); + clientInit = QUOTE(call COMPILE_FILE(XEH_postInitClient)); }; }; diff --git a/addons/versioning/XEH_postInitClient.sqf b/addons/versioning/XEH_postInitClient.sqf index 9ea5308d8..9435fdb77 100644 --- a/addons/versioning/XEH_postInitClient.sqf +++ b/addons/versioning/XEH_postInitClient.sqf @@ -1,5 +1,7 @@ #include "script_component.hpp" +if (isServer) exitWith {}; + SLX_XEH_STR spawn { waitUntil {!(isNil QGVAR(versions_serv))}; if (!SLX_XEH_DisableLogging) then {