mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Tag replacements in attach
This commit is contained in:
parent
e24d6aa42f
commit
e090119d82
@ -3,7 +3,7 @@
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {};
|
||||
weapons[] = {"AGM_IR_Strobe_Item"};
|
||||
weapons[] = {"ACE_IR_Strobe_Item"};
|
||||
requiredVersion = 0.60;
|
||||
requiredAddons[] = {"ace_common", "ace_interaction"};
|
||||
version = "0.95";
|
||||
@ -42,20 +42,20 @@ class CfgVehicles {
|
||||
class ACE_SelfActions {
|
||||
class ACE_Equipment {
|
||||
class GVAR(Attach) {
|
||||
displayName = "$STR_AGM_Attach_AttachDetach";
|
||||
displayName = "$STR_ACE_Attach_AttachDetach";
|
||||
condition = QUOTE( [_player, ''] call FUNC(canAttach) );
|
||||
statement = QUOTE( [_player] call FUNC(openAttachUI); );
|
||||
exceptions[] = {"AGM_Drag_isNotDragging"};
|
||||
exceptions[] = {"ACE_Drag_isNotDragging"};
|
||||
showDisabled = 0;
|
||||
priority = 5;
|
||||
icon = PATHTOF(UI\attach_ca.paa);
|
||||
hotkey = "T";
|
||||
};
|
||||
class GVAR(Detach) {
|
||||
displayName = "$STR_AGM_Attach_Detach";
|
||||
displayName = "$STR_ACE_Attach_Detach";
|
||||
condition = QUOTE( [_player] call FUNC(canDetach) );
|
||||
statement = QUOTE( [_player] call FUNC(detach) );
|
||||
exceptions[] = {"AGM_Drag_isNotDragging"};
|
||||
exceptions[] = {"ACE_Drag_isNotDragging"};
|
||||
showDisabled = 0;
|
||||
priority = 5;
|
||||
icon = PATHTOF(UI\detach_ca.paa);
|
||||
@ -66,7 +66,7 @@ class CfgVehicles {
|
||||
};
|
||||
|
||||
class All;
|
||||
class AGM_IR_Strobe_Effect: All {
|
||||
class ACE_IR_Strobe_Effect: All {
|
||||
scope = 1;
|
||||
displayName = "IR Strobe";
|
||||
model = "\A3\Weapons_F\empty.p3d";
|
||||
@ -107,46 +107,46 @@ class CfgVehicles {
|
||||
|
||||
class Box_NATO_Support_F: NATO_Box_Base {
|
||||
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 TransportItems {
|
||||
MACRO_ADDITEM(AGM_IR_Strobe_Item,12)
|
||||
MACRO_ADDITEM(ACE_IR_Strobe_Item,12)
|
||||
};
|
||||
};
|
||||
|
||||
class Box_IND_Support_F: IND_Box_Base {
|
||||
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 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 {
|
||||
MACRO_ADDITEM(AGM_IR_Strobe_Item,12)
|
||||
MACRO_ADDITEM(ACE_IR_Strobe_Item,12)
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class CfgWeapons {
|
||||
class AGM_ItemCore;
|
||||
class ACE_ItemCore;
|
||||
class InventoryItem_Base_F;
|
||||
|
||||
class AGM_IR_Strobe_Item: AGM_ItemCore {
|
||||
displayName = "$STR_AGM_IrStrobe_Name";
|
||||
descriptionShort = "$STR_AGM_IrStrobe_Description";
|
||||
class ACE_IR_Strobe_Item: ACE_ItemCore {
|
||||
displayName = "$STR_ACE_IrStrobe_Name";
|
||||
descriptionShort = "$STR_ACE_IrStrobe_Description";
|
||||
model = "\A3\weapons_F\ammo\mag_univ.p3d";
|
||||
picture = PATHTOF(UI\irstrobe_item.paa);
|
||||
scope = 2;
|
||||
AGM_attachable = 1;
|
||||
ACE_attachable = 1;
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
mass = 1;
|
||||
};
|
||||
@ -156,10 +156,10 @@ class CfgWeapons {
|
||||
class CfgMagazines {
|
||||
class CA_Magazine;
|
||||
class B_IR_Grenade: CA_Magazine {
|
||||
AGM_Attachable = 1;
|
||||
ACE_Attachable = 1;
|
||||
};
|
||||
class SmokeShell;
|
||||
class Chemlight_green: SmokeShell {
|
||||
AGM_Attachable = 1;
|
||||
ACE_Attachable = 1;
|
||||
};
|
||||
};
|
||||
|
@ -25,7 +25,7 @@ if (_itemName == "") exitWith {};
|
||||
_count = (count items _unit) + (count magazines _unit);
|
||||
_unit addItem _itemName;
|
||||
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 {
|
||||
@ -45,14 +45,14 @@ _unit setVariable [QGVAR(Item),nil, true];
|
||||
|
||||
// Display message
|
||||
switch true do {
|
||||
case (_itemName == "AGM_IR_Strobe_Item") : {
|
||||
[localize "STR_AGM_Attach_IrStrobe_Detached"] call EFUNC(common,displayTextStructured);
|
||||
case (_itemName == "ACE_IR_Strobe_Item") : {
|
||||
[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") : {
|
||||
[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"}) : {
|
||||
[localize "STR_AGM_Attach_Chemlight_Detached"] call EFUNC(common,displayTextStructured);
|
||||
[localize "STR_ACE_Attach_Chemlight_Detached"] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
default {
|
||||
if (true) exitWith {};
|
||||
|
@ -1,6 +1,4 @@
|
||||
/*
|
||||
Name: ACE_attach_fnc_detachFix
|
||||
|
||||
Author: Pabst Mirror
|
||||
|
||||
Description:
|
||||
|
@ -1,8 +1,6 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
/*
|
||||
Name: AGM_Attach_fnc_openAttachUI
|
||||
|
||||
Author: Garth de Wet (LH)
|
||||
|
||||
Description:
|
||||
@ -15,17 +13,17 @@
|
||||
Nothing
|
||||
|
||||
Example:
|
||||
[player] call AGM_Attach_fnc_openAttachUI;
|
||||
[player] call ACE_Attach_fnc_openAttachUI;
|
||||
*/
|
||||
private ["_unit", "_actions", "_attachables", "_item"];
|
||||
_unit = _this select 0;
|
||||
_listed = [];
|
||||
_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 {
|
||||
_item = ConfigFile >> "CfgMagazines" >> _x;
|
||||
if (getNumber (_item >> "AGM_Attachable") == 1) then {
|
||||
if (getNumber (_item >> "ACE_Attachable") == 1) then {
|
||||
_actions = [
|
||||
_actions,
|
||||
getText(_item >> "displayName"),
|
||||
@ -40,7 +38,7 @@ _attachables = items _unit;
|
||||
{
|
||||
if !(_x in _listed) then {
|
||||
_item = ConfigFile >> "CfgWeapons" >> _x;
|
||||
if (getNumber (_item >> "AGM_Attachable") == 1) then {
|
||||
if (getNumber (_item >> "ACE_Attachable") == 1) then {
|
||||
_actions = [
|
||||
_actions,
|
||||
getText(_item >> "displayName"),
|
||||
@ -55,7 +53,7 @@ _attachables = items _unit;
|
||||
[
|
||||
_actions,
|
||||
{
|
||||
[AGM_player, _this] call FUNC(attach);
|
||||
[ACE_player, _this] call FUNC(attach);
|
||||
call EFUNC(interaction,hideMenu);
|
||||
},
|
||||
{
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Edited with tabler - 2014-12-12 -->
|
||||
<Project name="AGM">
|
||||
<Project name="ACE">
|
||||
<Package name="Attach">
|
||||
<Key ID="STR_AGM_Attach_AttachDetach">
|
||||
<Key ID="STR_ACE_Attach_AttachDetach">
|
||||
<English>Attach item >></English>
|
||||
<German>Gegenstand befestigen >></German>
|
||||
<Spanish>Acoplar objeto >></Spanish>
|
||||
@ -14,7 +14,7 @@
|
||||
<Hungarian>Tárgy hozzácsatolása >></Hungarian>
|
||||
<Russian>Добавить приспособления</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Attach_Attach">
|
||||
<Key ID="STR_ACE_Attach_Attach">
|
||||
<English>Attach</English>
|
||||
<German>Befestigen</German>
|
||||
<Spanish>Acoplar</Spanish>
|
||||
@ -26,7 +26,7 @@
|
||||
<Hungarian>Hozzácsatolás</Hungarian>
|
||||
<Russian>Присоединить</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Attach_Detach">
|
||||
<Key ID="STR_ACE_Attach_Detach">
|
||||
<English>Detach item</English>
|
||||
<German>Gegenstand entfernen</German>
|
||||
<Spanish>Quitar objeto</Spanish>
|
||||
@ -38,7 +38,7 @@
|
||||
<Hungarian>Tárgy lecsatolása</Hungarian>
|
||||
<Russian>Отсоединить</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Attach_IrStrobe_Attached">
|
||||
<Key ID="STR_ACE_Attach_IrStrobe_Attached">
|
||||
<English>IR Strobe Attached</English>
|
||||
<German>IR-Stroboskop befestigt</German>
|
||||
<Spanish>Marcador IR acoplado</Spanish>
|
||||
@ -50,7 +50,7 @@
|
||||
<Hungarian>Infravörös jeladó hozzácsatolva</Hungarian>
|
||||
<Russian>ИК строб присоединён</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Attach_IrStrobe_Detached">
|
||||
<Key ID="STR_ACE_Attach_IrStrobe_Detached">
|
||||
<English>IR Strobe Detached</English>
|
||||
<German>IR-Stroboskop entfernt</German>
|
||||
<Spanish>Marcador IR quitado</Spanish>
|
||||
@ -62,7 +62,7 @@
|
||||
<Hungarian>Infravörös jeladó lecsatolva</Hungarian>
|
||||
<Russian>ИК строб отсоединён</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Attach_IrGrenade_Attached">
|
||||
<Key ID="STR_ACE_Attach_IrGrenade_Attached">
|
||||
<English>IR Grenade Attached</English>
|
||||
<German>IR-Granate befestigt</German>
|
||||
<Spanish>Granada IR acoplada</Spanish>
|
||||
@ -74,7 +74,7 @@
|
||||
<Hungarian>Infravörös gránát hozzácsatolva</Hungarian>
|
||||
<Russian>ИК граната присоединена</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Attach_IrGrenade_Detached">
|
||||
<Key ID="STR_ACE_Attach_IrGrenade_Detached">
|
||||
<English>IR Grenade Detached</English>
|
||||
<German>IR-Granate entfernt</German>
|
||||
<Spanish>Granada IR quitada</Spanish>
|
||||
@ -86,7 +86,7 @@
|
||||
<Hungarian>Infravörös gránát lecsatolva</Hungarian>
|
||||
<Russian>ИК граната отсоединена</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Attach_Chemlight_Attached">
|
||||
<Key ID="STR_ACE_Attach_Chemlight_Attached">
|
||||
<English>Chemlight Attached</English>
|
||||
<German>Leuchtstab befestigt</German>
|
||||
<Spanish>Barra de luz acoplada</Spanish>
|
||||
@ -98,7 +98,7 @@
|
||||
<Hungarian>Chemlight hozzácsatolva</Hungarian>
|
||||
<Russian>Химсвет присоединён</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Attach_Chemlight_Detached">
|
||||
<Key ID="STR_ACE_Attach_Chemlight_Detached">
|
||||
<English>Chemlight Detached</English>
|
||||
<German>Leuchtstab entfernt</German>
|
||||
<Spanish>Barra de luz quitada</Spanish>
|
||||
@ -110,7 +110,7 @@
|
||||
<Hungarian>Chemlight hozzácsatolva</Hungarian>
|
||||
<Russian>Химсвет отсоединён</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Attach_Inventory_Full">
|
||||
<Key ID="STR_ACE_Attach_Inventory_Full">
|
||||
<English>No inventory space</English>
|
||||
<German>Kein Platz im Inventar</German>
|
||||
<Spanish>Sin espacio en inventario</Spanish>
|
||||
@ -122,7 +122,7 @@
|
||||
<Hungarian>Nincs több hely</Hungarian>
|
||||
<Russian>В инвентаре нет места</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_IrStrobe_Name">
|
||||
<Key ID="STR_ACE_IrStrobe_Name">
|
||||
<English>IR Strobe</English>
|
||||
<German>IR-Stroboskop</German>
|
||||
<Spanish>Marcador IR</Spanish>
|
||||
@ -134,7 +134,7 @@
|
||||
<Hungarian>Infravörös jeladó</Hungarian>
|
||||
<Russian>ИК строб</Russian>
|
||||
</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>
|
||||
<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>
|
||||
|
Loading…
Reference in New Issue
Block a user