Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessory cleanup #787

Merged
merged 1 commit into from
Nov 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions addons/accessory/XEH_preInitClient.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "XEH_PREP.sqf"

["CBA Accessory Functions", "MRT_SwitchItemNextClass_R", [localize LSTRING(railNext),localize LSTRING(railNext_tooltip)], {[1,"next"] call FUNC(switchAttachment)}, {}, [38, [false, true, false]]] call cba_fnc_addKeybind; //default ctrl + L
["CBA Accessory Functions", "MRT_SwitchItemPrevClass_R", [localize LSTRING(railPrev),localize LSTRING(railPrev_tooltip)], {[1,"prev"] call FUNC(switchAttachment)}, {}, [38, [true, false, false]]] call cba_fnc_addKeybind; //default shift + L
["CBA Accessory Functions", "MRT_SwitchItemNextClass_O", [localize LSTRING(opticNext),localize LSTRING(opticNext_tooltip)], {[2,"next"] call FUNC(switchAttachment)}, {}, [181, [false, true, false]]] call cba_fnc_addKeybind; //default ctlr + NUM-/
["CBA Accessory Functions", "MRT_SwitchItemPrevClass_O", [localize LSTRING(opticPrev),localize LSTRING(opticPrev_tooltip)], {[2,"prev"] call FUNC(switchAttachment)}, {}, [181, [true, false, false]]] call cba_fnc_addKeybind; //default shift + NUM-/
["CBA Accessory Functions", "MRT_SwitchItemNextClass_R", [localize LSTRING(railNext), localize LSTRING(railNext_tooltip)], {[1, "next"] call FUNC(switchAttachment)}, {}, [38, [false, true, false]]] call cba_fnc_addKeybind; //default ctrl + L
["CBA Accessory Functions", "MRT_SwitchItemPrevClass_R", [localize LSTRING(railPrev), localize LSTRING(railPrev_tooltip)], {[1, "prev"] call FUNC(switchAttachment)}, {}, [38, [true, false, false]]] call cba_fnc_addKeybind; //default shift + L
["CBA Accessory Functions", "MRT_SwitchItemNextClass_O", [localize LSTRING(opticNext), localize LSTRING(opticNext_tooltip)], {[2, "next"] call FUNC(switchAttachment)}, {}, [181, [false, true, false]]] call cba_fnc_addKeybind; //default ctlr + NUM-/
["CBA Accessory Functions", "MRT_SwitchItemPrevClass_O", [localize LSTRING(opticPrev), localize LSTRING(opticPrev_tooltip)], {[2, "prev"] call FUNC(switchAttachment)}, {}, [181, [true, false, false]]] call cba_fnc_addKeybind; //default shift + NUM-/
2 changes: 1 addition & 1 deletion addons/accessory/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"CBA_main"};
authors[] = {"da12thMonkey","Robalo","Tupolov"};
authors[] = {"da12thMonkey", "Robalo", "Tupolov"};
version = VERSION;
versionDesc = "MRT Attachment Functions";
};
Expand Down
8 changes: 4 additions & 4 deletions addons/accessory/fnc_switchAttachment.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ Author:
---------------------------------------------------------------------------- */
#include "script_component.hpp"

params ["_itemType","_switchTo"];
params ["_itemType", "_switchTo"];

private ["_currWeaponType","_currItem","_switchItem"];
private ["_currWeaponType", "_currItem", "_switchItem"];
private _unit = call CBA_fnc_currentUnit;
private _cw = currentWeapon _unit;

Expand Down Expand Up @@ -67,9 +67,9 @@ if (!isNil "_switchItem") then {
_unit addSecondaryWeaponItem _switchItem;
};
};
private _switchItemHintText = (__cfgWeapons >> _switchItem >> "MRT_SwitchItemHintText") call bis_fnc_getcfgdata;
private _switchItemHintText = (__cfgWeapons >> _switchItem >> "MRT_SwitchItemHintText") call BIS_fnc_getCfgData;
if (!isNil "_switchItemHintText") then {
hintSilent format ["%1",_switchItemHintText];
hintSilent format ["%1", _switchItemHintText];
};
playSound "click";
["CBA_attachmentSwitched", [_unit, _currItem, _switchItem, _currWeaponType]] call CBA_fnc_localEvent;
Expand Down
9 changes: 9 additions & 0 deletions addons/accessory/script_component.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
#define COMPONENT accessory
#include "\x\cba\addons\main\script_mod.hpp"

#ifdef DEBUG_ENABLED_ACCESSORY
#define DEBUG_MODE_FULL
#endif

#ifdef DEBUG_SETTINGS_ACCESSORY
#define DEBUG_SETTINGS DEBUG_SETTINGS_ACCESSORY
#endif

#include "\x\cba\addons\main\script_macros.hpp"