manual merge

This commit is contained in:
commy2 2015-04-13 20:20:55 +02:00
commit 804079cfae
7 changed files with 64 additions and 40 deletions

View File

@ -74,3 +74,4 @@ Aleksey EpMAK Yermakov <epmak777@gmail.com>
ruPaladin <happyworm24@rambler.ru>
BlackPixxel
Asgar Serran <piechottaf@web.de>
Kavinsky <nmunozfernandez@gmail.com>

View File

@ -2,11 +2,31 @@
class CfgMagazines {
class CA_Magazine;
class B_IR_Grenade: CA_Magazine {
ACE_Attachable = 1;
ACE_Attachable = "B_IRStrobe";
};
class O_IR_Grenade: B_IR_Grenade {
ACE_Attachable = "O_IRStrobe";
};
class I_IR_Grenade: B_IR_Grenade {
ACE_Attachable = "I_IRStrobe";
};
class SmokeShell;
class Chemlight_green: SmokeShell {
ACE_Attachable = 1;
ACE_Attachable = "Chemlight_green";
};
class Chemlight_blue: Chemlight_green {
ACE_Attachable = "Chemlight_blue";
};
class Chemlight_red: Chemlight_green {
ACE_Attachable = "Chemlight_red";
};
class Chemlight_yellow: Chemlight_green {
ACE_Attachable = "Chemlight_yellow";
};
};

View File

@ -4,7 +4,7 @@ class CfgWeapons {
class InventoryItem_Base_F;
class ACE_IR_Strobe_Item: ACE_ItemCore {
ACE_attachable = 1;
ACE_attachable = "ACE_IR_Strobe_Effect";
author = "$STR_ACE_Common_ACETeam";
scope = 2;
displayName = "$STR_ACE_IrStrobe_Name";

View File

@ -25,35 +25,19 @@ _itemClassname = [_args, 0, ""] call CBA_fnc_defaultParam;
//Sanity Check (_unit has item in inventory, not over attach limit)
if ((_itemClassname == "") || {!(_this call FUNC(canAttach))}) exitWith {ERROR("Tried to attach, but check failed");};
_itemVehClass = "";
_onAtachText = "";
_selfAttachPosition = [_unit, [-0.05, 0, 0.12], "rightshoulder"];
switch (true) do {
case (_itemClassname == "ACE_IR_Strobe_Item"): {
_itemVehClass = "ACE_IR_Strobe_Effect";
_onAtachText = localize "STR_ACE_Attach_IrStrobe_Attached";
//_selfAttachPosition = [_unit, [0, -0.11, 0.16], "pilot"]; //makes it attach to the head a bit better, shoulder is not good for visibility - eRazeri
};
case (_itemClassname == "B_IR_Grenade"): {
_itemVehClass = "B_IRStrobe";
_onAtachText = localize "STR_ACE_Attach_IrGrenade_Attached";
};
case (_itemClassname == "O_IR_Grenade"): {
_itemVehClass = "O_IRStrobe";
_onAtachText = localize "STR_ACE_Attach_IrGrenade_Attached";
};
case (_itemClassname == "I_IR_Grenade"): {
_itemVehClass = "I_IRStrobe";
_onAtachText = localize "STR_ACE_Attach_IrGrenade_Attached";
};
case (toLower _itemClassname in ["chemlight_blue", "chemlight_green", "chemlight_red", "chemlight_yellow"]): {
_itemVehClass = _itemClassname;
_onAtachText = localize "STR_ACE_Attach_Chemlight_Attached";
};
_itemVehClass = getText (configFile >> "CfgWeapons" >> _itemClassname >> "ACE_Attachable");
_onAtachText = getText (configFile >> "CfgWeapons" >> _itemClassname >> "displayName");
if (_itemVehClass == "") then {
_itemVehClass = getText (configFile >> "CfgMagazines" >> _itemClassname >> "ACE_Attachable");
_onAtachText = getText (configFile >> "CfgMagazines" >> _itemClassname >> "displayName");
};
if (_itemVehClass == "") exitWith {ERROR("no _itemVehClass for Item");};
if (_itemVehClass == "") exitWith {ERROR("no ACE_Attachable for Item");};
_onAtachText = format [localize "STR_ACE_Attach_Item_Attached", _onAtachText];
if (_unit == _attachToVehicle) then { //Self Attachment
_unit removeItem _itemClassname; // Remove item

View File

@ -73,14 +73,9 @@ _attachToVehicle setVariable [QGVAR(Objects), _attachedObjects, true];
_attachToVehicle setVariable [QGVAR(ItemNames), _attachedItems, true];
// Display message
switch (true) do {
case (_itemName == "ACE_IR_Strobe_Item") : {
[localize "STR_ACE_Attach_IrStrobe_Detached"] call EFUNC(common,displayTextStructured);
};
case (toLower _itemName in ["b_ir_grenade", "o_ir_grenade", "i_ir_grenade"]) : {
[localize "STR_ACE_Attach_IrGrenade_Detached"] call EFUNC(common,displayTextStructured);
};
case (toLower _itemName in ["chemlight_blue", "chemlight_green", "chemlight_red", "chemlight_yellow"]) : {
[localize "STR_ACE_Attach_Chemlight_Detached"] call EFUNC(common,displayTextStructured);
};
_itemDisplayName = getText (configFile >> "CfgWeapons" >> _itemName >> "displayName");
if (_itemDisplayName == "") then {
_itemDisplayName = getText (configFile >> "CfgMagazines" >> _itemName >> "displayName");
};
[format [localize "STR_ACE_Attach_Item_Detached", _itemDisplayName]] call EFUNC(common,displayTextStructured);

View File

@ -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);

View File

@ -178,5 +178,29 @@
<Czech>Připnutí selhalo</Czech>
<Polish>Przyczepianie nie powiodło się</Polish>
</Key>
<Key ID="STR_ACE_Attach_Item_Attached">
<English>%1&lt;br/&gt;Attached</English>
<German>%1&lt;br/&gt;befestigt</German>
<Spanish>%1&lt;br/&gt;acoplada</Spanish>
<Polish>%1&lt;br/&gt;Przyczepiono</Polish>
<French>%1&lt;br/&gt;attachée</French>
<Czech>%1&lt;br/&gt;Připnutý</Czech>
<Portuguese>%1&lt;br/&gt;Acoplada</Portuguese>
<Italian>%1&lt;br/&gt;attaccata</Italian>
<Hungarian>%1&lt;br/&gt;hozzácsatolva</Hungarian>
<Russian>%1&lt;br/&gt;присоединена</Russian>
</Key>
<Key ID="STR_ACE_Attach_Item_Detached">
<English>%1&lt;br/&gt;Detached</English>
<German>%1&lt;br/&gt;entfernt</German>
<Spanish>%1&lt;br/&gt;quitada</Spanish>
<Polish>%1&lt;br/&gt;Odczepiono</Polish>
<French>%1&lt;br/&gt;détachée</French>
<Czech>%1&lt;br/&gt;Odepnutý</Czech>
<Portuguese>%1&lt;br/&gt;Separada</Portuguese>
<Italian>%1&lt;br/&gt;staccata</Italian>
<Hungarian>%1&lt;br/&gt;lecsatolva</Hungarian>
<Russian>%1&lt;br/&gt;отсоединена</Russian>
</Key>
</Package>
</Project>