diff --git a/addons/Attach/UI/attach_ca.paa b/addons/Attach/UI/attach_ca.paa deleted file mode 100644 index ec545508ba..0000000000 Binary files a/addons/Attach/UI/attach_ca.paa and /dev/null differ diff --git a/addons/Attach/UI/detach_ca.paa b/addons/Attach/UI/detach_ca.paa deleted file mode 100644 index 886c494d90..0000000000 Binary files a/addons/Attach/UI/detach_ca.paa and /dev/null differ diff --git a/addons/Attach/UI/irstrobe_item.paa b/addons/Attach/UI/irstrobe_item.paa deleted file mode 100644 index 376ea4c906..0000000000 Binary files a/addons/Attach/UI/irstrobe_item.paa and /dev/null differ diff --git a/addons/Attach/config.cpp b/addons/Attach/config.cpp deleted file mode 100644 index c5054ebd6e..0000000000 --- a/addons/Attach/config.cpp +++ /dev/null @@ -1,165 +0,0 @@ -#include "script_component.hpp" - -class CfgPatches { - class ADDON { - units[] = {}; - weapons[] = {"AGM_IR_Strobe_Item"}; - requiredVersion = 0.60; - requiredAddons[] = {AGM_Core, AGM_Interaction}; - version = "0.95"; - versionStr = "0.95"; - versionAr[] = {0,95,0}; - author[] = {"KoffeinFlummi", "eRazeri", "CAA-Picard"}; - authorUrl = "https://github.com/KoffeinFlummi/"; - }; -}; - -#include "CfgEventHandlers.hpp" - -/* -class CfgFunctions { - class ADDON { - class ADDON { - file = PATHTOF(functions); - class attach; - class canAttach; - class canDetach; - class detach; - class openAttachUI; - }; - }; -}; -*/ - -#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \ - name = #ITEM; \ - count = COUNT; \ -}; - -class CfgVehicles { - class Man; - class CAManBase: Man { - class AGM_SelfActions { - class AGM_Equipment { - class GVAR(Attach) { - displayName = "$STR_AGM_Attach_AttachDetach"; - condition = QUOTE( [_player, ''] call FUNC(canAttach) ); - statement = QUOTE( [_player] call FUNC(openAttachUI); ); - exceptions[] = {"AGM_Drag_isNotDragging"}; - showDisabled = 0; - priority = 5; - icon = PATHTOF(UI\attach_ca.paa); - hotkey = "T"; - }; - class GVAR(Detach) { - displayName = "$STR_AGM_Attach_Detach"; - condition = QUOTE( [_player] call FUNC(canDetach ); - statement = QUOTE( [_player] call FUNC(detach) ); - exceptions[] = {"AGM_Drag_isNotDragging"}; - showDisabled = 0; - priority = 5; - icon = PATHTOF(UI\detach_ca.paa); - hotkey = "T"; - }; - }; - }; - }; - - class All; - class AGM_IR_Strobe_Effect: All { - scope = 1; - displayName = "IR Strobe"; - model = "\A3\Weapons_F\empty.p3d"; - simulation = "nvmarker"; - - class NVGMarker { - diffuse[] = {0,0,0}; - ambient[] = {0,0,0}; - brightness = 0.004; - name = "pozicni blik"; - drawLight = 1; - drawLightSize = 0.005; - drawLightCenterSize = 0.003; - activeLight = 0; - blinking=1; - dayLight = 0; - onlyInNvg = 1; - useFlare = 0; - }; - side = 7;//-1=NO_SIDE yellow box,3=CIV grey box,4=NEUTRAL yellow box,6=FRIENDLY green box,7=LOGIC no radar signature - accuracy = 1000; - cost = 0; - armor = 500; - threat[] = {0,0,0}; - nameSound = ""; - type = 0; - weapons[] = {}; - magazines[] = {}; - nvTarget = 1; - destrType = "DestructNo"; - brightness = 20; - }; - - class NATO_Box_Base; - class EAST_Box_Base; - class IND_Box_Base; - class FIA_Box_Base_F; - - class Box_NATO_Support_F: NATO_Box_Base { - class TransportItems { - MACRO_ADDITEM(AGM_IR_Strobe_Item,12) - }; - }; - - class Box_East_Support_F: EAST_Box_Base { - class TransportItems { - MACRO_ADDITEM(AGM_IR_Strobe_Item,12) - }; - }; - - class Box_IND_Support_F: IND_Box_Base { - class TransportItems { - MACRO_ADDITEM(AGM_IR_Strobe_Item,12) - }; - }; - - class Box_FIA_Support_F: FIA_Box_Base_F { - class TransportItems { - MACRO_ADDITEM(AGM_IR_Strobe_Item,12) - }; - }; - - class AGM_Box_Misc: Box_NATO_Support_F { - class TransportItems { - MACRO_ADDITEM(AGM_IR_Strobe_Item,12) - }; - }; -}; - -class CfgWeapons { - class AGM_ItemCore; - class InventoryItem_Base_F; - - class AGM_IR_Strobe_Item: AGM_ItemCore { - displayName = "$STR_AGM_IrStrobe_Name"; - descriptionShort = "$STR_AGM_IrStrobe_Description"; - model = "\A3\weapons_F\ammo\mag_univ.p3d"; - picture = PATHTOF(UI\irstrobe_item.paa); - scope = 2; - AGM_attachable = 1; - class ItemInfo: InventoryItem_Base_F { - mass = 1; - }; - }; -}; - -class CfgMagazines { - class CA_Magazine; - class B_IR_Grenade: CA_Magazine { - AGM_Attachable = 1; - }; - class SmokeShell; - class Chemlight_green: SmokeShell { - AGM_Attachable = 1; - }; -}; diff --git a/addons/Attach/stringtable.xml b/addons/Attach/stringtable.xml deleted file mode 100644 index 895dff95c7..0000000000 --- a/addons/Attach/stringtable.xml +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - Attach item >> - Gegenstand befestigen >> - Acoplar objeto >> - Przyczep przedmiot >> - Attacher l'objet >> - Připnout předmět >> - Acoplar item >> - Attacca l'oggetto >> - Tárgy hozzácsatolása >> - Добавить приспособления - - - Attach - Befestigen - Acoplar - Przyczep - Attacher - Připnout - Acoplar - Attacca - Hozzácsatolás - Присоединить - - - Detach item - Gegenstand entfernen - Quitar objeto - Odczep przedmiot - Détacher l'objet - Odepnout předmět - Separar item - Stacca l'oggetto - Tárgy lecsatolása - Отсоединить - - - IR Strobe Attached - IR-Stroboskop befestigt - Marcador IR acoplado - Przyczepiono stroboskop IR - Strobe IR attaché - IR Značkovač Připnutý - Marcador IV Acoplado - Strobo IR attaccata - Infravörös jeladó hozzácsatolva - ИК строб присоединён - - - IR Strobe Detached - IR-Stroboskop entfernt - Marcador IR quitado - Odczepiono stroboskop IR - Strobe IR détaché - IR Značkovač Odepnutý - Marcador IV Separado - Strobo IR staccata - Infravörös jeladó lecsatolva - ИК строб отсоединён - - - IR Grenade Attached - IR-Granate befestigt - Granada IR acoplada - Przyczepiono granat IR - Grenade IR attachée - IR Granát Připnutý - Granada IV Acoplada - Granata IR attaccata - Infravörös gránát hozzácsatolva - ИК граната присоединена - - - IR Grenade Detached - IR-Granate entfernt - Granada IR quitada - Odczepiono granat IR - Grenade IR détachée - IR Granát Odepnutý - Granada IV Separada - Granata IR staccata - Infravörös gránát lecsatolva - ИК граната отсоединена - - - Chemlight Attached - Leuchtstab befestigt - Barra de luz acoplada - Przyczepiono światło chemiczne - Chemlight attaché - Chemické světlo Připnuto - Chemlight Acoplada - Chemlight attaccata - Chemlight hozzácsatolva - Химсвет присоединён - - - Chemlight Detached - Leuchtstab entfernt - Barra de luz quitada - Odczepiono światło chemiczne - Chemlight détaché - Chemické světlo Odepnuto - Chemlight Separada - Chemlight staccata - Chemlight hozzácsatolva - Химсвет отсоединён - - - No inventory space - Kein Platz im Inventar - Sin espacio en inventario - Brak miejsca w ekwipunku - Pas de place dans l'inventaire - Není místo v inventáři - Sem espaço no inventário - Non hai più spazio - Nincs több hely - В инвентаре нет места - - - IR Strobe - IR-Stroboskop - Marcador IR - Stroboskop IR - Strobe IR - IR Značkovač - Marcador IV - Strobo IR - Infravörös jeladó - ИК строб - - - IR Strobe allows you to signal your position through a pulsating beacon only visible with NVGs. - Das IR-Stroboskop erlaubt es dir deine Position mit einem blinkenden Leuchtfeuer zu signalisieren, welches nur mit Nachtsichtgerät zu erkennen ist. - Stroboskop światła podczerwieni umożliwia oznaczenie swojej pozycji pulsacyjnym światłem widocznym tylko przez optykę noktowizyjną i gogle noktowizyjne. - El Marcador IR permite señalizar su posisición a través de una baliza visible solo a través de dispositivos de visión nocturna. - Le Strobe IR permet de signaler votre position grace à un clignotement visible par des JVN. - IR Značkovač je Infračerveně zářící stroboskop umožňující signalizaci vaší pozice díky blikajícímu světlu, které je vidět pouze při užití noktovizoru. - O Marcador IV permite que você sinalize sua posição através de um pulso visível somente com equipamento de visão noturna. - La Strobo IR è una luce stroboscopica che ti permette di segnalare la tua posizione grazie all'emissione di impulsi ad infrarossi visibili solo con i visori notturni. - Az infravörös jeladóval megjelölheted a helyzetedet úgy, hogy annak pulzáló fénye csak éjjellátó készülékkel látható. - ИК строб позволяет сигнализировать свое местоположение через пульсирующий маяк, видимый только через ПНВ. - - - \ No newline at end of file diff --git a/addons/attach/$PBOPREFIX$ b/addons/attach/$PBOPREFIX$ deleted file mode 100644 index 1e4e48a4ca..0000000000 --- a/addons/attach/$PBOPREFIX$ +++ /dev/null @@ -1 +0,0 @@ -z\ace\Addons\laser \ No newline at end of file diff --git a/addons/attach/CfgEventHandlers.hpp b/addons/attach/CfgEventHandlers.hpp deleted file mode 100644 index f4997ba248..0000000000 --- a/addons/attach/CfgEventHandlers.hpp +++ /dev/null @@ -1,5 +0,0 @@ -class Extended_PreInit_EventHandlers { - class ADDON { - init = QUOTE( call compile preprocessFileLineNumbers PATHTOF(XEH_preInit.sqf) ); - }; -}; \ No newline at end of file diff --git a/addons/attach/XEH_preInit.sqf b/addons/attach/XEH_preInit.sqf deleted file mode 100644 index 7f953d62d9..0000000000 --- a/addons/attach/XEH_preInit.sqf +++ /dev/null @@ -1,7 +0,0 @@ -#include "script_component.hpp" - -PREPF(attach); -PREPF(canAttach); -PREPF(canDetach); -PREPF(detach); -PREPF(openAttachUI); \ No newline at end of file diff --git a/addons/attach/functions/fnc_attach.sqf b/addons/attach/functions/fnc_attach.sqf deleted file mode 100644 index b4cf675096..0000000000 --- a/addons/attach/functions/fnc_attach.sqf +++ /dev/null @@ -1,62 +0,0 @@ -#include "script_component.hpp" - -/* -Author: eRazeri and CAA-Picard - -Attach an item to the unit - -Arguments: -0: unit -1: Item name - -Return Value: -none -*/ - -private ["_unit", "_itemName", "_attachedItem"]; - -_unit = _this select 0; -_itemName = _this select 1; - -// Check if unit has an attached item -if (_unit getVariable [QGVAR(ItemName), ""] != "") exitWith {}; - -// Check if the unit still has the item -if !((_itemName in items _unit) or (_itemName in magazines _unit)) exitWith {}; - -// Attach item -switch true do { - case (_itemName == "AGM_IR_Strobe_Item") : { - _attachedItem = "AGM_IR_Strobe_Effect" createVehicle [0,0,0]; - _attachedItem attachTo [_unit,[0,-0.11,0.16],"pilot"];//makes it attach to the head a bit better, shoulder is not good for visibility - eRazeri - [localize "STR_AGM_Attach_IrStrobe_Attached"] call EFUNC(core,displayTextStructured); - }; - case (_itemName == "B_IR_Grenade") : { - _attachedItem = "B_IRStrobe" createVehicle [0,0,0]; - _attachedItem attachTo [_unit,[-0.05,0,0.12],"rightshoulder"]; - [localize "STR_AGM_Attach_IrGrenade_Attached"] call EFUNC(core,displayTextStructured); - }; - case (_itemName == "O_IR_Grenade") : { - _attachedItem = "O_IRStrobe" createVehicle [0,0,0]; - _attachedItem attachTo [_unit,[-0.05,0,0.12],"rightshoulder"]; - [localize "STR_AGM_Attach_IrGrenade_Attached"] call EFUNC(core,displayTextStructured); - }; - case (_itemName == "I_IR_Grenade") : { - _attachedItem = "I_IRStrobe" createVehicle [0,0,0]; - _attachedItem attachTo [_unit,[-0.05,0,0.12],"rightshoulder"]; - [localize "STR_AGM_Attach_IrGrenade_Attached"] call EFUNC(core,displayTextStructured); - }; - case (_itemName == "Chemlight_blue" or {_itemName == "Chemlight_green"} or {_itemName == "Chemlight_red"} or {_itemName == "Chemlight_yellow"}) : { - _attachedItem = _itemName createVehicle [0,0,0]; - _attachedItem attachTo [_unit,[-0.05,0,0.12],"rightshoulder"]; - [localize "STR_AGM_Attach_Chemlight_Attached"] call EFUNC(core,displayTextStructured);; - }; - default { - if (true) exitWith {}; - }; -}; - -// Remove item -_unit removeItem _itemName; -_unit setVariable [QGVAR(ItemName), _itemName, true]; -_unit setVariable [QGVAR(Item), _attachedItem, true]; diff --git a/addons/attach/functions/fnc_canAttach.sqf b/addons/attach/functions/fnc_canAttach.sqf deleted file mode 100644 index fe5191d7e2..0000000000 --- a/addons/attach/functions/fnc_canAttach.sqf +++ /dev/null @@ -1,21 +0,0 @@ -#include "script_component.hpp" - -/* - * Author: commy2 - * - * Check if a unit can attach a specific item. - * - * Argument: - * 0: Unit that wants to attach the object (Object) - * 1: Name of the attachable item (String) - * - * Return value: - * Boolean (Bool) - */ - -private ["_unit", "_item"]; - -_unit = _this select 0; -_item = _this select 1; - -canStand _unit && {_unit getVariable [QGVAR(ItemName), ""] == ""} && {_item in (magazines _unit + items _unit + [""])} diff --git a/addons/attach/functions/fnc_canDetach.sqf b/addons/attach/functions/fnc_canDetach.sqf deleted file mode 100644 index 3ddfc6c11e..0000000000 --- a/addons/attach/functions/fnc_canDetach.sqf +++ /dev/null @@ -1,19 +0,0 @@ -#include "script_component.hpp" - -/* - * Author: commy2 - * - * Check if a unit has an item attached and if it can remove that item. - * - * Argument: - * 0: Unit that wants to detach something (Object) - * - * Return value: - * Boolean (Bool) - */ - -private "_unit"; - -_unit = _this select 0; - -canStand _unit && {_unit getVariable [QGVAR(ItemName), ""] != ""} diff --git a/addons/attach/functions/fnc_detach.sqf b/addons/attach/functions/fnc_detach.sqf deleted file mode 100644 index 415429440b..0000000000 --- a/addons/attach/functions/fnc_detach.sqf +++ /dev/null @@ -1,65 +0,0 @@ -#include "script_component.hpp" - -/* -Author: eRazeri and CAA-Picard - -Detach an item from a unit - -Arguments: -unit - -Return Value: -none -*/ - -private ["_unit", "_itemName", "_count", "_attachedItem"]; - -_unit = _this select 0; -_itemName = _unit getVariable [QGVAR(ItemName), ""]; - -// Check if unit has an attached item -if (_itemName == "") exitWith {}; - -// Add item to inventory -_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(core,displayTextStructured); -}; - -if (_itemName == "B_IR_Grenade" or _itemName == "O_IR_Grenade" or _itemName == "I_IR_Grenade") then { - // Hack for dealing with X_IR_Grenade effect not dissapearing on deleteVehicle - [_unit getVariable QGVAR(Item), _unit] spawn { - _attachedItem = _this select 0; - _unit = _this select 1; - detach _attachedItem; - _attachedItem setPos [getPos _unit select 0, getPos _unit select 1, (getPos _unit select 2) -1000]; - sleep 0.5; - deleteVehicle _attachedItem; - }; -} -else -{ - // Delete attached item - deleteVehicle (_unit getVariable QGVAR(Item)); -}; - -// Reset unit variables -_unit setVariable [QGVAR(ItemName),"", true]; -_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(core,displayTextStructured); - }; - case (_itemName == "B_IR_Grenade" or _itemName == "O_IR_Grenade" or _itemName == "I_IR_Grenade") : { - [localize "STR_AGM_Attach_IrGrenade_Detached"] call EFUNC(core,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(core,displayTextStructured); - }; - default { - if (true) exitWith {}; - }; -}; diff --git a/addons/attach/functions/fnc_openAttachUI.sqf b/addons/attach/functions/fnc_openAttachUI.sqf deleted file mode 100644 index 5af80d2c9e..0000000000 --- a/addons/attach/functions/fnc_openAttachUI.sqf +++ /dev/null @@ -1,65 +0,0 @@ -#include "script_component.hpp" - -/* - Name: AGM_Attach_fnc_openAttachUI - - Author: Garth de Wet (LH) - - Description: - Opens the UI for attaching objects. - - Parameters: - 0: OBJECT - unit - - Returns: - Nothing - - Example: - [player] call AGM_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); -{ - if !(_x in _listed) then { - _item = ConfigFile >> "CfgMagazines" >> _x; - if (getNumber (_item >> "AGM_Attachable") == 1) then { - _actions = [ - _actions, - getText(_item >> "displayName"), - getText(_item >> "picture"), - _x - ] call EFUNC(interaction,addSelectableItem); - }; - _listed pushBack _x; - }; -} forEach _attachables; -_attachables = items _unit; -{ - if !(_x in _listed) then { - _item = ConfigFile >> "CfgWeapons" >> _x; - if (getNumber (_item >> "AGM_Attachable") == 1) then { - _actions = [ - _actions, - getText(_item >> "displayName"), - getText(_item >> "picture"), - _x - ] call EFUNC(interaction,addSelectableItem); - }; - _listed pushBack _x; - }; -} forEach _attachables; - -[ - _actions, - { - [AGM_player, _this] call FUNC(attach); - call EFUNC(interaction,hideMenu); - }, - { - call EFUNC(interaction,hideMenu); - if !(profileNamespace getVariable [EQGVAR(interaction,AutoCloseMenu), false]) then {"Default" call EFUNC(interaction,openMenuSelf)}; - } -] call EFUNC(interaction,openSelectMenu); diff --git a/addons/attach/script_component.hpp b/addons/attach/script_component.hpp deleted file mode 100644 index f4b58802e3..0000000000 --- a/addons/attach/script_component.hpp +++ /dev/null @@ -1,12 +0,0 @@ -#define COMPONENT attach -#include "\z\ace\Addons\main\script_mod.hpp" - -#ifdef DEBUG_ENABLED_ATTACH - #define DEBUG_MODE_FULL -#endif - -#ifdef DEBUG_SETTINGS_ATTACH - #define DEBUG_SETTINGS DEBUG_SETTINGS_ATTACH -#endif - -#include "\z\ace\Addons\main\script_macros.hpp" \ No newline at end of file diff --git a/main/config.cpp b/main/config.cpp new file mode 100644 index 0000000000..17c0f5c465 --- /dev/null +++ b/main/config.cpp @@ -0,0 +1,22 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"Extended_EventHandlers", "CBA_MAIN"}; + VERSION_CONFIG; + }; +}; + +class CfgMods { + class ACE3 { + dir = "@ACE3"; + picture = ""; + action = "http://www.unitedoperations.net"; + hideName = 0; + hidePicture = 0; + name = "UnitedOperations"; + }; +}; diff --git a/main/script_component.hpp b/main/script_component.hpp new file mode 100644 index 0000000000..02a8608ef4 --- /dev/null +++ b/main/script_component.hpp @@ -0,0 +1,12 @@ +#define COMPONENT main +#include "\x\ace\Addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_MAIN + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_MAIN + #define DEBUG_SETTINGS DEBUG_SETTINGS_MAIN +#endif + +#include "script_macros.hpp" diff --git a/main/script_macros.hpp b/main/script_macros.hpp new file mode 100644 index 0000000000..79d3ca7089 --- /dev/null +++ b/main/script_macros.hpp @@ -0,0 +1 @@ +#include "\x\cba\addons\main\script_macros_common.hpp" \ No newline at end of file diff --git a/main/script_mod.hpp b/main/script_mod.hpp new file mode 100644 index 0000000000..65915b59df --- /dev/null +++ b/main/script_mod.hpp @@ -0,0 +1,19 @@ +// COMPONENT should be defined in the script_component.hpp and included BEFORE this hpp +#define MAINPREFIX x + +#define PREFIX ace + +//--BUILDPREFIX +#include "\x\ace\Addons\main\script_version.hpp" +//--ENDBUILDPREFIX + +#define VERSION MAJOR.MINOR.PATCHLVL.BUILD +#define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD +#define VERSION_PLUGIN MAJOR.MINOR.PATCHLVL.BUILD + +// MINIMAL required version for the Mod. Components can specify others.. +#define REQUIRED_VERSION 1.0 + +#ifndef VERSION_CONFIG + #define VERSION_CONFIG version = VERSION; versionStr = QUOTE(VERSION); versionAr[] = {VERSION_AR} +#endif \ No newline at end of file diff --git a/main/script_version.hpp b/main/script_version.hpp new file mode 100644 index 0000000000..4188e0496b --- /dev/null +++ b/main/script_version.hpp @@ -0,0 +1,5 @@ +#define MAJOR 1 +#define MINOR 0 +#define PATCHLVL 0 +#define BUILD 1 +#define BUILDDATE 2015-01-10 21:26:00.000000 \ No newline at end of file diff --git a/main/version.hpp b/main/version.hpp new file mode 100644 index 0000000000..c120d484cc --- /dev/null +++ b/main/version.hpp @@ -0,0 +1,2 @@ +version = QUOTE(VERSION); +text = QUOTE(UOMODS VERSION); \ No newline at end of file