This commit is contained in:
GitHawk 2016-06-07 11:13:42 +02:00
parent e3f8fc2840
commit 8e004741b9
59 changed files with 954 additions and 67 deletions

View File

@ -3,15 +3,15 @@
</p>
<p align="center">
<a href="https://github.com/acemod/ACE3/releases">
<img src="https://img.shields.io/badge/Version-3.5.0-blue.svg?style=flat-square" alt="ACE3 Version">
</a>
<a href="https://github.com/acemod/ACE3/releases/download/v3.5.0/ace3_3.5.0.zip">
<img src="https://img.shields.io/badge/Download-72.6_MB-green.svg?style=flat-square" alt="ACE3 Download">
<a href="https://github.com/acemod/ACE3/releases/latest">
<img src="https://img.shields.io/badge/Version-3.5.1-blue.svg?style=flat-square" alt="ACE3 Version">
</a>
<a href="https://github.com/acemod/ACE3/issues">
<img src="https://img.shields.io/github/issues-raw/acemod/ACE3.svg?style=flat-square&label=Issues" alt="ACE3 Issues">
</a>
<a href="https://github.com/acemod/ACE3/releases">
<img src="https://img.shields.io/github/downloads/acemod/ACE3/total.svg?style=flat-square&label=Downloads" alt="ACE3 Downloads">
</a>
<a href="https://forums.bistudio.com/topic/181341-ace3-a-collaborative-merger-between-agm-cse-and-ace/?p=2859670">
<img src="https://img.shields.io/badge/BIF-Thread-lightgrey.svg?style=flat-square" alt="BIF Thread">
</a>

View File

@ -8,7 +8,7 @@
* 1: Player <OBJECT>
*
* Return Value:
* ChildActiosn<ARRAY>
* ChildActions <ARRAY>
*
* Example:
* [player, player] call ace_attach_fnc_getChildrenAttachActions

View File

@ -4,6 +4,7 @@
*
* Arguments:
* 0: caller (player) <OBJECT>
* 1: target <OBJECT> (optional)
*
* Return Value:
* The return value <BOOL>

View File

@ -5,7 +5,7 @@
* Arguments:
* 0: loaded Object <OBJECT>
* 1: Object <OBJECT>
* 2: Unloader (player) (optional)<OBJECT>
* 2: Unloader (player) <OBJECT> (optional)
*
* Return Value:
* Can be unloaded <BOOL>

View File

@ -6,7 +6,7 @@
* 0: Text <ANY>
* 1: Size of the textbox <NUMBER> (default: 1.5)
* 2: Target Unit. Will only display if target is the player controlled object <OBJECT> (default: ACE_player)
* 3: Custom Width <NUMBER>(optional)
* 3: Custom Width <NUMBER> (optional)
*
* Return Value:
* None

View File

@ -4,7 +4,7 @@
*
* Arguments:
* 0: Array to be dumped <ARRAY>
* 1: Depth <NUMBER>(optional)
* 1: Depth <NUMBER> (optional)
*
* Return Value:
* None

View File

@ -6,9 +6,9 @@
* Arguments:
* 0: Source Vehicle <OBJECT>
* 1: Cargo Classname <STRING>
* 2: Unloader (player) <OBJECT>(optional)
* 3: Max Distance (meters) <NUMBER>(optional)
* 4: Check Vehicle is Stable <BOOL>(optional)
* 2: Unloader (player) <OBJECT> (optional)
* 3: Max Distance (meters) <NUMBER> (optional)
* 4: Check Vehicle is Stable <BOOL> (optional)
*
* Return Value:
* Unload PositionAGL (Can Be [] if no valid pos found) <ARRAY>

View File

@ -4,8 +4,8 @@
* Bitwise AND Logic (a single false in a mask will make it false)
*
* Arguments:
* 0: Source ID <STRING>(optional)
* 1: Show Hud Bool Array (8 to set, empty to remove) <ARRAY>(optional)
* 0: Source ID <STRING> (optional)
* 1: Show Hud Bool Array (8 to set, empty to remove) <ARRAY> (optional)
* - [hud, info, radar, compass, direction, menu, group, cursors]
* - hud: Boolean - show scripted HUD (same as normal showHUD true/false)
* - info: Boolean - show vehicle + soldier info (hides weapon info from the HUD as well)

View File

@ -5,7 +5,7 @@
* Arguments:
* 0: unit to unload <OBJECT>
* 1: Vehicle <OBJECT>
* 2: Unloader (player) <OBJECT>(optional)
* 2: Unloader (player) <OBJECT> (optional)
*
* Return Value:
* Returns true if succesfully unloaded person <BOOL>

View File

@ -7,7 +7,7 @@
* 0: caller (player) <OBJECT>
* 1: target <OBJECT>
* 2: classnamess <ARRAY>
* 3: Do Not Drop Ammo <BOOL>(optional)
* 3: Do Not Drop Ammo <BOOL> (optional)
*
* Return Value:
* Nothing

View File

@ -4,7 +4,7 @@
*
* Arguments:
* 0: Args <ARRAY>
* -----0: Just update volume (skip ringing/recovery) <BOOL>(optional)
* -----0: Just update volume (skip ringing/recovery) <BOOL> (optional)
*
* Return Value:
* None

View File

@ -9,12 +9,12 @@
* 2: Icon <STRING>
* 3: Statement <CODE>
* 4: Condition <CODE>
* 5: Insert children code <CODE> (Optional)
* 6: Action parameters <ANY> (Optional)
* 7: Position (Position array, Position code or Selection Name) <ARRAY>, <CODE> or <STRING> (Optional)
* 8: Distance <NUMBER> (Optional)
* 9: Other parameters [showDisabled,enableInside,canCollapse,runOnHover,doNotCheckLOS] <ARRAY> (Optional)
* 10: Modifier function <CODE> (Optional)
* 5: Insert children code <CODE> (optional)
* 6: Action parameters <ANY> (optional)
* 7: Position (Position array, Position code or Selection Name) <ARRAY>, <CODE> or <STRING> (optional)
* 8: Distance <NUMBER> (optional)
* 9: Other parameters [showDisabled,enableInside,canCollapse,runOnHover,doNotCheckLOS] <ARRAY> (optional)
* 10: Modifier function <CODE> (optional)
*
* Return Value:
* Action <ARRAY>

View File

@ -3,7 +3,7 @@
* Changes the display mode of the microDAGR
*
* Arguments:
* 0: Display Mode to show the microDAGR in <NUMBER>(optional)
* 0: Display Mode to show the microDAGR in <NUMBER> (optional)
*
* Return Value:
* None

