mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
unified ACE_Attachable config entry now ACE_Attachable its a string and hold the effect for the item
This commit is contained in:
@ -27,15 +27,15 @@ if ((_itemClassname == "") || {!(_this call FUNC(canAttach))}) exitWith {ERROR("
|
||||
|
||||
_selfAttachPosition = [_unit, [-0.05, 0, 0.12], "rightshoulder"];
|
||||
|
||||
_itemVehClass = getText (configFile >> "CfgWeapons" >> _itemClassname >> "ACE_attachable_effect");
|
||||
_itemVehClass = getText (configFile >> "CfgWeapons" >> _itemClassname >> "ACE_Attachable");
|
||||
_onAtachText = getText (configFile >> "CfgWeapons" >> _itemClassname >> "displayName");
|
||||
|
||||
if (_itemVehClass == "") then {
|
||||
_itemVehClass = getText (configFile >> "CfgMagazines" >> _itemClassname >> "ACE_attachable_effect");
|
||||
_itemVehClass = getText (configFile >> "CfgMagazines" >> _itemClassname >> "ACE_Attachable");
|
||||
_onAtachText = getText (configFile >> "CfgMagazines" >> _itemClassname >> "displayName");
|
||||
};
|
||||
|
||||
if (_itemVehClass == "") exitWith {ERROR("no ACE_attachable_effect for Item");};
|
||||
if (_itemVehClass == "") exitWith {ERROR("no ACE_Attachable for Item");};
|
||||
|
||||
_onAtachText = format [localize "STR_ACE_Attach_Item_Attached", _onAtachText];
|
||||
|
||||
|
@ -26,7 +26,7 @@ _actions = [];
|
||||
if !(_x in _listed) then {
|
||||
_listed pushBack _x;
|
||||
_item = ConfigFile >> "CfgMagazines" >> _x;
|
||||
if (getNumber (_item >> "ACE_Attachable") == 1) then {
|
||||
if (getText (_item >> "ACE_Attachable") != "") then {
|
||||
_displayName = getText(_item >> "displayName");
|
||||
_picture = getText(_item >> "picture");
|
||||
_action = [_x, _displayName, _picture, {_this call FUNC(attach)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction);
|
||||
@ -39,7 +39,7 @@ _actions = [];
|
||||
if !(_x in _listed) then {
|
||||
_listed pushBack _x;
|
||||
_item = ConfigFile >> "CfgWeapons" >> _x;
|
||||
if (getNumber (_item >> "ACE_Attachable") == 1) then {
|
||||
if (getText (_item >> "ACE_Attachable") != "") then {
|
||||
_displayName = getText(_item >> "displayName");
|
||||
_picture = getText(_item >> "picture");
|
||||
_action = [_x, _displayName, _picture, {_this call FUNC(attach)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction);
|
||||
|
Reference in New Issue
Block a user