trying to fix captilization

This commit is contained in:
commy2 2015-01-11 21:39:01 +01:00
parent 7c7fec0642
commit 2c1d925dc4
20 changed files with 61 additions and 572 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

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

View File

@ -1,150 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Edited with tabler - 2014-12-12 -->
<Project name="AGM">
<Package name="Attach">
<Key ID="STR_AGM_Attach_AttachDetach">
<English>Attach item &gt;&gt;</English>
<German>Gegenstand befestigen &gt;&gt;</German>
<Spanish>Acoplar objeto &gt;&gt;</Spanish>
<Polish>Przyczep przedmiot &gt;&gt;</Polish>
<French>Attacher l'objet &gt;&gt;</French>
<Czech>Připnout předmět &gt;&gt;</Czech>
<Portuguese>Acoplar item &gt;&gt;</Portuguese>
<Italian>Attacca l'oggetto &gt;&gt;</Italian>
<Hungarian>Tárgy hozzácsatolása &gt;&gt;</Hungarian>
<Russian>Добавить приспособления</Russian>
</Key>
<Key ID="STR_AGM_Attach_Attach">
<English>Attach</English>
<German>Befestigen</German>
<Spanish>Acoplar</Spanish>
<Polish>Przyczep</Polish>
<French>Attacher</French>
<Czech>Připnout</Czech>
<Portuguese>Acoplar</Portuguese>
<Italian>Attacca</Italian>
<Hungarian>Hozzácsatolás</Hungarian>
<Russian>Присоединить</Russian>
</Key>
<Key ID="STR_AGM_Attach_Detach">
<English>Detach item</English>
<German>Gegenstand entfernen</German>
<Spanish>Quitar objeto</Spanish>
<Polish>Odczep przedmiot</Polish>
<French>Détacher l'objet</French>
<Czech>Odepnout předmět</Czech>
<Portuguese>Separar item</Portuguese>
<Italian>Stacca l'oggetto</Italian>
<Hungarian>Tárgy lecsatolása</Hungarian>
<Russian>Отсоединить</Russian>
</Key>
<Key ID="STR_AGM_Attach_IrStrobe_Attached">
<English>IR Strobe Attached</English>
<German>IR-Stroboskop befestigt</German>
<Spanish>Marcador IR acoplado</Spanish>
<Polish>Przyczepiono stroboskop IR</Polish>
<French>Strobe IR attaché</French>
<Czech>IR Značkovač Připnutý</Czech>
<Portuguese>Marcador IV Acoplado</Portuguese>
<Italian>Strobo IR attaccata</Italian>
<Hungarian>Infravörös jeladó hozzácsatolva</Hungarian>
<Russian>ИК строб присоединён</Russian>
</Key>
<Key ID="STR_AGM_Attach_IrStrobe_Detached">
<English>IR Strobe Detached</English>
<German>IR-Stroboskop entfernt</German>
<Spanish>Marcador IR quitado</Spanish>
<Polish>Odczepiono stroboskop IR</Polish>
<French>Strobe IR détaché</French>
<Czech>IR Značkovač Odepnutý</Czech>
<Portuguese>Marcador IV Separado</Portuguese>
<Italian>Strobo IR staccata</Italian>
<Hungarian>Infravörös jeladó lecsatolva</Hungarian>
<Russian>ИК строб отсоединён</Russian>
</Key>
<Key ID="STR_AGM_Attach_IrGrenade_Attached">
<English>IR Grenade Attached</English>
<German>IR-Granate befestigt</German>
<Spanish>Granada IR acoplada</Spanish>
<Polish>Przyczepiono granat IR</Polish>
<French>Grenade IR attachée</French>
<Czech>IR Granát Připnutý</Czech>
<Portuguese>Granada IV Acoplada</Portuguese>
<Italian>Granata IR attaccata</Italian>
<Hungarian>Infravörös gránát hozzácsatolva</Hungarian>
<Russian>ИК граната присоединена</Russian>
</Key>
<Key ID="STR_AGM_Attach_IrGrenade_Detached">
<English>IR Grenade Detached</English>
<German>IR-Granate entfernt</German>
<Spanish>Granada IR quitada</Spanish>
<Polish>Odczepiono granat IR</Polish>
<French>Grenade IR détachée</French>
<Czech>IR Granát Odepnutý</Czech>
<Portuguese>Granada IV Separada</Portuguese>
<Italian>Granata IR staccata</Italian>
<Hungarian>Infravörös gránát lecsatolva</Hungarian>
<Russian>ИК граната отсоединена</Russian>
</Key>
<Key ID="STR_AGM_Attach_Chemlight_Attached">
<English>Chemlight Attached</English>
<German>Leuchtstab befestigt</German>
<Spanish>Barra de luz acoplada</Spanish>
<Polish>Przyczepiono światło chemiczne</Polish>
<French>Chemlight attaché</French>
<Czech>Chemické světlo Připnuto</Czech>
<Portuguese>Chemlight Acoplada</Portuguese>
<Italian>Chemlight attaccata</Italian>
<Hungarian>Chemlight hozzácsatolva</Hungarian>
<Russian>Химсвет присоединён</Russian>
</Key>
<Key ID="STR_AGM_Attach_Chemlight_Detached">
<English>Chemlight Detached</English>
<German>Leuchtstab entfernt</German>
<Spanish>Barra de luz quitada</Spanish>
<Polish>Odczepiono światło chemiczne</Polish>
<French>Chemlight détaché</French>
<Czech>Chemické světlo Odepnuto</Czech>
<Portuguese>Chemlight Separada</Portuguese>
<Italian>Chemlight staccata</Italian>
<Hungarian>Chemlight hozzácsatolva</Hungarian>
<Russian>Химсвет отсоединён</Russian>
</Key>
<Key ID="STR_AGM_Attach_Inventory_Full">
<English>No inventory space</English>
<German>Kein Platz im Inventar</German>
<Spanish>Sin espacio en inventario</Spanish>
<Polish>Brak miejsca w ekwipunku</Polish>
<French>Pas de place dans l'inventaire</French>
<Czech>Není místo v inventáři</Czech>
<Portuguese>Sem espaço no inventário</Portuguese>
<Italian>Non hai più spazio</Italian>
<Hungarian>Nincs több hely</Hungarian>
<Russian>В инвентаре нет места</Russian>
</Key>
<Key ID="STR_AGM_IrStrobe_Name">
<English>IR Strobe</English>
<German>IR-Stroboskop</German>
<Spanish>Marcador IR</Spanish>
<Polish>Stroboskop IR</Polish>
<French>Strobe IR</French>
<Czech>IR Značkovač</Czech>
<Portuguese>Marcador IV</Portuguese>
<Italian>Strobo IR</Italian>
<Hungarian>Infravörös jeladó</Hungarian>
<Russian>ИК строб</Russian>
</Key>
<Key ID="STR_AGM_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>
<Spanish>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. </Spanish>
<French>Le Strobe IR permet de signaler votre position grace à un clignotement visible par des JVN.</French>
<Czech>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.</Czech>
<Portuguese>O Marcador IV permite que você sinalize sua posição através de um pulso visível somente com equipamento de visão noturna.</Portuguese>
<Italian>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.</Italian>
<Hungarian>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ó.</Hungarian>
<Russian>ИК строб позволяет сигнализировать свое местоположение через пульсирующий маяк, видимый только через ПНВ.</Russian>
</Key>
</Package>
</Project>

View File

@ -1 +0,0 @@
z\ace\Addons\laser

View File

@ -1,5 +0,0 @@
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE( call compile preprocessFileLineNumbers PATHTOF(XEH_preInit.sqf) );
};
};

View File

@ -1,7 +0,0 @@
#include "script_component.hpp"
PREPF(attach);
PREPF(canAttach);
PREPF(canDetach);
PREPF(detach);
PREPF(openAttachUI);

View File

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

View File

@ -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 + [""])}

View File

@ -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), ""] != ""}

View File

@ -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 {};
};
};

View File

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

View File

@ -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"

22
main/config.cpp Normal file
View File

@ -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";
};
};

12
main/script_component.hpp Normal file
View File

@ -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"

1
main/script_macros.hpp Normal file
View File

@ -0,0 +1 @@
#include "\x\cba\addons\main\script_macros_common.hpp"

19
main/script_mod.hpp Normal file
View File

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

5
main/script_version.hpp Normal file
View File

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

2
main/version.hpp Normal file
View File

@ -0,0 +1,2 @@
version = QUOTE(VERSION);
text = QUOTE(UOMODS VERSION);