View File

@ -6,7 +6,7 @@
* 0: static <OBJECT>
* 1: unit <OBJECT>
* 2: time to load <NUMBER>
* 3: magazineClassOptional (optional)<STRING>
* 3: magazineClassOptional <STRING> (optional)
*
* Return Value:
* None

View File

@ -14,8 +14,8 @@
};
#define MACRO_REARM_TRUCK_ACTIONS \
class ACE_Actions : ACE_Actions { \
class ACE_MainActions : ACE_MainActions { \
class ACE_Actions: ACE_Actions { \
class ACE_MainActions: ACE_MainActions { \
class GVAR(ReadSupplyCounter) { \
displayName = CSTRING(ReadSupplyCounter); \
distance = REARM_ACTION_DISTANCE; \

View File

@ -0,0 +1 @@
z\ace\addons\compat_adr_90

View File

@ -0,0 +1,14 @@
class CfgAmmo {
class BulletBase;
class B_570x28_Ball: BulletBase {
ACE_caliber = 5.7;
ACE_bulletLength = 21.6; // http://blog.thejustnation.org/2011/04/5-7x28mm-ammo-review/
ACE_bulletMass = 2; // based on the SS190
ACE_ballisticCoefficients[] = {0.177}; //http://m.delphiforums.com/autogun/messages/5267/7
ACE_velocityBoundaries[] = {};
ACE_standardAtmosphere = "ASM"; // 50/50 chance to get it right
ACE_dragModel = 7;
ACE_muzzleVelocities[] = {716,776};
ACE_barrelLengths[] = {264,407};
};
};

View File

@ -0,0 +1,7 @@
class CfgMagazines {
class CA_Magazine;
class 50Rnd_570x28_SMG_03: CA_Magazine {
displayName = CSTRING(P90_Mag_Name);
descriptionShort = CSTRING(P90_Mag_DescriptionShort);
};
};

View File

@ -0,0 +1,67 @@
class CfgWeapons {
class Rifle_Base_F;
class SMG_03_TR_BASE: Rifle_Base_F {
ACE_barrelTwist = 228.6; // 1:9 inch twist
ACE_barrelLenght = 407;
ACE_twistDirection = 1;
modes[]= {
"Single"
};
};
class SMG_03_TR_black: SMG_03_TR_BASE{
displayName = CSTRING(PS90_TR_Black_Name);
};
class SMG_03_TR_khaki: SMG_03_TR_black {
displayName = CSTRING(PS90_TR_Khaki_Name);
};
class SMG_03_TR_camo: SMG_03_TR_black {
displayName = CSTRING(PS90_TR_Camo_Name);
};
class SMG_03_TR_hex: SMG_03_TR_BASE {
displayName = CSTRING(PS90_TR_Hex_Name);
};
class SMG_03_black: SMG_03_TR_BASE {
displayName = CSTRING(PS90_Black_Name);
};
class SMG_03_khaki: SMG_03_black {
displayName = CSTRING(PS90_Khaki_Name);
};
class SMG_03_camo: SMG_03_black {
displayName = CSTRING(PS90_Camo_Name);
};
class SMG_03_hex: SMG_03_black {
displayName = CSTRING(PS90_Hex_Name);
};
class SMG_03C_BASE: SMG_03_TR_BASE {
ACE_barrelLenght = 264;
modes[]= {
"Single",
"FullAuto"
};
};
class SMG_03C_TR_black: SMG_03C_BASE {
displayName = CSTRING(P90_TR_Black_Name);
};
class SMG_03C_TR_khaki: SMG_03C_TR_black {
displayName = CSTRING(P90_TR_Khaki_Name);
};
class SMG_03C_TR_camo: SMG_03C_TR_black {
displayName = CSTRING(P90_TR_Camo_Name);
};
class SMG_03C_TR_hex: SMG_03C_TR_black {
displayName = CSTRING(P90_TR_Hex_Name);
};
class SMG_03C_black: SMG_03C_Base {
displayName = CSTRING(P90_Black_Name);
};
class SMG_03C_khaki: SMG_03C_black {
displayName = CSTRING(P90_Khaki_Name);
};
class SMG_03C_camo: SMG_03C_black {
displayName = CSTRING(P90_Camo_Name);
};
class SMG_03C_hex: SMG_03C_black {
displayName = CSTRING(P90_Hex_Name);
};
};

View File

@ -0,0 +1,18 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"A3_Weapons_F_Mod"};
author = ECSTRING(common,ACETeam);
authors[] = {"Nic547"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
#include "CfgWeapons.hpp"
#include "CfgAmmo.hpp"
#include "CfgMagazines.hpp"

View File

@ -0,0 +1,5 @@
#define COMPONENT compat_adr_97
#include "\z\ace\addons\main\script_mod.hpp"
#include "\z\ace\addons\main\script_macros.hpp"

View File

@ -0,0 +1,221 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Compat_ADR_97">
<Key ID="STR_ACE_Compat_ADR_97_P90_TR_Black_Name">
<English>P90 TR (Black)</English>
<Czech>P90 TR (Černá)</Czech>
<French>P90 TR (Noir)</French>
<Spanish>P90 TR (Negro)</Spanish>
<Russian>P90 TR (Чёрный)</Russian>
<Polish>P90 TR (czarny)</Polish>
<German>P90 TR (Schwarz)</German>
<Italian>P90 TR (Nero)</Italian>
<Hungarian>P90 TR (Fekete)</Hungarian>
<Portuguese>P90 TR (Preto)</Portuguese>
</Key>
<Key ID="STR_ACE_Compat_ADR_97_P90_TR_Khaki_Name">
<English>P90 TR (Khaki)</English>
<Czech>P90 TR (Khaki)</Czech>
<French>P90 TR (Kaki)</French>
<Spanish>P90 TR (Caqui)</Spanish>
<Russian>P90 TR (Хаки)</Russian>
<Polish>P90 TR (khaki)</Polish>
<German>P90 TR (Khaki)</German>
<Italian>P90 TR (Khaki)</Italian>
<Hungarian>P90 TR (Khaki)</Hungarian>
<Portuguese>P90 TR (Caqui)</Portuguese>
</Key>
<Key ID="STR_ACE_Compat_ADR_97_P90_TR_Camo_Name">
<English>P90 TR (Camo)</English>
<Czech>P90 TR (Kamufláž)</Czech>
<French>P90 TR (Camo)</French>
<Spanish>P90 TR (Camuflaje)</Spanish>
<Russian>P90 TR (Камо)</Russian>
<Polish>P90 TR (kamuflaż)</Polish>
<German>P90 TR (Camo)</German>
<Italian>P90 TR (Camo)</Italian>
<Hungarian>P90 TR (Terepmintás)</Hungarian>
<Portuguese>P90 TR (Camuflagem)</Portuguese>
</Key>
<Key ID="STR_ACE_Compat_ADR_97_P90_TR_Hex_Name">
<English>P90 TR (Hex)</English>
<Czech>P90 TR (Hex)</Czech>
<French>P90 TR (Hex)</French>
<Spanish>P90 TR (Hex)</Spanish>
<Russian>P90 TR (Гекс)</Russian>
<German>P90 TR (Hex)</German>
<Polish>P90 TR (hex)</Polish>
<Italian>P90 TR (Hex)</Italian>
<Hungarian>P90 TR (Hex)</Hungarian>
<Portuguese>P90 TR (Hex)</Portuguese>
</Key>
<Key ID="STR_ACE_Compat_ADR_97_P90_Black_Name">
<English>P90 (Black)</English>
<Czech>P90 (Černá)</Czech>
<French>P90 (Noir)</French>
<Spanish>P90 (Negro)</Spanish>
<Russian>P90 (Чёрный)</Russian>
<Polish>P90 (czarny)</Polish>
<German>P90 (Schwarz)</German>
<Italian>P90 (Nero)</Italian>
<Hungarian>P90 (Fekete)</Hungarian>
<Portuguese>P90 (Preto)</Portuguese>
</Key>
<Key ID="STR_ACE_Compat_ADR_97_P90_Khaki_Name">
<English>P90 (Khaki)</English>
<Czech>P90 (Khaki)</Czech>
<French>P90 (Kaki)</French>
<Spanish>P90 (Caqui)</Spanish>
<Russian>P90 (Хаки)</Russian>
<Polish>P90 (khaki)</Polish>
<German>P90 (Khaki)</German>
<Italian>P90 (Khaki)</Italian>
<Hungarian>P90 (Khaki)</Hungarian>
<Portuguese>P90 (Caqui)</Portuguese>
</Key>
<Key ID="STR_ACE_Compat_ADR_97_P90_Camo_Name">
<English>P90 (Camo)</English>
<Czech>P90 (Kamufláž)</Czech>
<French>P90 (Camo)</French>
<Spanish>P90 (Camuflaje)</Spanish>
<Russian>P90 (Камо)</Russian>
<Polish>P90 (kamuflaż)</Polish>
<German>P90 (Camo)</German>
<Italian>P90 (Camo)</Italian>
<Hungarian>P90 (Terepmintás)</Hungarian>
<Portuguese>P90 (Camuflagem)</Portuguese>
</Key>
<Key ID="STR_ACE_Compat_ADR_97_P90_Hex_Name">
<English>P90 (Hex)</English>
<Czech>P90 (Hex)</Czech>
<French>P90 (Hex)</French>
<Spanish>P90 (Hex)</Spanish>
<Russian>P90 (Гекс)</Russian>
<German>P90 (Hex)</German>
<Polish>P90 (hex)</Polish>
<Italian>P90 (Hex)</Italian>
<Hungarian>P90 (Hex)</Hungarian>
<Portuguese>P90 (Hex)</Portuguese>
</Key>
<Key ID="STR_ACE_Compat_ADR_97_PS90_TR_Black_Name">
<English>PS90 TR (Black)</English>
<Czech>PS90 TR (Černá)</Czech>
<French>PS90 TR (Noir)</French>
<Spanish>PS90 TR (Negro)</Spanish>
<Russian>PS90 TR (Чёрный)</Russian>
<Polish>PS90 TR (czarny)</Polish>
<German>PS90 TR (Schwarz)</German>
<Italian>PS90 TR (Nero)</Italian>
<Hungarian>PS90 TR (Fekete)</Hungarian>
<Portuguese>PS90 TR (Preto)</Portuguese>
</Key>
<Key ID="STR_ACE_Compat_ADR_97_PS90_TR_Khaki_Name">
<English>PS90 TR (Khaki)</English>
<Czech>PS90 TR (Khaki)</Czech>
<French>PS90 TR (Kaki)</French>
<Spanish>PS90 TR (Caqui)</Spanish>
<Russian>PS90 TR (Хаки)</Russian>
<Polish>PS90 TR (khaki)</Polish>
<German>PS90 TR (Khaki)</German>
<Italian>PS90 TR (Khaki)</Italian>
<Hungarian>PS90 TR (Khaki)</Hungarian>
<Portuguese>PS90 TR (Caqui)</Portuguese>
</Key>
<Key ID="STR_ACE_Compat_ADR_97_PS90_TR_Camo_Name">
<English>PS90 TR (Camo)</English>
<Czech>PS90 TR (Kamufláž)</Czech>
<French>PS90 TR (Camo)</French>
<Spanish>PS90 TR (Camuflaje)</Spanish>
<Russian>PS90 TR (Камо)</Russian>
<Polish>PS90 TR (kamuflaż)</Polish>
<German>PS90 TR (Camo)</German>
<Italian>PS90 TR (Camo)</Italian>
<Hungarian>PS90 TR (Terepmintás)</Hungarian>
<Portuguese>PS90 TR (Camuflagem)</Portuguese>
</Key>
<Key ID="STR_ACE_Compat_ADR_97_PS90_TR_Hex_Name">
<English>PS90 TR (Hex)</English>
<Czech>PS90 TR (Hex)</Czech>
<French>PS90 TR (Hex)</French>
<Spanish>PS90 TR (Hex)</Spanish>
<Russian>PS90 TR (Гекс)</Russian>
<German>PS90 TR (Hex)</German>
<Polish>PS90 TR (hex)</Polish>
<Italian>PS90 TR (Hex)</Italian>
<Hungarian>PS90 TR (Hex)</Hungarian>
<Portuguese>PS90 TR (Hex)</Portuguese>
</Key>
<Key ID="STR_ACE_Compat_ADR_97_PS90_Black_Name">
<English>PS90 (Black)</English>
<Czech>PS90 (Černá)</Czech>
<French>PS90 (Noir)</French>
<Spanish>PS90 (Negro)</Spanish>
<Russian>PS90 (Чёрный)</Russian>
<Polish>PS90 (czarny)</Polish>
<German>PS90 (Schwarz)</German>
<Italian>PS90 (Nero)</Italian>
<Hungarian>PS90 (Fekete)</Hungarian>
<Portuguese>PS90 (Preto)</Portuguese>
</Key>
<Key ID="STR_ACE_Compat_ADR_97_PS90_Khaki_Name">
<English>PS90 (Khaki)</English>
<Czech>PS90 (Khaki)</Czech>
<French>PS90 (Kaki)</French>
<Spanish>PS90 (Caqui)</Spanish>
<Russian>PS90 (Хаки)</Russian>
<Polish>PS90 (khaki)</Polish>
<German>PS90 (Khaki)</German>
<Italian>PS90 (Khaki)</Italian>
<Hungarian>PS90 (Khaki)</Hungarian>
<Portuguese>PS90 (Caqui)</Portuguese>
</Key>
<Key ID="STR_ACE_Compat_ADR_97_PS90_Camo_Name">
<English>PS90 (Camo)</English>
<Czech>PS90 (Kamufláž)</Czech>
<French>PS90 (Camo)</French>
<Spanish>PS90 (Camuflaje)</Spanish>
<Russian>PS90 (Камо)</Russian>
<Polish>PS90 (kamuflaż)</Polish>
<German>PS90 (Camo)</German>
<Italian>PS90 (Camo)</Italian>
<Hungarian>PS90 (Terepmintás)</Hungarian>
<Portuguese>PS90 (Camuflagem)</Portuguese>
</Key>
<Key ID="STR_ACE_Compat_ADR_97_PS90_Hex_Name">
<English>PS90 (Hex)</English>
<Czech>PS90 (Hex)</Czech>
<French>PS90 (Hex)</French>
<Spanish>PS90 (Hex)</Spanish>
<Russian>PS90 (Гекс)</Russian>
<German>PS90 (Hex)</German>
<Polish>PS90 (hex)</Polish>
<Italian>PS90 (Hex)</Italian>
<Hungarian>PS90 (Hex)</Hungarian>
<Portuguese>PS90 (Hex)</Portuguese>
</Key>
<Key ID="STR_ACE_Compat_ADR_97_P90_Mag_Name">
<English>5.7mm 50Rnd Mag</English>
<Hungarian>5,7mm 50-as Tár</Hungarian>
<German>5,7mm 50-Patronen-Magazin</German>
<Spanish>Cargador de 50 balas SD de 5,7mm</Spanish>
<French>Ch. 5,7mm 50Cps</French>
<Polish>Magazynek 5,7mm 50rd</Polish>
<Czech>5.7mm 50náb. Zásobník</Czech>
<Portuguese>Carregador de 50 projéteis de 5.7mm</Portuguese>
<Italian>Caricatore 5.7mm 50Rnd</Italian>
<Russian>Магазин из 50-ти 5,7 мм</Russian>
</Key>
<Key ID="STR_ACE_Compat_ADR_97_P90_Mag_DescriptionShort">
<English>Caliber: 5.7mm&lt;br /&gt;Rounds: 50&lt;br /&gt;Used in: P90</English>
<German>Kaliber: 5,7mm&lt;br /&gt;Patronen: 50&lt;br /&gt;Eingesetzt von: P90</German>
<Polish>Kaliber: 5,7mm&lt;br /&gt;Pociski: 50&lt;br /&gt;Używany w: P90</Polish>
<French>Calibre: 5.7mm&lt;br /&gt;Cartouches: 50&lt;br /&gt;Utilisé avec: P90</French>
<Spanish>Calibre: 5.7mm&lt;br /&gt;Balas: 50&lt;br /&gt;Se usa en: P90</Spanish>
<Russian>Калибр: 5,7 мм&lt;br /&gt;Патронов: 50&lt;br /&gt;Используются с: P90</Russian>
<Italian>Calibro: 5.7mm&lt;br /&gt;Munizioni: 50&lt;br /&gt;In uso su: P90</Italian>
<Czech>Ráže: 5.7mm&lt;br /&gt;Nábojů: 50&lt;br /&gt;Použití u: P90</Czech>
<Portuguese>Calibre: 5.7mm&lt;br /&gt;Cartuchos: 50&lt;br /&gt;Usado em: P90</Portuguese>
<Hungarian>Kaliber: 5,7mm&lt;br /&gt;Lövedékek: 50&lt;br /&gt;Használható: P90</Hungarian>
</Key>
</Package>
</Project>

View File

@ -6,7 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"R3F_Armes", "R3F_Acc"};
author[]={"Ruthberg"};
author = ECSTRING(common,ACETeam);
authors[] = {"Ruthberg"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};

View File

@ -6,7 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"RH_acc"};
author[]={"Ruthberg"};
author = ECSTRING(common,ACETeam);
authors[] = {"Ruthberg"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};

View File

@ -6,7 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"RH_de_cfg"};
author[]={"Ruthberg"};
author = ECSTRING(common,ACETeam);
authors[] = {"Ruthberg"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};

View File

@ -6,7 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"RH_m4_cfg"};
author[]={"Ruthberg"};
author = ECSTRING(common,ACETeam);
authors[] = {"Ruthberg"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};

View File

@ -6,7 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"RH_PDW"};
author[]={"Ruthberg"};
author = ECSTRING(common,ACETeam);
authors[] = {"Ruthberg"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};

