Tag replacements in attach

This commit is contained in:
Nicolás Badano
2015-01-13 20:00:31 -03:00
parent e24d6aa42f
commit e090119d82
5 changed files with 42 additions and 46 deletions

View File

@ -3,7 +3,7 @@
class CfgPatches { class CfgPatches {
class ADDON { class ADDON {
units[] = {}; units[] = {};
weapons[] = {"AGM_IR_Strobe_Item"}; weapons[] = {"ACE_IR_Strobe_Item"};
requiredVersion = 0.60; requiredVersion = 0.60;
requiredAddons[] = {"ace_common", "ace_interaction"}; requiredAddons[] = {"ace_common", "ace_interaction"};
version = "0.95"; version = "0.95";
@ -42,20 +42,20 @@ class CfgVehicles {
class ACE_SelfActions { class ACE_SelfActions {
class ACE_Equipment { class ACE_Equipment {
class GVAR(Attach) { class GVAR(Attach) {
displayName = "$STR_AGM_Attach_AttachDetach"; displayName = "$STR_ACE_Attach_AttachDetach";
condition = QUOTE( [_player, ''] call FUNC(canAttach) ); condition = QUOTE( [_player, ''] call FUNC(canAttach) );
statement = QUOTE( [_player] call FUNC(openAttachUI); ); statement = QUOTE( [_player] call FUNC(openAttachUI); );
exceptions[] = {"AGM_Drag_isNotDragging"}; exceptions[] = {"ACE_Drag_isNotDragging"};
showDisabled = 0; showDisabled = 0;
priority = 5; priority = 5;
icon = PATHTOF(UI\attach_ca.paa); icon = PATHTOF(UI\attach_ca.paa);
hotkey = "T"; hotkey = "T";
}; };
class GVAR(Detach) { class GVAR(Detach) {
displayName = "$STR_AGM_Attach_Detach"; displayName = "$STR_ACE_Attach_Detach";
condition = QUOTE( [_player] call FUNC(canDetach) ); condition = QUOTE( [_player] call FUNC(canDetach) );
statement = QUOTE( [_player] call FUNC(detach) ); statement = QUOTE( [_player] call FUNC(detach) );
exceptions[] = {"AGM_Drag_isNotDragging"}; exceptions[] = {"ACE_Drag_isNotDragging"};
showDisabled = 0; showDisabled = 0;
priority = 5; priority = 5;
icon = PATHTOF(UI\detach_ca.paa); icon = PATHTOF(UI\detach_ca.paa);
@ -66,7 +66,7 @@ class CfgVehicles {
}; };
class All; class All;
class AGM_IR_Strobe_Effect: All { class ACE_IR_Strobe_Effect: All {
scope = 1; scope = 1;
displayName = "IR Strobe"; displayName = "IR Strobe";
model = "\A3\Weapons_F\empty.p3d"; model = "\A3\Weapons_F\empty.p3d";
@ -107,46 +107,46 @@ class CfgVehicles {
class Box_NATO_Support_F: NATO_Box_Base { class Box_NATO_Support_F: NATO_Box_Base {
class TransportItems { class TransportItems {
MACRO_ADDITEM(AGM_IR_Strobe_Item,12) MACRO_ADDITEM(ACE_IR_Strobe_Item,12)
}; };
}; };
class Box_East_Support_F: EAST_Box_Base { class Box_East_Support_F: EAST_Box_Base {
class TransportItems { class TransportItems {
MACRO_ADDITEM(AGM_IR_Strobe_Item,12) MACRO_ADDITEM(ACE_IR_Strobe_Item,12)
}; };
}; };
class Box_IND_Support_F: IND_Box_Base { class Box_IND_Support_F: IND_Box_Base {
class TransportItems { class TransportItems {
MACRO_ADDITEM(AGM_IR_Strobe_Item,12) MACRO_ADDITEM(ACE_IR_Strobe_Item,12)
}; };
}; };
class Box_FIA_Support_F: FIA_Box_Base_F { class Box_FIA_Support_F: FIA_Box_Base_F {
class TransportItems { class TransportItems {
MACRO_ADDITEM(AGM_IR_Strobe_Item,12) MACRO_ADDITEM(ACE_IR_Strobe_Item,12)
}; };
}; };
class AGM_Box_Misc: Box_NATO_Support_F { class ACE_Box_Misc: Box_NATO_Support_F {
class TransportItems { class TransportItems {
MACRO_ADDITEM(AGM_IR_Strobe_Item,12) MACRO_ADDITEM(ACE_IR_Strobe_Item,12)
}; };
}; };
}; };
class CfgWeapons { class CfgWeapons {
class AGM_ItemCore; class ACE_ItemCore;
class InventoryItem_Base_F; class InventoryItem_Base_F;
class AGM_IR_Strobe_Item: AGM_ItemCore { class ACE_IR_Strobe_Item: ACE_ItemCore {
displayName = "$STR_AGM_IrStrobe_Name"; displayName = "$STR_ACE_IrStrobe_Name";
descriptionShort = "$STR_AGM_IrStrobe_Description"; descriptionShort = "$STR_ACE_IrStrobe_Description";
model = "\A3\weapons_F\ammo\mag_univ.p3d"; model = "\A3\weapons_F\ammo\mag_univ.p3d";
picture = PATHTOF(UI\irstrobe_item.paa); picture = PATHTOF(UI\irstrobe_item.paa);
scope = 2; scope = 2;
AGM_attachable = 1; ACE_attachable = 1;
class ItemInfo: InventoryItem_Base_F { class ItemInfo: InventoryItem_Base_F {
mass = 1; mass = 1;
}; };
@ -156,10 +156,10 @@ class CfgWeapons {
class CfgMagazines { class CfgMagazines {
class CA_Magazine; class CA_Magazine;
class B_IR_Grenade: CA_Magazine { class B_IR_Grenade: CA_Magazine {
AGM_Attachable = 1; ACE_Attachable = 1;
}; };
class SmokeShell; class SmokeShell;
class Chemlight_green: SmokeShell { class Chemlight_green: SmokeShell {
AGM_Attachable = 1; ACE_Attachable = 1;
}; };
}; };

View File

@ -25,7 +25,7 @@ if (_itemName == "") exitWith {};
_count = (count items _unit) + (count magazines _unit); _count = (count items _unit) + (count magazines _unit);
_unit addItem _itemName; _unit addItem _itemName;
if ((count items _unit) + (count magazines _unit) <= _count) exitWith { if ((count items _unit) + (count magazines _unit) <= _count) exitWith {
[localize "STR_AGM_Attach_Inventory_Full"] call EFUNC(common,displayTextStructured); [localize "STR_ACE_Attach_Inventory_Full"] call EFUNC(common,displayTextStructured);
}; };
if (_itemName == "B_IR_Grenade" or _itemName == "O_IR_Grenade" or _itemName == "I_IR_Grenade") then { if (_itemName == "B_IR_Grenade" or _itemName == "O_IR_Grenade" or _itemName == "I_IR_Grenade") then {
@ -45,14 +45,14 @@ _unit setVariable [QGVAR(Item),nil, true];
// Display message // Display message
switch true do { switch true do {
case (_itemName == "AGM_IR_Strobe_Item") : { case (_itemName == "ACE_IR_Strobe_Item") : {
[localize "STR_AGM_Attach_IrStrobe_Detached"] call EFUNC(common,displayTextStructured); [localize "STR_ACE_Attach_IrStrobe_Detached"] call EFUNC(common,displayTextStructured);
}; };
case (_itemName == "B_IR_Grenade" or _itemName == "O_IR_Grenade" or _itemName == "I_IR_Grenade") : { case (_itemName == "B_IR_Grenade" or _itemName == "O_IR_Grenade" or _itemName == "I_IR_Grenade") : {
[localize "STR_AGM_Attach_IrGrenade_Detached"] call EFUNC(common,displayTextStructured); [localize "STR_ACE_Attach_IrGrenade_Detached"] call EFUNC(common,displayTextStructured);
}; };
case (_itemName == "Chemlight_blue" or {_itemName == "Chemlight_green"} or {_itemName == "Chemlight_red"} or {_itemName == "Chemlight_yellow"}) : { case (_itemName == "Chemlight_blue" or {_itemName == "Chemlight_green"} or {_itemName == "Chemlight_red"} or {_itemName == "Chemlight_yellow"}) : {
[localize "STR_AGM_Attach_Chemlight_Detached"] call EFUNC(common,displayTextStructured); [localize "STR_ACE_Attach_Chemlight_Detached"] call EFUNC(common,displayTextStructured);
}; };
default { default {
if (true) exitWith {}; if (true) exitWith {};

View File

@ -1,6 +1,4 @@
/* /*
Name: ACE_attach_fnc_detachFix
Author: Pabst Mirror Author: Pabst Mirror
Description: Description:

View File

@ -1,8 +1,6 @@
#include "script_component.hpp" #include "script_component.hpp"
/* /*
Name: AGM_Attach_fnc_openAttachUI
Author: Garth de Wet (LH) Author: Garth de Wet (LH)
Description: Description:
@ -15,17 +13,17 @@
Nothing Nothing
Example: Example:
[player] call AGM_Attach_fnc_openAttachUI; [player] call ACE_Attach_fnc_openAttachUI;
*/ */
private ["_unit", "_actions", "_attachables", "_item"]; private ["_unit", "_actions", "_attachables", "_item"];
_unit = _this select 0; _unit = _this select 0;
_listed = []; _listed = [];
_attachables = magazines _unit; _attachables = magazines _unit;
_actions = [localize "STR_AGM_Attach_AttachDetach", localize "STR_AGM_Attach_Attach"] call EFUNC(interaction,prepareSelectMenu); _actions = [localize "STR_ACE_Attach_AttachDetach", localize "STR_ACE_Attach_Attach"] call EFUNC(interaction,prepareSelectMenu);
{ {
if !(_x in _listed) then { if !(_x in _listed) then {
_item = ConfigFile >> "CfgMagazines" >> _x; _item = ConfigFile >> "CfgMagazines" >> _x;
if (getNumber (_item >> "AGM_Attachable") == 1) then { if (getNumber (_item >> "ACE_Attachable") == 1) then {
_actions = [ _actions = [
_actions, _actions,
getText(_item >> "displayName"), getText(_item >> "displayName"),
@ -40,7 +38,7 @@ _attachables = items _unit;
{ {
if !(_x in _listed) then { if !(_x in _listed) then {
_item = ConfigFile >> "CfgWeapons" >> _x; _item = ConfigFile >> "CfgWeapons" >> _x;
if (getNumber (_item >> "AGM_Attachable") == 1) then { if (getNumber (_item >> "ACE_Attachable") == 1) then {
_actions = [ _actions = [
_actions, _actions,
getText(_item >> "displayName"), getText(_item >> "displayName"),
@ -55,7 +53,7 @@ _attachables = items _unit;
[ [
_actions, _actions,
{ {
[AGM_player, _this] call FUNC(attach); [ACE_player, _this] call FUNC(attach);
call EFUNC(interaction,hideMenu); call EFUNC(interaction,hideMenu);
}, },
{ {

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Edited with tabler - 2014-12-12 --> <!-- Edited with tabler - 2014-12-12 -->
<Project name="AGM"> <Project name="ACE">
<Package name="Attach"> <Package name="Attach">
<Key ID="STR_AGM_Attach_AttachDetach"> <Key ID="STR_ACE_Attach_AttachDetach">
<English>Attach item &gt;&gt;</English> <English>Attach item &gt;&gt;</English>
<German>Gegenstand befestigen &gt;&gt;</German> <German>Gegenstand befestigen &gt;&gt;</German>
<Spanish>Acoplar objeto &gt;&gt;</Spanish> <Spanish>Acoplar objeto &gt;&gt;</Spanish>
@ -14,7 +14,7 @@
<Hungarian>Tárgy hozzácsatolása &gt;&gt;</Hungarian> <Hungarian>Tárgy hozzácsatolása &gt;&gt;</Hungarian>
<Russian>Добавить приспособления</Russian> <Russian>Добавить приспособления</Russian>
</Key> </Key>
<Key ID="STR_AGM_Attach_Attach"> <Key ID="STR_ACE_Attach_Attach">
<English>Attach</English> <English>Attach</English>
<German>Befestigen</German> <German>Befestigen</German>
<Spanish>Acoplar</Spanish> <Spanish>Acoplar</Spanish>
@ -26,7 +26,7 @@
<Hungarian>Hozzácsatolás</Hungarian> <Hungarian>Hozzácsatolás</Hungarian>
<Russian>Присоединить</Russian> <Russian>Присоединить</Russian>
</Key> </Key>
<Key ID="STR_AGM_Attach_Detach"> <Key ID="STR_ACE_Attach_Detach">
<English>Detach item</English> <English>Detach item</English>
<German>Gegenstand entfernen</German> <German>Gegenstand entfernen</German>
<Spanish>Quitar objeto</Spanish> <Spanish>Quitar objeto</Spanish>
@ -38,7 +38,7 @@
<Hungarian>Tárgy lecsatolása</Hungarian> <Hungarian>Tárgy lecsatolása</Hungarian>
<Russian>Отсоединить</Russian> <Russian>Отсоединить</Russian>
</Key> </Key>
<Key ID="STR_AGM_Attach_IrStrobe_Attached"> <Key ID="STR_ACE_Attach_IrStrobe_Attached">
<English>IR Strobe Attached</English> <English>IR Strobe Attached</English>
<German>IR-Stroboskop befestigt</German> <German>IR-Stroboskop befestigt</German>
<Spanish>Marcador IR acoplado</Spanish> <Spanish>Marcador IR acoplado</Spanish>
@ -50,7 +50,7 @@
<Hungarian>Infravörös jeladó hozzácsatolva</Hungarian> <Hungarian>Infravörös jeladó hozzácsatolva</Hungarian>
<Russian>ИК строб присоединён</Russian> <Russian>ИК строб присоединён</Russian>
</Key> </Key>
<Key ID="STR_AGM_Attach_IrStrobe_Detached"> <Key ID="STR_ACE_Attach_IrStrobe_Detached">
<English>IR Strobe Detached</English> <English>IR Strobe Detached</English>
<German>IR-Stroboskop entfernt</German> <German>IR-Stroboskop entfernt</German>
<Spanish>Marcador IR quitado</Spanish> <Spanish>Marcador IR quitado</Spanish>
@ -62,7 +62,7 @@
<Hungarian>Infravörös jeladó lecsatolva</Hungarian> <Hungarian>Infravörös jeladó lecsatolva</Hungarian>
<Russian>ИК строб отсоединён</Russian> <Russian>ИК строб отсоединён</Russian>
</Key> </Key>
<Key ID="STR_AGM_Attach_IrGrenade_Attached"> <Key ID="STR_ACE_Attach_IrGrenade_Attached">
<English>IR Grenade Attached</English> <English>IR Grenade Attached</English>
<German>IR-Granate befestigt</German> <German>IR-Granate befestigt</German>
<Spanish>Granada IR acoplada</Spanish> <Spanish>Granada IR acoplada</Spanish>
@ -74,7 +74,7 @@
<Hungarian>Infravörös gránát hozzácsatolva</Hungarian> <Hungarian>Infravörös gránát hozzácsatolva</Hungarian>
<Russian>ИК граната присоединена</Russian> <Russian>ИК граната присоединена</Russian>
</Key> </Key>
<Key ID="STR_AGM_Attach_IrGrenade_Detached"> <Key ID="STR_ACE_Attach_IrGrenade_Detached">
<English>IR Grenade Detached</English> <English>IR Grenade Detached</English>
<German>IR-Granate entfernt</German> <German>IR-Granate entfernt</German>
<Spanish>Granada IR quitada</Spanish> <Spanish>Granada IR quitada</Spanish>
@ -86,7 +86,7 @@
<Hungarian>Infravörös gránát lecsatolva</Hungarian> <Hungarian>Infravörös gránát lecsatolva</Hungarian>
<Russian>ИК граната отсоединена</Russian> <Russian>ИК граната отсоединена</Russian>
</Key> </Key>
<Key ID="STR_AGM_Attach_Chemlight_Attached"> <Key ID="STR_ACE_Attach_Chemlight_Attached">
<English>Chemlight Attached</English> <English>Chemlight Attached</English>
<German>Leuchtstab befestigt</German> <German>Leuchtstab befestigt</German>
<Spanish>Barra de luz acoplada</Spanish> <Spanish>Barra de luz acoplada</Spanish>
@ -98,7 +98,7 @@
<Hungarian>Chemlight hozzácsatolva</Hungarian> <Hungarian>Chemlight hozzácsatolva</Hungarian>
<Russian>Химсвет присоединён</Russian> <Russian>Химсвет присоединён</Russian>
</Key> </Key>
<Key ID="STR_AGM_Attach_Chemlight_Detached"> <Key ID="STR_ACE_Attach_Chemlight_Detached">
<English>Chemlight Detached</English> <English>Chemlight Detached</English>
<German>Leuchtstab entfernt</German> <German>Leuchtstab entfernt</German>
<Spanish>Barra de luz quitada</Spanish> <Spanish>Barra de luz quitada</Spanish>
@ -110,7 +110,7 @@
<Hungarian>Chemlight hozzácsatolva</Hungarian> <Hungarian>Chemlight hozzácsatolva</Hungarian>
<Russian>Химсвет отсоединён</Russian> <Russian>Химсвет отсоединён</Russian>
</Key> </Key>
<Key ID="STR_AGM_Attach_Inventory_Full"> <Key ID="STR_ACE_Attach_Inventory_Full">
<English>No inventory space</English> <English>No inventory space</English>
<German>Kein Platz im Inventar</German> <German>Kein Platz im Inventar</German>
<Spanish>Sin espacio en inventario</Spanish> <Spanish>Sin espacio en inventario</Spanish>
@ -122,7 +122,7 @@
<Hungarian>Nincs több hely</Hungarian> <Hungarian>Nincs több hely</Hungarian>
<Russian>В инвентаре нет места</Russian> <Russian>В инвентаре нет места</Russian>
</Key> </Key>
<Key ID="STR_AGM_IrStrobe_Name"> <Key ID="STR_ACE_IrStrobe_Name">
<English>IR Strobe</English> <English>IR Strobe</English>
<German>IR-Stroboskop</German> <German>IR-Stroboskop</German>
<Spanish>Marcador IR</Spanish> <Spanish>Marcador IR</Spanish>
@ -134,7 +134,7 @@
<Hungarian>Infravörös jeladó</Hungarian> <Hungarian>Infravörös jeladó</Hungarian>
<Russian>ИК строб</Russian> <Russian>ИК строб</Russian>
</Key> </Key>
<Key ID="STR_AGM_IrStrobe_Description"> <Key ID="STR_ACE_IrStrobe_Description">
<English>IR Strobe allows you to signal your position through a pulsating beacon only visible with NVGs.</English> <English>IR Strobe allows you to signal your position through a pulsating beacon only visible with NVGs.</English>
<German>Das IR-Stroboskop erlaubt es dir deine Position mit einem blinkenden Leuchtfeuer zu signalisieren, welches nur mit Nachtsichtgerät zu erkennen ist.</German> <German>Das IR-Stroboskop erlaubt es dir deine Position mit einem blinkenden Leuchtfeuer zu signalisieren, welches nur mit Nachtsichtgerät zu erkennen ist.</German>
<Polish>Stroboskop światła podczerwieni umożliwia oznaczenie swojej pozycji pulsacyjnym światłem widocznym tylko przez optykę noktowizyjną i gogle noktowizyjne.</Polish> <Polish>Stroboskop światła podczerwieni umożliwia oznaczenie swojej pozycji pulsacyjnym światłem widocznym tylko przez optykę noktowizyjną i gogle noktowizyjne.</Polish>