View File

@ -39,7 +39,7 @@ class CfgAmmo {
ACE_muzzleVelocities[]={700, 800, 820, 833};
ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4};
};
class rhs_B_762x54_Ball_Tracer_Green: B_762x51_Ball {
class rhs_B_762x54_Ball_Tracer_Green: rhs_B_762x54_Ball {
ACE_caliber=7.925;
ACE_bulletLength=28.956;
ACE_bulletMass=9.6552;
@ -202,4 +202,20 @@ class CfgAmmo {
ace_frag_skip = 1;
ace_frag_force = 0;
};
class G_40mm_HE;
class rhs_g_vog25: G_40mm_HE {};
class rhs_g_vg40tb: rhs_g_vog25 { //Thermobaric
ace_frag_force = 0;
};
class rhs_g_vg40sz: rhs_g_vog25 { //Flashbang
ace_frag_force = 0;
};
class rhs_GDM40: rhs_g_vog25 { //Smoke
ace_frag_force = 0;
};
class rhs_g_vg40md_white: rhs_g_vog25 { //Smoke
ace_frag_force = 0;
};
};

View File

@ -0,0 +1,11 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
};
};

View File

@ -1,4 +1,4 @@
class cfgVehicles {
class CfgVehicles {
class LandVehicle;
class Tank: LandVehicle {
class NewTurret;
@ -201,18 +201,70 @@ class cfgVehicles {
EGVAR(refuel,fuelCapacity) = 3600;
};
class Heli_Light_02_base_F;
class Helicopter_Base_F;
class Helicopter_Base_H: Helicopter_Base_F {
class EventHandlers;
};
class Heli_Light_02_base_F: Helicopter_Base_H {};
class RHS_Mi8_base : Heli_Light_02_base_F {
EGVAR(refuel,fuelCapacity) = 3700;
EGVAR(fastroping,enabled) = 0;
class EventHandlers: EventHandlers {
class RHS_EventHandlers;
};
};
class RHS_Mi8amt_base: RHS_Mi8_base {
EGVAR(fastroping,enabled) = 1;
EGVAR(fastroping,ropeOrigins)[] = {{-1.13, 4.67, -0.89}};
EGVAR(fastroping,onCut) = QFUNC(onCut);
EGVAR(fastroping,onPrepare) = QFUNC(onPrepare);
class UserActions {
class openDoor;
class closeDoor_L: openDoor {
condition = QUOTE((this doorPhase 'LeftDoor' > 0.5) && {alive this} && {!(this getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)])});
};
};
class EventHandlers: EventHandlers {
class RHS_EventHandlers: RHS_EventHandlers {
getOut = QUOTE(if !((_this select 0) getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)]) then {_this call rhs_fnc_mi8_doors});
};
};
};
class RHS_Mi8_VVS_Base: RHS_Mi8_base {};
class RHS_Mi8mt_vvs: RHS_Mi8_VVS_Base {};
class RHS_Mi8mt_Cargo_vvs: RHS_Mi8mt_vvs {
EGVAR(fastroping,enabled) = 1;
EGVAR(fastroping,ropeOrigins)[] = {{-1.13, 4.67, -0.89}};
EGVAR(fastroping,onCut) = QFUNC(onCut);
EGVAR(fastroping,onPrepare) = QFUNC(onPrepare);
class UserActions {
class openDoor_L;
class closeDoor_L: openDoor_L {
condition = QUOTE((this doorPhase 'LeftDoor' > 0.5) && {alive this} && {!(this getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)])});
};
};
class EventHandlers: EventHandlers {
class RHS_EventHandlers: RHS_EventHandlers {
getOut = QUOTE(if !((_this select 0) getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)]) then {_this call rhs_fnc_mi8_doors});
};
};
};
class Heli_Attack_02_base_F;
class RHS_Ka52_base : Heli_Attack_02_base_F {
EGVAR(refuel,fuelCapacity) = 1870;
EGVAR(fastroping,enabled) = 0;
};
class RHS_Mi24_base : Heli_Attack_02_base_F {
EGVAR(refuel,fuelCapacity) = 1851;
EGVAR(fastroping,enabled) = 0;
};
class rhs_t80b : rhs_tank_base {

View File

@ -0,0 +1,2 @@
PREP(onCut);
PREP(onPrepare);

View File

@ -0,0 +1,7 @@
#include "script_component.hpp"
ADDON = false;
#include "XEH_PREP.hpp"
ADDON = true;

View File

@ -0,0 +1,3 @@
#include "script_component.hpp"
#include "XEH_PREP.hpp"

View File

@ -6,12 +6,15 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"rhs_c_weapons", "rhs_c_troops", "rhs_c_bmd", "rhs_c_bmp", "rhs_c_bmp3", "rhs_c_a2port_armor", "rhs_c_btr", "rhs_c_sprut", "rhs_c_t72", "rhs_c_tanks", "rhs_c_a2port_air", "rhs_c_a2port_car", "rhs_c_cars", "rhs_c_2s3", "rhs_c_rva"};
author[]={"Ruthberg", "GitHawk"};
author = ECSTRING(common,ACETeam);
authors[] = {"Ruthberg", "GitHawk", "BaerMitUmlaut"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
#include "CfgAmmo.hpp"
#include "CfgEventHandlers.hpp"
#include "CfgMagazines.hpp"
#include "CfgWeapons.hpp"
#include "CfgVehicles.hpp"

View File

@ -0,0 +1,23 @@
/*
* Author: BaerMitUmlaut
* Function for closing doors and retracting the hooks for RHS USF helos.
*
* Arguments:
* 0: Helicopter <OBJECT>
*
* Return Value:
* Amount of time to wait before cutting ropes <NUMBER>
*
* Example:
* [_vehicle] call ace_compat_rhs_afrf3_fnc_onCut
*
* Public: No
*/
#include "script_component.hpp"
params ["_vehicle"];
_vehicle setVariable [QEGVAR(fastroping,doorsLocked), false, true];
_vehicle animateDoor ["LeftDoor", 0];
2

View File

@ -0,0 +1,23 @@
/*
* Author: BaerMitUmlaut
* Function for opening doors and extending the hook for most vanilla helos.
*
* Arguments:
* 0: Helicopter <OBJECT>
*
* Return Value:
* Amount of time to wait before deploying ropes <NUMBER>
*
* Example:
* [_vehicle] call ace_compat_rhs_afrf3_fnc_onPrepare
*
* Public: No
*/
#include "script_component.hpp"
params ["_vehicle"];
_vehicle setVariable [QEGVAR(fastroping,doorsLocked), true, true];
_vehicle animateDoor ["LeftDoor", 1];
2

View File

@ -0,0 +1 @@
#include "\z\ace\addons\compat_rhs_afrf3\script_component.hpp"

View File

@ -1,4 +1,4 @@
#define COMPONENT rhs_c_weapons_comp
#define COMPONENT compat_rhs_afrf3
#include "\z\ace\addons\main\script_mod.hpp"

View File

@ -2,7 +2,8 @@
class CfgAmmo
{
class BulletBase;
class rhsusf_B_300winmag: BulletBase {
class B_762x54_Ball;
class rhsusf_B_300winmag: B_762x54_Ball {
ACE_caliber=7.823;
ACE_bulletLength=37.821;
ACE_bulletMass=14.256;

View File

@ -0,0 +1,11 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
};
};

View File

@ -1,4 +1,17 @@
class cfgVehicles {
#define EQUIP_FRIES_ATTRIBUTE class Attributes { \
class EGVAR(fastroping,equipFRIES) { \
property = QEGVAR(fastroping,equipFRIES); \
control = "Checkbox"; \
displayName = ECSTRING(fastroping,Eden_equipFRIES); \
tooltip = ECSTRING(fastroping,Eden_equipFRIES_Tooltip); \
expression = QUOTE([_this] call EFUNC(fastroping,equipFRIES)); \
typeName = "BOOL"; \
condition = "objectVehicle"; \
defaultValue = false; \
}; \
}
class CfgVehicles {
class LandVehicle;
class Tank: LandVehicle {
class NewTurret;
@ -44,21 +57,117 @@ class cfgVehicles {
ace_repair_hitpointGroups[] = {{"era_1_hitpoint", {"era_2_hitpoint", "era_3_hitpoint", "era_4_hitpoint", "era_5_hitpoint", "era_6_hitpoint", "era_7_hitpoint", "era_8_hitpoint", "era_9_hitpoint", "era_10_hitpoint", "era_11_hitpoint", "era_12_hitpoint", "era_13_hitpoint", "era_14_hitpoint", "era_15_hitpoint", "era_16_hitpoint", "era_17_hitpoint", "era_18_hitpoint", "era_19_hitpoint", "era_20_hitpoint", "era_21_hitpoint", "era_22_hitpoint", "era_23_hitpoint", "era_24_hitpoint", "era_25_hitpoint", "era_26_hitpoint", "era_27_hitpoint", "era_28_hitpoint", "era_29_hitpoint", "era_30_hitpoint", "era_31_hitpoint", "era_32_hitpoint", "era_33_hitpoint", "era_34_hitpoint", "era_35_hitpoint", "era_36_hitpoint", "era_37_hitpoint", "era_38_hitpoint", "era_39_hitpoint", "era_40_hitpoint", "era_41_hitpoint", "era_42_hitpoint", "era_43_hitpoint", "era_44_hitpoint", "era_45_hitpoint", "era_46_hitpoint"}}};
};
class Heli_light_03_base_F;
class Helicopter;
class Helicopter_Base_F: Helicopter {
class Eventhandlers;
};
class Heli_Light_03_base_F: Helicopter_Base_F {};
class RHS_UH1_Base: Heli_light_03_base_F {
EGVAR(refuel,fuelCapacity) = 1447;
};
class Heli_Transport_01_base_F;
class RHS_UH1Y_base: RHS_UH1_Base {};
class RHS_UH1Y_US_base: RHS_UH1Y_base {};
class RHS_UH1Y: RHS_UH1Y_US_base {
EGVAR(fastroping,enabled) = 2;
EGVAR(fastroping,friesType) = "ACE_friesAnchorBar";
EGVAR(fastroping,friesAttachmentPoint)[] = {0, 2.38, -0.135};
EGVAR(fastroping,onCut) = QFUNC(onCut);
EGVAR(fastroping,onPrepare) = QFUNC(onPrepare);
EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginLeft", "ropeOriginRight"};
class UserActions;
class EventHandlers: EventHandlers {
class RHSUSF_EventHandlers;
};
EQUIP_FRIES_ATTRIBUTE;
};
class RHS_UH1Y_FFAR: RHS_UH1Y {
class UserActions: UserActions {
class OpenCargoDoor;
class CloseCargoDoor: OpenCargoDoor {
condition = QUOTE([ARR_2(this,'doorRB')] call FUNC(canCloseDoor));
};
class CloseCargoLDoor: OpenCargoDoor {
condition = QUOTE([ARR_2(this,'doorLB')] call FUNC(canCloseDoor));
};
};
class EventHandlers: EventHandlers {
class RHSUSF_EventHandlers: RHSUSF_EventHandlers {
getOut = QUOTE(if !((_this select 0) getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)]) then {_this call rhs_fnc_uh60_doors});
};
};
};
class Helicopter_Base_H: Helicopter_Base_F {
class Eventhandlers;
};
class Heli_Transport_01_base_F: Helicopter_Base_H {};
class RHS_UH60_Base: Heli_Transport_01_base_F {
EGVAR(refuel,fuelCapacity) = 1360;
};
class RHS_UH60M_base: RHS_UH60_Base {};
class RHS_UH60M_US_base: RHS_UH60M_base {};
class RHS_UH60M: RHS_UH60M_US_base {
EGVAR(fastroping,enabled) = 2;
EGVAR(fastroping,friesType) = "ACE_friesAnchorBar";
EGVAR(fastroping,friesAttachmentPoint)[] = {0, 1.25, -0.65};
EGVAR(fastroping,onCut) = QFUNC(onCut);
EGVAR(fastroping,onPrepare) = QFUNC(onPrepare);
EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginLeft", "ropeOriginRight"};
class UserActions {
class OpenCargoDoor;
class CloseCargoDoor: OpenCargoDoor {
condition = QUOTE([ARR_2(this,'doorRB')] call FUNC(canCloseDoor));
};
class CloseCargoLDoor: OpenCargoDoor {
condition = QUOTE([ARR_2(this,'doorLB')] call FUNC(canCloseDoor));
};
};
class EventHandlers: EventHandlers {
class RHSUSF_EventHandlers {
getOut = QUOTE(if !((_this select 0) getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)]) then {_this call rhs_fnc_uh60_doors});
};
};
EQUIP_FRIES_ATTRIBUTE;
};
class RHS_UH60M_MEV: RHS_UH60M {
EGVAR(fastroping,enabled) = 0;
class Attributes {
delete EGVAR(fastroping,equipFRIES);
};
};
class RHS_UH60M_MEV2: RHS_UH60M_MEV {
EGVAR(fastroping,enabled) = 2;
EQUIP_FRIES_ATTRIBUTE;
};
class Heli_Transport_02_base_F;
class RHS_CH_47F_base: Heli_Transport_02_base_F {
EGVAR(refuel,fuelCapacity) = 3914;
};
class RHS_CH_47F: RHS_CH_47F_base {
EGVAR(fastroping,enabled) = 1;
EGVAR(fastroping,ropeOrigins)[] = {{0.5, -7.15, -0.95}, {-0.5, -7.15, -0.95}};
EGVAR(fastroping,onCut) = QFUNC(onCut);
EGVAR(fastroping,onPrepare) = QFUNC(onPrepare);
class UserActions {
class OpenCargoDoor;
class CloseCargoDoor: OpenCargoDoor {
condition = QUOTE([ARR_2(this,'ramp_anim')] call FUNC(canCloseDoor));
};
};
};
class Heli_Attack_01_base_F;
class RHS_AH1Z_base: Heli_Attack_01_base_F {
EGVAR(refuel,fuelCapacity) = 1600;

View File

@ -111,8 +111,8 @@ class CfgWeapons
};
};
};
class rhs_weap_m4a1;
class rhs_weap_mk18: rhs_weap_m4a1 {
class rhs_weap_m4a1_blockII;
class rhs_weap_mk18: rhs_weap_m4a1_blockII {
ACE_barrelTwist = 177.8;
ACE_barrelLength = 261.62;
ACE_Overheating_dispersion = 1;

View File

@ -0,0 +1,3 @@
PREP(canCloseDoor);
PREP(onCut);
PREP(onPrepare);

View File

@ -0,0 +1,7 @@
#include "script_component.hpp"
ADDON = false;
#include "XEH_PREP.hpp"
ADDON = true;

View File

@ -0,0 +1,3 @@
#include "script_component.hpp"
#include "XEH_PREP.hpp"

View File

@ -6,12 +6,15 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"rhsusf_c_weapons", "rhsusf_c_troops", "rhsusf_c_m1a1", "rhsusf_c_m1a2", "RHS_US_A2_AirImport", "rhsusf_c_m109", "rhsusf_c_hmmwv", "rhsusf_c_rg33", "rhsusf_c_fmtv", "rhsusf_c_m113", "RHS_US_A2Port_Armor"};
author[]={"Ruthberg", "GitHawk"};
author = ECSTRING(common,ACETeam);
authors[] = {"Ruthberg", "GitHawk", "BaerMitUmlaut"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};
#include "CfgAmmo.hpp"
#include "CfgEventHandlers.hpp"
#include "CfgMagazines.hpp"
#include "CfgWeapons.hpp"
#include "CfgVehicles.hpp"

View File

@ -0,0 +1,30 @@
/*
* Author: BaerMitUmlaut
* Checks if the door can be closed.
*
* Arguments:
* 0: Helicopter <OBJECT>
* 1: Door <STRING>
*
* Return Value:
* Door can be closed <BOOL>
*
* Example:
* [_vehicle, "DoorLB"] call ace_compat_rhs_usf3_fnc_canCloseDoor
*
* Public: No
*/
#include "script_component.hpp"
params ["_vehicle", "_door"];
(_vehicle doorPhase _door > 0) &&
{alive _vehicle} &&
{!(_vehicle getVariable [QEGVAR(fastroping,doorsLocked),false])} &&
{
if (_vehicle isKindOf "RHS_CH_47F") then {
ACE_player in [driver _vehicle, _vehicle turretUnit [3], _vehicle turretUnit [4]]
} else {
ACE_player in _vehicle
}
}

View File

@ -0,0 +1,36 @@
/*
* Author: BaerMitUmlaut
* Function for closing doors and retracting the hooks for RHS USF helos.
*
* Arguments:
* 0: Helicopter <OBJECT>
*
* Return Value:
* Amount of time to wait before cutting ropes <NUMBER>
*
* Example:
* [_vehicle] call ace_compat_rhs_usf3_fnc_onCut
*
* Public: No
*/
#include "script_component.hpp"
params ["_vehicle"];
_vehicle setVariable [QEGVAR(fastroping,doorsLocked), false, true];
private _fries = _vehicle getVariable [QEGVAR(fastroping,FRIES), objNull];
if !(isNull _fries) then {
_fries animate ["extendHookRight", 0];
_fries animate ["extendHookLeft", 0];
[{
_this animateDoor ["doorRB", 0];
_this animateDoor ["doorLB", 0];
}, _vehicle, 2] call EFUNC(common,waitAndExecute);
4
} else {
_vehicle animateDoor ["ramp_anim", 0];
2
};

View File

@ -0,0 +1,38 @@
/*
* Author: BaerMitUmlaut
* Function for opening doors and extending the hook for most vanilla helos.
*
* Arguments:
* 0: Helicopter <OBJECT>
*
* Return Value:
* Amount of time to wait before deploying ropes <NUMBER>
*
* Example:
* [_vehicle] call ace_compat_rhs_usf3_fnc_onPrepare
*
* Public: No
*/
#include "script_component.hpp"
params ["_vehicle"];
private ["_fries", "_waitTime"];
_vehicle setVariable [QEGVAR(fastroping,doorsLocked), true, true];
_waitTime = 2;
_vehicle animateDoor ["doorRB", 1];
_vehicle animateDoor ["doorLB", 1];
_vehicle animateDoor ["ramp_anim", 1];
_fries = _vehicle getVariable [QEGVAR(fastroping,FRIES), objNull];
if !(isNull _fries) then {
[{
_this animate ["extendHookRight", 1];
_this animate ["extendHookLeft", 1];
}, _fries, 2] call EFUNC(common,waitAndExecute);
_waitTime = 4;
};
_waitTime

View File

@ -0,0 +1 @@
#include "\z\ace\addons\compat_rhs_usf3\script_component.hpp"

View File

@ -1,4 +1,4 @@
#define COMPONENT rhsusf_c_weapons_comp
#define COMPONENT compat_rhs_usf3
#include "\z\ace\addons\main\script_mod.hpp"

View File

@ -6,7 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"RKSL_PMII"};
author[]={"Ruthberg"};
author = ECSTRING(common,ACETeam);
authors[] = {"Ruthberg"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};

View File

@ -6,7 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"iansky_opt"};
author[]={"Ruthberg"};
author = ECSTRING(common,ACETeam);
authors[] = {"Ruthberg"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};

View File

@ -7,8 +7,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
author[] = {"commy2"};
authorUrl = "https://github.com/commy2";
author = ECSTRING(common,ACETeam);
authors[] = {"commy2"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};

View File

@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
author[] = {"Glowbal"};
authorUrl = "https://github.com/Glowbal/";
author = ECSTRING(common,ACETeam);
authors[] = {"Glowbal"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};

View File

@ -6,8 +6,9 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_ballistics"};
author[] = {"ACE2 Team"};
authorUrl = "https://www.ace3mod.com";
author = ECSTRING(common,ACETeam);
authors[] = {"ACE2 Team"};
url = ECSTRING(main,URL);
VERSION_CONFIG;
};
};

View File

@ -0,0 +1,157 @@
#!/usr/bin/env python3
import fnmatch
import os
import re
import ntpath
import sys
import argparse
def check_config_style(filepath):
bad_count_file = 0
def pushClosing(t):
closingStack.append(closing.expr)
closing << Literal( closingFor[t[0]] )
def popClosing():
closing << closingStack.pop()
with open(filepath, 'r', encoding='utf-8', errors='ignore') as file:
content = file.read()
# Store all brackets we find in this file, so we can validate everything on the end
brackets_list = []
# To check if we are in a comment block
isInCommentBlock = False
checkIfInComment = False
# Used in case we are in a line comment (//)
ignoreTillEndOfLine = False
# Used in case we are in a comment block (/* */). This is true if we detect a * inside a comment block.
# If the next character is a /, it means we end our comment block.
checkIfNextIsClosingBlock = False
# We ignore everything inside a string
isInString = False
# Used to store the starting type of a string, so we can match that to the end of a string
inStringType = '';
lastIsCurlyBrace = False
checkForSemiColumn = False
# Extra information so we know what line we find errors at
lineNumber = 1
indexOfCharacter = 0
# Parse all characters in the content of this file to search for potential errors
for c in content:
if (lastIsCurlyBrace):
lastIsCurlyBrace = False
if c == '\n': # Keeping track of our line numbers
lineNumber += 1 # so we can print accurate line number information when we detect a possible error
if (isInString): # while we are in a string, we can ignore everything else, except the end of the string
if (c == inStringType):
isInString = False
# if we are not in a comment block, we will check if we are at the start of one or count the () {} and []
elif (isInCommentBlock == False):
# This means we have encountered a /, so we are now checking if this is an inline comment or a comment block
if (checkIfInComment):
checkIfInComment = False
if c == '*': # if the next character after / is a *, we are at the start of a comment block
isInCommentBlock = True
elif (c == '/'): # Otherwise, will check if we are in an line comment
ignoreTillEndOfLine = True # and an line comment is a / followed by another / (//) We won't care about anything that comes after it
if (isInCommentBlock == False):
if (ignoreTillEndOfLine): # we are in a line comment, just continue going through the characters until we find an end of line
if (c == '\n'):
ignoreTillEndOfLine = False
else: # validate brackets
if (c == '"' or c == "'"):
isInString = True
inStringType = c
elif (c == '/'):
checkIfInComment = True
elif (c == '('):
brackets_list.append('(')
elif (c == ')'):
if (len(brackets_list) > 0 and brackets_list[-1] in ['{', '[']):
print("ERROR: Possible missing round bracket ')' detected at {0} Line number: {1}".format(filepath,lineNumber))
bad_count_file += 1
brackets_list.append(')')
elif (c == '['):
brackets_list.append('[')
elif (c == ']'):
if (len(brackets_list) > 0 and brackets_list[-1] in ['{', '(']):
print("ERROR: Possible missing square bracket ']' detected at {0} Line number: {1}".format(filepath,lineNumber))
bad_count_file += 1
brackets_list.append(']')
elif (c == '{'):
brackets_list.append('{')
elif (c == '}'):
lastIsCurlyBrace = True
if (len(brackets_list) > 0 and brackets_list[-1] in ['(', '[']):
print("ERROR: Possible missing curly brace '}}' detected at {0} Line number: {1}".format(filepath,lineNumber))
bad_count_file += 1
brackets_list.append('}')
elif (c== '\t'):
print("ERROR: Tab detected at {0} Line number: {1}".format(filepath,lineNumber))
bad_count_file += 1
else: # Look for the end of our comment block
if (c == '*'):
checkIfNextIsClosingBlock = True;
elif (checkIfNextIsClosingBlock):
if (c == '/'):
isInCommentBlock = False
elif (c != '*'):
checkIfNextIsClosingBlock = False
indexOfCharacter += 1
if brackets_list.count('[') != brackets_list.count(']'):
print("ERROR: A possible missing square bracket [ or ] in file {0} [ = {1} ] = {2}".format(filepath,brackets_list.count('['),brackets_list.count(']')))
bad_count_file += 1
if brackets_list.count('(') != brackets_list.count(')'):
print("ERROR: A possible missing round bracket ( or ) in file {0} ( = {1} ) = {2}".format(filepath,brackets_list.count('('),brackets_list.count(')')))
bad_count_file += 1
if brackets_list.count('{') != brackets_list.count('}'):
print("ERROR: A possible missing curly brace {{ or }} in file {0} {{ = {1} }} = {2}".format(filepath,brackets_list.count('{'),brackets_list.count('}')))
bad_count_file += 1
return bad_count_file
def main():
print("Validating Config Style")
sqf_list = []
bad_count = 0
parser = argparse.ArgumentParser()
parser.add_argument('-m','--module', help='only search specified module addon folder', required=False, default="")
args = parser.parse_args()
# Allow running from root directory as well as from inside the tools directory
rootDir = "../addons"
if (os.path.exists("addons")):
rootDir = "addons"
for root, dirnames, filenames in os.walk(rootDir + '/' + args.module):
for filename in fnmatch.filter(filenames, '*.cpp'):
sqf_list.append(os.path.join(root, filename))
for filename in fnmatch.filter(filenames, '*.hpp'):
sqf_list.append(os.path.join(root, filename))
for filename in sqf_list:
bad_count = bad_count + check_config_style(filename)
print("------\nChecked {0} files\nErrors detected: {1}".format(len(sqf_list), bad_count))
if (bad_count == 0):
print("Config validation PASSED")
else:
print("Config validation FAILED")
return bad_count
if __name__ == "__main__":
sys.exit(main())

View File

@ -79,12 +79,8 @@ def main():
if not os.path.exists(os.path.join(armapath, MAINDIR)):
os.mkdir(os.path.join(armapath, MAINDIR))
if platform.win32_ver()[0] == "7":
subprocess.call(["cmd", "/c", "mklink", "/D", "P:\\{}\\{}".format(MAINDIR,PROJECTDIR), projectpath])
subprocess.call(["cmd", "/c", "mklink", "/D", os.path.join(armapath, MAINDIR, PROJECTDIR), projectpath])
else:
subprocess.call(["cmd", "/c", "mklink", "/D", "/J", "P:\\{}\\{}".format(MAINDIR,PROJECTDIR), projectpath])
subprocess.call(["cmd", "/c", "mklink", "/D", "/J", os.path.join(armapath, MAINDIR, PROJECTDIR), projectpath])
subprocess.call(["cmd", "/c", "mklink", "/J", "P:\\{}\\{}".format(MAINDIR,PROJECTDIR), projectpath])
subprocess.call(["cmd", "/c", "mklink", "/J", os.path.join(armapath, MAINDIR, PROJECTDIR), projectpath])
except:
raise
print("Something went wrong during the link creation. Please finish the setup manually.")

View File

@ -8,7 +8,7 @@ import sys
import argparse
def validKeyWordAfterCode(content, index):
keyWords = ["for", "do", "count", "each", "forEach", "else", "and", "not", "isEqualTo", "in", "call", "spawn", "execVM", "catch"];
keyWords = ["for", "do", "count", "each", "forEach", "else", "and", "not", "isEqualTo", "in", "call", "spawn", "execVM", "catch", "param", "select", "apply"];
for word in keyWords:
try:
subWord = content.index(word, index, index+len(word))
@ -50,7 +50,7 @@ def check_sqf_syntax(filepath):
checkForSemiColumn = False
# Extra information so we know what line we find errors at
lineNumber = 0
lineNumber = 1
indexOfCharacter = 0
# Parse all characters in the content of this file to search for potential errors