mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' of https://github.com/KoffeinFlummi/ACE3 into repair
This commit is contained in:
commit
c59263450b
@ -35,7 +35,7 @@
|
|||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, vehicle ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, vehicle ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if !(call FUNC(canUseRangefinder) || FUNC(canUseFCS)) exitWith {false};
|
if !(call FUNC(canUseFCS)) exitWith {false};
|
||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
[vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex), 50] call FUNC(adjustRange);
|
[vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex), 50] call FUNC(adjustRange);
|
||||||
@ -49,7 +49,7 @@
|
|||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, vehicle ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, vehicle ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if !(call FUNC(canUseRangefinder) || FUNC(canUseFCS)) exitWith {false};
|
if !(call FUNC(canUseFCS)) exitWith {false};
|
||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
[vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex), -50] call FUNC(adjustRange);
|
[vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex), -50] call FUNC(adjustRange);
|
||||||
|
@ -130,7 +130,7 @@ FUNC(disableFire) = {
|
|||||||
|
|
||||||
if(_firedEH < 0 && difficulty > 0) then {
|
if(_firedEH < 0 && difficulty > 0) then {
|
||||||
_firedEH = [ACE_player, "DefaultAction", {true}, {
|
_firedEH = [ACE_player, "DefaultAction", {true}, {
|
||||||
_canFire = _currentShooter getVariable["ace_missileguidance_target", nil];
|
_canFire = _this getVariable["ace_missileguidance_target", nil];
|
||||||
if(!isNil "_canFire") exitWith { false };
|
if(!isNil "_canFire") exitWith { false };
|
||||||
true
|
true
|
||||||
}] call EFUNC(common,addActionEventHandler);
|
}] call EFUNC(common,addActionEventHandler);
|
||||||
|
@ -519,7 +519,7 @@
|
|||||||
<English>Punisher (GMG)</English>
|
<English>Punisher (GMG)</English>
|
||||||
<German>Punisher (GMW)</German>
|
<German>Punisher (GMW)</German>
|
||||||
<Spanish>Punisher (GMG)</Spanish>
|
<Spanish>Punisher (GMG)</Spanish>
|
||||||
<Polish>Punisher (CKM)</Polish>
|
<Polish>Punisher (GMG)</Polish>
|
||||||
<Czech>Punisher (granátomet)</Czech>
|
<Czech>Punisher (granátomet)</Czech>
|
||||||
<French>Punisher (GMG)</French>
|
<French>Punisher (GMG)</French>
|
||||||
<Russian>Kаратель (Гранатомет)</Russian>
|
<Russian>Kаратель (Гранатомет)</Russian>
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
class CfgWeapons
|
class CfgWeapons
|
||||||
{
|
{
|
||||||
|
class optic_dms;
|
||||||
class hlc_ak_base;
|
class hlc_ak_base;
|
||||||
class hlc_rifle_ak12;
|
class hlc_rifle_ak12;
|
||||||
|
class InventoryOpticsItem_Base_F;
|
||||||
class hlc_rifle_ak74: hlc_ak_base
|
class hlc_rifle_ak74: hlc_ak_base
|
||||||
{
|
{
|
||||||
ACE_barrelTwist=7.8699999;
|
ACE_barrelTwist=7.8699999;
|
||||||
@ -52,4 +54,23 @@ class CfgWeapons
|
|||||||
ACE_twistDirection=0;
|
ACE_twistDirection=0;
|
||||||
ACE_barrelLength=16.9;
|
ACE_barrelLength=16.9;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class HLC_Optic_PSO1 : optic_dms {
|
||||||
|
ACE_ScopeAdjust_Vertical[] = { 0, 0 };
|
||||||
|
ACE_ScopeAdjust_Horizontal[] = { -10, 10 };
|
||||||
|
ACE_ScopeAdjust_Increment = 0.5;
|
||||||
|
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||||
|
class OpticsModes {
|
||||||
|
class Snip {
|
||||||
|
discreteDistance[]={100, 200, 300, 400, 450, 500, 550, 600, 650, 700, 750, 800, 850, 900, 950, 1000};
|
||||||
|
discreteDistanceInitIndex=3;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class HLC_Optic_1p29 : HLC_Optic_PSO1 {
|
||||||
|
ACE_ScopeAdjust_Vertical[] = {};
|
||||||
|
ACE_ScopeAdjust_Horizontal[] = {};
|
||||||
|
ACE_ScopeAdjust_Increment = 0;
|
||||||
|
};
|
||||||
};
|
};
|
51
optionals/compat_hlcmods_aug/CfgWeapons.hpp
Normal file
51
optionals/compat_hlcmods_aug/CfgWeapons.hpp
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
|
||||||
|
class CfgWeapons
|
||||||
|
{
|
||||||
|
class Rifle_Base_F;
|
||||||
|
class hlc_aug_base;
|
||||||
|
class hlc_rifle_aug: hlc_aug_base
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=9;
|
||||||
|
ACE_barrelLength=20;
|
||||||
|
};
|
||||||
|
class hlc_rifle_auga1carb: hlc_rifle_aug
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=9;
|
||||||
|
ACE_barrelLength=16;
|
||||||
|
};
|
||||||
|
class hlc_rifle_aughbar: hlc_rifle_aug
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=9;
|
||||||
|
ACE_barrelLength=24;
|
||||||
|
};
|
||||||
|
class hlc_rifle_augpara: hlc_rifle_aug
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=9;
|
||||||
|
ACE_barrelLength=16.5;
|
||||||
|
};
|
||||||
|
class hlc_rifle_auga2: hlc_rifle_aug
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=9;
|
||||||
|
ACE_barrelLength=20;
|
||||||
|
};
|
||||||
|
class hlc_rifle_auga2para: hlc_rifle_auga2
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=9;
|
||||||
|
ACE_barrelLength=16.5;
|
||||||
|
};
|
||||||
|
class hlc_rifle_auga2carb: hlc_rifle_auga2
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=9;
|
||||||
|
ACE_barrelLength=18;
|
||||||
|
};
|
||||||
|
class hlc_rifle_auga2lsw: hlc_rifle_aughbar
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=9;
|
||||||
|
ACE_barrelLength=24;
|
||||||
|
};
|
||||||
|
class hlc_rifle_auga3: hlc_rifle_aug
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=9;
|
||||||
|
ACE_barrelLength=18;
|
||||||
|
};
|
||||||
|
};
|
14
optionals/compat_hlcmods_aug/config.cpp
Normal file
14
optionals/compat_hlcmods_aug/config.cpp
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
class CfgPatches {
|
||||||
|
class ADDON {
|
||||||
|
units[] = {};
|
||||||
|
weapons[] = {};
|
||||||
|
requiredVersion = REQUIRED_VERSION;
|
||||||
|
requiredAddons[] = {"hlcweapons_AUG"};
|
||||||
|
author[]={"Ruthberg"};
|
||||||
|
VERSION_CONFIG;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
#include "CfgWeapons.hpp"
|
5
optionals/compat_hlcmods_aug/script_component.hpp
Normal file
5
optionals/compat_hlcmods_aug/script_component.hpp
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#define COMPONENT hlcweapons_AUG_comp
|
||||||
|
|
||||||
|
#include "\z\ace\addons\main\script_mod.hpp"
|
||||||
|
|
||||||
|
#include "\z\ace\addons\main\script_macros.hpp"
|
131
optionals/compat_rh_acc/CfgWeapons.hpp
Normal file
131
optionals/compat_rh_acc/CfgWeapons.hpp
Normal file
@ -0,0 +1,131 @@
|
|||||||
|
|
||||||
|
class CfgWeapons {
|
||||||
|
class ItemCore;
|
||||||
|
class InventoryOpticsItem_Base_F;
|
||||||
|
|
||||||
|
class RH_accupoint : ItemCore {
|
||||||
|
ACE_ScopeAdjust_Vertical[] = { -4, 30 };
|
||||||
|
ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
|
||||||
|
ACE_ScopeAdjust_Increment = 0.1;
|
||||||
|
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||||
|
class OpticsModes {
|
||||||
|
class Accupoint {
|
||||||
|
discreteDistance[] = { 100 };
|
||||||
|
discreteDistanceInitIndex = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class RH_m3lr : ItemCore {
|
||||||
|
ACE_ScopeAdjust_Vertical[] = { -4, 30 };
|
||||||
|
ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
|
||||||
|
ACE_ScopeAdjust_Increment = 0.1;
|
||||||
|
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||||
|
class OpticsModes {
|
||||||
|
class m3lr {
|
||||||
|
discreteDistance[] = { 100 };
|
||||||
|
discreteDistanceInitIndex = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class RH_leu_mk4 : ItemCore {
|
||||||
|
ACE_ScopeAdjust_Vertical[] = { -4, 30 };
|
||||||
|
ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
|
||||||
|
ACE_ScopeAdjust_Increment = 0.1;
|
||||||
|
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||||
|
class OpticsModes {
|
||||||
|
class mk4 {
|
||||||
|
discreteDistance[] = { 100 };
|
||||||
|
discreteDistanceInitIndex = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class RH_c79 : ItemCore {
|
||||||
|
ACE_ScopeAdjust_Vertical[] = { -4, 30 };
|
||||||
|
ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
|
||||||
|
ACE_ScopeAdjust_Increment = 0.1;
|
||||||
|
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||||
|
class OpticsModes {
|
||||||
|
class c79scope {
|
||||||
|
discreteDistance[] = { 100 };
|
||||||
|
discreteDistanceInitIndex = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class RH_c79_2d : ItemCore {
|
||||||
|
ACE_ScopeAdjust_Vertical[] = { -4, 30 };
|
||||||
|
ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
|
||||||
|
ACE_ScopeAdjust_Increment = 0.1;
|
||||||
|
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||||
|
class OpticsModes {
|
||||||
|
class c79scope {
|
||||||
|
discreteDistance[] = { 100 };
|
||||||
|
discreteDistanceInitIndex = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class RH_anpvs10 : ItemCore {
|
||||||
|
ACE_ScopeAdjust_Vertical[] = { -4, 30 };
|
||||||
|
ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
|
||||||
|
ACE_ScopeAdjust_Increment = 0.1;
|
||||||
|
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||||
|
class OpticsModes {
|
||||||
|
class pvs10 {
|
||||||
|
discreteDistance[] = { 100 };
|
||||||
|
discreteDistanceInitIndex = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class RH_pas13cm : ItemCore {
|
||||||
|
ACE_ScopeAdjust_Vertical[] = { -4, 30 };
|
||||||
|
ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
|
||||||
|
ACE_ScopeAdjust_Increment = 0.1;
|
||||||
|
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||||
|
class OpticsModes {
|
||||||
|
class MTWS {
|
||||||
|
discreteDistance[] = { 100 };
|
||||||
|
discreteDistanceInitIndex = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class RH_pas13cmg : ItemCore {
|
||||||
|
ACE_ScopeAdjust_Vertical[] = { -4, 30 };
|
||||||
|
ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
|
||||||
|
ACE_ScopeAdjust_Increment = 0.1;
|
||||||
|
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||||
|
class OpticsModes {
|
||||||
|
class MTWSmg {
|
||||||
|
discreteDistance[] = { 100 };
|
||||||
|
discreteDistanceInitIndex = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class RH_pas13ch : ItemCore {
|
||||||
|
ACE_ScopeAdjust_Vertical[] = { -4, 30 };
|
||||||
|
ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
|
||||||
|
ACE_ScopeAdjust_Increment = 0.1;
|
||||||
|
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||||
|
class OpticsModes {
|
||||||
|
class HTWS {
|
||||||
|
discreteDistance[] = { 100 };
|
||||||
|
discreteDistanceInitIndex = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
14
optionals/compat_rh_acc/config.cpp
Normal file
14
optionals/compat_rh_acc/config.cpp
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
class CfgPatches {
|
||||||
|
class ADDON {
|
||||||
|
units[] = {};
|
||||||
|
weapons[] = {};
|
||||||
|
requiredVersion = REQUIRED_VERSION;
|
||||||
|
requiredAddons[] = {"RH_acc"};
|
||||||
|
author[]={"Ruthberg"};
|
||||||
|
VERSION_CONFIG;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
#include "CfgWeapons.hpp"
|
5
optionals/compat_rh_acc/script_component.hpp
Normal file
5
optionals/compat_rh_acc/script_component.hpp
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#define COMPONENT RH_acc_comp
|
||||||
|
|
||||||
|
#include "\z\ace\addons\main\script_mod.hpp"
|
||||||
|
|
||||||
|
#include "\z\ace\addons\main\script_macros.hpp"
|
161
optionals/compat_rh_de/CfgAmmo.hpp
Normal file
161
optionals/compat_rh_de/CfgAmmo.hpp
Normal file
@ -0,0 +1,161 @@
|
|||||||
|
|
||||||
|
class CfgAmmo
|
||||||
|
{
|
||||||
|
class BulletBase;
|
||||||
|
class RH_50_AE_Ball: BulletBase
|
||||||
|
{
|
||||||
|
ACE_caliber=0.5;
|
||||||
|
ACE_bulletLength=1.110;
|
||||||
|
ACE_bulletMass=325;
|
||||||
|
ACE_ammoTempMuzzleVelocityShifts[]={-2.655, -2.547, -2.285, -2.012, -1.698, -1.280, -0.764, -0.153, 0.596, 1.517, 2.619};
|
||||||
|
ACE_ballisticCoefficients[]={0.228};
|
||||||
|
ACE_velocityBoundaries[]={};
|
||||||
|
ACE_standardAtmosphere="ASM";
|
||||||
|
ACE_dragModel=1;
|
||||||
|
ACE_muzzleVelocities[]={360, 398, 420};
|
||||||
|
ACE_barrelLengths[]={4, 6, 9};
|
||||||
|
};
|
||||||
|
class RH_454_Casull: BulletBase
|
||||||
|
{
|
||||||
|
ACE_caliber=0.452;
|
||||||
|
ACE_bulletLength=0.895;
|
||||||
|
ACE_bulletMass=325;
|
||||||
|
ACE_ammoTempMuzzleVelocityShifts[]={-2.655, -2.547, -2.285, -2.012, -1.698, -1.280, -0.764, -0.153, 0.596, 1.517, 2.619};
|
||||||
|
ACE_ballisticCoefficients[]={0.171};
|
||||||
|
ACE_velocityBoundaries[]={};
|
||||||
|
ACE_standardAtmosphere="ASM";
|
||||||
|
ACE_dragModel=1;
|
||||||
|
ACE_muzzleVelocities[]={450, 490, 500};
|
||||||
|
ACE_barrelLengths[]={4, 7.5, 9};
|
||||||
|
};
|
||||||
|
class RH_32ACP: BulletBase
|
||||||
|
{
|
||||||
|
ACE_caliber=0.3125;
|
||||||
|
ACE_bulletLength=0.610;
|
||||||
|
ACE_bulletMass=65;
|
||||||
|
ACE_ammoTempMuzzleVelocityShifts[]={-2.655, -2.547, -2.285, -2.012, -1.698, -1.280, -0.764, -0.153, 0.596, 1.517, 2.619};
|
||||||
|
ACE_ballisticCoefficients[]={0.118};
|
||||||
|
ACE_velocityBoundaries[]={};
|
||||||
|
ACE_standardAtmosphere="ASM";
|
||||||
|
ACE_dragModel=1;
|
||||||
|
ACE_muzzleVelocities[]={282, 300, 320};
|
||||||
|
ACE_barrelLengths[]={4, 5, 9};
|
||||||
|
};
|
||||||
|
class RH_45ACP: BulletBase
|
||||||
|
{
|
||||||
|
ACE_caliber=0.452;
|
||||||
|
ACE_bulletLength=0.68;
|
||||||
|
ACE_bulletMass=230;
|
||||||
|
ACE_ammoTempMuzzleVelocityShifts[]={-2.655, -2.547, -2.285, -2.012, -1.698, -1.280, -0.764, -0.153, 0.596, 1.517, 2.619};
|
||||||
|
ACE_ballisticCoefficients[]={0.195};
|
||||||
|
ACE_velocityBoundaries[]={};
|
||||||
|
ACE_standardAtmosphere="ASM";
|
||||||
|
ACE_dragModel=1;
|
||||||
|
ACE_muzzleVelocities[]={230, 250, 285};
|
||||||
|
ACE_barrelLengths[]={4, 5, 9};
|
||||||
|
};
|
||||||
|
class RH_B_40SW: BulletBase
|
||||||
|
{
|
||||||
|
ACE_caliber=0.4;
|
||||||
|
ACE_bulletLength=0.447;
|
||||||
|
ACE_bulletMass=135;
|
||||||
|
ACE_ammoTempMuzzleVelocityShifts[]={-2.655, -2.547, -2.285, -2.012, -1.698, -1.280, -0.764, -0.153, 0.596, 1.517, 2.619};
|
||||||
|
ACE_ballisticCoefficients[]={0.105, 0.115, 0.120, 0.105};
|
||||||
|
ACE_velocityBoundaries[]={365, 305, 259};
|
||||||
|
ACE_standardAtmosphere="ASM";
|
||||||
|
ACE_dragModel=1;
|
||||||
|
ACE_muzzleVelocities[]={360, 380, 400};
|
||||||
|
ACE_barrelLengths[]={4, 6, 9};
|
||||||
|
};
|
||||||
|
class RH_44mag_ball: BulletBase
|
||||||
|
{
|
||||||
|
ACE_caliber=0.429;
|
||||||
|
ACE_bulletLength=0.804;
|
||||||
|
ACE_bulletMass=200;
|
||||||
|
ACE_ammoTempMuzzleVelocityShifts[]={-2.655, -2.547, -2.285, -2.012, -1.698, -1.280, -0.764, -0.153, 0.596, 1.517, 2.619};
|
||||||
|
ACE_ballisticCoefficients[]={0.172};
|
||||||
|
ACE_velocityBoundaries[]={};
|
||||||
|
ACE_standardAtmosphere="ASM";
|
||||||
|
ACE_dragModel=1;
|
||||||
|
ACE_muzzleVelocities[]={360, 390, 420};
|
||||||
|
ACE_barrelLengths[]={4, 7.5, 9};
|
||||||
|
};
|
||||||
|
class RH_357mag_ball: BulletBase
|
||||||
|
{
|
||||||
|
ACE_caliber=0.357;
|
||||||
|
ACE_bulletLength=0.541;
|
||||||
|
ACE_bulletMass=125;
|
||||||
|
ACE_ammoTempMuzzleVelocityShifts[]={-2.655, -2.547, -2.285, -2.012, -1.698, -1.280, -0.764, -0.153, 0.596, 1.517, 2.619};
|
||||||
|
ACE_ballisticCoefficients[]={0.148};
|
||||||
|
ACE_velocityBoundaries[]={};
|
||||||
|
ACE_standardAtmosphere="ASM";
|
||||||
|
ACE_dragModel=1;
|
||||||
|
ACE_muzzleVelocities[]={490, 510, 535};
|
||||||
|
ACE_barrelLengths[]={4, 6, 9};
|
||||||
|
};
|
||||||
|
class RH_762x25: BulletBase
|
||||||
|
{
|
||||||
|
ACE_caliber=0.310;
|
||||||
|
ACE_bulletLength=0.5455;
|
||||||
|
ACE_bulletMass=86;
|
||||||
|
ACE_ammoTempMuzzleVelocityShifts[]={-2.655, -2.547, -2.285, -2.012, -1.698, -1.280, -0.764, -0.153, 0.596, 1.517, 2.619};
|
||||||
|
ACE_ballisticCoefficients[]={0.17};
|
||||||
|
ACE_velocityBoundaries[]={};
|
||||||
|
ACE_standardAtmosphere="ASM";
|
||||||
|
ACE_dragModel=1;
|
||||||
|
ACE_muzzleVelocities[]={360, 380, 400};
|
||||||
|
ACE_barrelLengths[]={4, 6, 9};
|
||||||
|
};
|
||||||
|
class RH_9x18_Ball: BulletBase
|
||||||
|
{
|
||||||
|
ACE_caliber=0.365;
|
||||||
|
ACE_bulletLength=0.610;
|
||||||
|
ACE_bulletMass=92.6;
|
||||||
|
ACE_ammoTempMuzzleVelocityShifts[]={-2.655, -2.547, -2.285, -2.012, -1.698, -1.280, -0.764, -0.153, 0.596, 1.517, 2.619};
|
||||||
|
ACE_ballisticCoefficients[]={0.125};
|
||||||
|
ACE_velocityBoundaries[]={};
|
||||||
|
ACE_standardAtmosphere="ASM";
|
||||||
|
ACE_dragModel=1;
|
||||||
|
ACE_muzzleVelocities[]={298, 330, 350};
|
||||||
|
ACE_barrelLengths[]={3.8, 5, 9};
|
||||||
|
};
|
||||||
|
class RH_B_9x19_Ball: BulletBase
|
||||||
|
{
|
||||||
|
ACE_caliber=0.355;
|
||||||
|
ACE_bulletLength=0.610;
|
||||||
|
ACE_bulletMass=124;
|
||||||
|
ACE_ammoTempMuzzleVelocityShifts[]={-2.655, -2.547, -2.285, -2.012, -1.698, -1.280, -0.764, -0.153, 0.596, 1.517, 2.619};
|
||||||
|
ACE_ballisticCoefficients[]={0.165};
|
||||||
|
ACE_velocityBoundaries[]={};
|
||||||
|
ACE_standardAtmosphere="ASM";
|
||||||
|
ACE_dragModel=1;
|
||||||
|
ACE_muzzleVelocities[]={340, 370, 400};
|
||||||
|
ACE_barrelLengths[]={4, 5, 9};
|
||||||
|
};
|
||||||
|
class RH_B_22LR_SD: BulletBase
|
||||||
|
{
|
||||||
|
ACE_caliber=0.223;
|
||||||
|
ACE_bulletLength=0.45;
|
||||||
|
ACE_bulletMass=38;
|
||||||
|
ACE_ammoTempMuzzleVelocityShifts[]={-2.655, -2.547, -2.285, -2.012, -1.698, -1.280, -0.764, -0.153, 0.596, 1.517, 2.619};
|
||||||
|
ACE_ballisticCoefficients[]={0.111};
|
||||||
|
ACE_velocityBoundaries[]={};
|
||||||
|
ACE_standardAtmosphere="ASM";
|
||||||
|
ACE_dragModel=1;
|
||||||
|
ACE_muzzleVelocities[]={330, 340, 360};
|
||||||
|
ACE_barrelLengths[]={4, 6, 9};
|
||||||
|
};
|
||||||
|
class RH_57x28mm: BulletBase
|
||||||
|
{
|
||||||
|
ACE_caliber=0.224;
|
||||||
|
ACE_bulletLength=0.495;
|
||||||
|
ACE_bulletMass=28;
|
||||||
|
ACE_ammoTempMuzzleVelocityShifts[]={-2.655, -2.547, -2.285, -2.012, -1.698, -1.280, -0.764, -0.153, 0.596, 1.517, 2.619};
|
||||||
|
ACE_ballisticCoefficients[]={0.144};
|
||||||
|
ACE_velocityBoundaries[]={};
|
||||||
|
ACE_standardAtmosphere="ASM";
|
||||||
|
ACE_dragModel=1;
|
||||||
|
ACE_muzzleVelocities[]={550, 625, 720};
|
||||||
|
ACE_barrelLengths[]={4, 6, 10.35};
|
||||||
|
};
|
||||||
|
};
|
140
optionals/compat_rh_de/CfgWeapons.hpp
Normal file
140
optionals/compat_rh_de/CfgWeapons.hpp
Normal file
@ -0,0 +1,140 @@
|
|||||||
|
class CfgWeapons
|
||||||
|
{
|
||||||
|
class Pistol_Base_F;
|
||||||
|
class RH_Pistol_Base_F;
|
||||||
|
class RH_deagle: RH_Pistol_Base_F
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=19;
|
||||||
|
ACE_barrelLength=6;
|
||||||
|
};
|
||||||
|
class RH_mateba: Pistol_Base_F
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=14;
|
||||||
|
ACE_barrelLength=6;
|
||||||
|
};
|
||||||
|
class RH_mp412: Pistol_Base_F
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=10;
|
||||||
|
ACE_barrelLength=6;
|
||||||
|
};
|
||||||
|
class RH_python: Pistol_Base_F
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=14;
|
||||||
|
ACE_barrelLength=6;
|
||||||
|
};
|
||||||
|
class RH_bull: RH_python
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=24;
|
||||||
|
ACE_barrelLength=6.5;
|
||||||
|
};
|
||||||
|
class RH_ttracker: Pistol_Base_F
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=12;
|
||||||
|
ACE_barrelLength=4;
|
||||||
|
};
|
||||||
|
class RH_cz75: RH_Pistol_Base_F
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=9.7;
|
||||||
|
ACE_barrelLength=4.7;
|
||||||
|
};
|
||||||
|
class RH_p226: RH_Pistol_Base_F
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=9.8;
|
||||||
|
ACE_barrelLength=4.4;
|
||||||
|
};
|
||||||
|
class RH_sw659: RH_Pistol_Base_F
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=9.8;
|
||||||
|
ACE_barrelLength=7.44;
|
||||||
|
};
|
||||||
|
class RH_usp: RH_Pistol_Base_F
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=16;
|
||||||
|
ACE_barrelLength=4.41;
|
||||||
|
};
|
||||||
|
class RH_uspm: RH_Pistol_Base_F
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=16;
|
||||||
|
ACE_barrelLength=6;
|
||||||
|
};
|
||||||
|
class RH_kimber: RH_Pistol_Base_F
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=16;
|
||||||
|
ACE_barrelLength=5;
|
||||||
|
};
|
||||||
|
class RH_m1911: RH_Pistol_Base_F
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=16;
|
||||||
|
ACE_barrelLength=5;
|
||||||
|
};
|
||||||
|
class RH_tt33: RH_Pistol_Base_F
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=9.45;
|
||||||
|
ACE_barrelLength=4.6;
|
||||||
|
};
|
||||||
|
class RH_mak: RH_Pistol_Base_F
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=9.45;
|
||||||
|
ACE_barrelLength=3.68;
|
||||||
|
};
|
||||||
|
class RH_mk2: RH_Pistol_Base_F
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=16;
|
||||||
|
ACE_barrelLength=4;
|
||||||
|
};
|
||||||
|
class RH_m9: RH_Pistol_Base_F
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=9.8;
|
||||||
|
ACE_barrelLength=4.9;
|
||||||
|
};
|
||||||
|
class RH_g18: RH_Pistol_Base_F
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=9.8;
|
||||||
|
ACE_barrelLength=4.49;
|
||||||
|
};
|
||||||
|
class RH_g17: RH_Pistol_Base_F
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=9.8;
|
||||||
|
ACE_barrelLength=4.49;
|
||||||
|
};
|
||||||
|
class RH_g19: RH_Pistol_Base_F
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=9.8;
|
||||||
|
ACE_barrelLength=4;
|
||||||
|
};
|
||||||
|
class RH_gsh18: RH_Pistol_Base_F
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=9.8;
|
||||||
|
ACE_barrelLength=4.1;
|
||||||
|
};
|
||||||
|
class RH_fnp45: RH_Pistol_Base_F
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=16;
|
||||||
|
ACE_barrelLength=4.5;
|
||||||
|
};
|
||||||
|
class RH_fn57: RH_fnp45
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=9.1;
|
||||||
|
ACE_barrelLength=4.8;
|
||||||
|
};
|
||||||
|
class RH_vp70: RH_Pistol_Base_F
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=9.8;
|
||||||
|
ACE_barrelLength=4.6;
|
||||||
|
};
|
||||||
|
class RH_vz61: RH_Pistol_Base_F
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=16;
|
||||||
|
ACE_barrelLength=4.5;
|
||||||
|
};
|
||||||
|
class RH_tec9: RH_Pistol_Base_F
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=9.8;
|
||||||
|
ACE_barrelLength=5;
|
||||||
|
};
|
||||||
|
class RH_muzi: RH_Pistol_Base_F
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=9.8;
|
||||||
|
ACE_barrelLength=5;
|
||||||
|
};
|
||||||
|
};
|
@ -5,7 +5,7 @@ class CfgPatches {
|
|||||||
units[] = {};
|
units[] = {};
|
||||||
weapons[] = {};
|
weapons[] = {};
|
||||||
requiredVersion = REQUIRED_VERSION;
|
requiredVersion = REQUIRED_VERSION;
|
||||||
requiredAddons[] = {"asdg_jointrails","RH_m4_cfg"};
|
requiredAddons[] = {"RH_de_cfg"};
|
||||||
author[]={"Ruthberg"};
|
author[]={"Ruthberg"};
|
||||||
VERSION_CONFIG;
|
VERSION_CONFIG;
|
||||||
};
|
};
|
5
optionals/compat_rh_de/script_component.hpp
Normal file
5
optionals/compat_rh_de/script_component.hpp
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#define COMPONENT RH_de_cfg_comp
|
||||||
|
|
||||||
|
#include "\z\ace\addons\main\script_mod.hpp"
|
||||||
|
|
||||||
|
#include "\z\ace\addons\main\script_macros.hpp"
|
15
optionals/compat_rh_m4/config.cpp
Normal file
15
optionals/compat_rh_m4/config.cpp
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
class CfgPatches {
|
||||||
|
class ADDON {
|
||||||
|
units[] = {};
|
||||||
|
weapons[] = {};
|
||||||
|
requiredVersion = REQUIRED_VERSION;
|
||||||
|
requiredAddons[] = {"RH_m4_cfg"};
|
||||||
|
author[]={"Ruthberg"};
|
||||||
|
VERSION_CONFIG;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
#include "CfgAmmo.hpp"
|
||||||
|
#include "CfgWeapons.hpp"
|
15
optionals/compat_rh_pdw/CfgAmmo.hpp
Normal file
15
optionals/compat_rh_pdw/CfgAmmo.hpp
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
|
||||||
|
class BulletBase;
|
||||||
|
class RH_B_6x35: BulletBase
|
||||||
|
{
|
||||||
|
ACE_caliber=0.224;
|
||||||
|
ACE_bulletLength=0.445;
|
||||||
|
ACE_bulletMass=65;
|
||||||
|
ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19};
|
||||||
|
ACE_ballisticCoefficients[]={0.26};
|
||||||
|
ACE_velocityBoundaries[]={};
|
||||||
|
ACE_standardAtmosphere="ASM";
|
||||||
|
ACE_dragModel=1;
|
||||||
|
ACE_muzzleVelocities[]={730, 750, 760};
|
||||||
|
ACE_barrelLengths[]={8, 10, 12};
|
||||||
|
};
|
10
optionals/compat_rh_pdw/CfgWeapons.hpp
Normal file
10
optionals/compat_rh_pdw/CfgWeapons.hpp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
class CfgWeapons
|
||||||
|
{
|
||||||
|
class Rifle_Base_F;
|
||||||
|
class RH_PDW: Rifle_Base_F
|
||||||
|
{
|
||||||
|
ACE_barrelTwist=7;
|
||||||
|
ACE_barrelLength=10;
|
||||||
|
};
|
||||||
|
};
|
15
optionals/compat_rh_pdw/config.cpp
Normal file
15
optionals/compat_rh_pdw/config.cpp
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
class CfgPatches {
|
||||||
|
class ADDON {
|
||||||
|
units[] = {};
|
||||||
|
weapons[] = {};
|
||||||
|
requiredVersion = REQUIRED_VERSION;
|
||||||
|
requiredAddons[] = {"RH_PDW"};
|
||||||
|
author[]={"Ruthberg"};
|
||||||
|
VERSION_CONFIG;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
#include "CfgAmmo.hpp"
|
||||||
|
#include "CfgWeapons.hpp"
|
5
optionals/compat_rh_pdw/script_component.hpp
Normal file
5
optionals/compat_rh_pdw/script_component.hpp
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#define COMPONENT RH_PDW_comp
|
||||||
|
|
||||||
|
#include "\z\ace\addons\main\script_mod.hpp"
|
||||||
|
|
||||||
|
#include "\z\ace\addons\main\script_macros.hpp"
|
33
optionals/compat_rksl_pm_ii/CfgWeapons.hpp
Normal file
33
optionals/compat_rksl_pm_ii/CfgWeapons.hpp
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
|
||||||
|
class CfgWeapons {
|
||||||
|
class ItemCore;
|
||||||
|
class InventoryOpticsItem_Base_F;
|
||||||
|
|
||||||
|
class RKSL_optic_PMII_312 : ItemCore {
|
||||||
|
ACE_ScopeAdjust_Vertical[] = { -4, 30 };
|
||||||
|
ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
|
||||||
|
ACE_ScopeAdjust_Increment = 0.1;
|
||||||
|
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||||
|
class OpticsModes {
|
||||||
|
class Snip {
|
||||||
|
discreteDistance[] = { 100 };
|
||||||
|
discreteDistanceInitIndex = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class RKSL_optic_PMII_312_sunshade : ItemCore {
|
||||||
|
ACE_ScopeAdjust_Vertical[] = { -4, 30 };
|
||||||
|
ACE_ScopeAdjust_Horizontal[] = { -6, 6 };
|
||||||
|
ACE_ScopeAdjust_Increment = 0.1;
|
||||||
|
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||||
|
class OpticsModes {
|
||||||
|
class Snip {
|
||||||
|
discreteDistance[] = { 100 };
|
||||||
|
discreteDistanceInitIndex = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
14
optionals/compat_rksl_pm_ii/config.cpp
Normal file
14
optionals/compat_rksl_pm_ii/config.cpp
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
class CfgPatches {
|
||||||
|
class ADDON {
|
||||||
|
units[] = {};
|
||||||
|
weapons[] = {};
|
||||||
|
requiredVersion = REQUIRED_VERSION;
|
||||||
|
requiredAddons[] = {"RKSL_PMII"};
|
||||||
|
author[]={"Ruthberg"};
|
||||||
|
VERSION_CONFIG;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
#include "CfgWeapons.hpp"
|
5
optionals/compat_rksl_pm_ii/script_component.hpp
Normal file
5
optionals/compat_rksl_pm_ii/script_component.hpp
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#define COMPONENT RKSL_PMII_comp
|
||||||
|
|
||||||
|
#include "\z\ace\addons\main\script_mod.hpp"
|
||||||
|
|
||||||
|
#include "\z\ace\addons\main\script_macros.hpp"
|
@ -17,6 +17,11 @@ project = @ace
|
|||||||
# Default: None
|
# Default: None
|
||||||
# key = D:\Program Files (x86)\Bohemia Interactive\Tools\DSSignFile Tools\keys\ace_preAlpha.biprivatekey
|
# key = D:\Program Files (x86)\Bohemia Interactive\Tools\DSSignFile Tools\keys\ace_preAlpha.biprivatekey
|
||||||
|
|
||||||
|
# Path to where private keys are automatically created if the command-line parameter "key" is used
|
||||||
|
# Make sure this isn't in your public repository!
|
||||||
|
# Default: <work_drive>\private_keys
|
||||||
|
# private_key_path = P:\private_keys
|
||||||
|
|
||||||
# If set to True, the make system will attempt to autodetect addons in the
|
# If set to True, the make system will attempt to autodetect addons in the
|
||||||
# current folder by looking for directories with 'config.cpp' in them.
|
# current folder by looking for directories with 'config.cpp' in them.
|
||||||
# Default: True
|
# Default: True
|
||||||
|
158
tools/make.py
158
tools/make.py
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
# vim: set fileencoding=utf-8 :
|
# vim: set fileencoding=utf-8 :
|
||||||
|
|
||||||
# make.py
|
# make.py
|
||||||
@ -60,6 +60,9 @@ module_root = ""
|
|||||||
release_dir = ""
|
release_dir = ""
|
||||||
module_root_parent = ""
|
module_root_parent = ""
|
||||||
optionals_root = ""
|
optionals_root = ""
|
||||||
|
key_name = "ace_preAlpha"
|
||||||
|
key = ""
|
||||||
|
dssignfile = ""
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# http://akiscode.com/articles/sha-1directoryhash.shtml
|
# http://akiscode.com/articles/sha-1directoryhash.shtml
|
||||||
@ -196,6 +199,7 @@ def find_bi_tools(work_drive):
|
|||||||
else:
|
else:
|
||||||
raise Exception("BadTools","Arma 3 Tools are not installed correctly or the P: drive needs to be created.")
|
raise Exception("BadTools","Arma 3 Tools are not installed correctly or the P: drive needs to be created.")
|
||||||
|
|
||||||
|
|
||||||
def find_depbo_tools(regKey):
|
def find_depbo_tools(regKey):
|
||||||
"""Use registry entries to find DePBO-based tools."""
|
"""Use registry entries to find DePBO-based tools."""
|
||||||
stop = False
|
stop = False
|
||||||
@ -248,6 +252,7 @@ def find_depbo_tools(regKey):
|
|||||||
#Strip any quotations from the path due to a MikeRo tool bug which leaves a trailing space in some of its registry paths.
|
#Strip any quotations from the path due to a MikeRo tool bug which leaves a trailing space in some of its registry paths.
|
||||||
return [pboproject_path.strip('"'),rapify_path.strip('"'),makepbo_path.strip('"')]
|
return [pboproject_path.strip('"'),rapify_path.strip('"'),makepbo_path.strip('"')]
|
||||||
|
|
||||||
|
|
||||||
def color(color):
|
def color(color):
|
||||||
"""Set the color. Works on Win32 and normal terminals."""
|
"""Set the color. Works on Win32 and normal terminals."""
|
||||||
if sys.platform == "win32":
|
if sys.platform == "win32":
|
||||||
@ -336,6 +341,7 @@ def copy_important_files(source_dir,destination_dir):
|
|||||||
finally:
|
finally:
|
||||||
os.chdir(originalDir)
|
os.chdir(originalDir)
|
||||||
|
|
||||||
|
|
||||||
def copy_optionals_for_building(mod,pbos):
|
def copy_optionals_for_building(mod,pbos):
|
||||||
src_directories = os.listdir(optionals_root)
|
src_directories = os.listdir(optionals_root)
|
||||||
current_dir = os.getcwd()
|
current_dir = os.getcwd()
|
||||||
@ -350,10 +356,15 @@ def copy_optionals_for_building(mod,pbos):
|
|||||||
#print ("Adding the following file: " + file_name)
|
#print ("Adding the following file: " + file_name)
|
||||||
pbos.append(file_name)
|
pbos.append(file_name)
|
||||||
pbo_path = os.path.join(release_dir, "@ace","optionals",file_name)
|
pbo_path = os.path.join(release_dir, "@ace","optionals",file_name)
|
||||||
|
sigFile_name = file_name +"."+ key_name + ".bisign"
|
||||||
|
sig_path = os.path.join(release_dir, "@ace","optionals",sigFile_name)
|
||||||
if (os.path.isfile(pbo_path)):
|
if (os.path.isfile(pbo_path)):
|
||||||
print("Moving " + pbo_path + " for processing.")
|
print("Moving " + pbo_path + " for processing.")
|
||||||
shutil.move(pbo_path, os.path.join(release_dir,"@ace","addons",file_name))
|
shutil.move(pbo_path, os.path.join(release_dir,"@ace","addons",file_name))
|
||||||
|
|
||||||
|
if (os.path.isfile(sig_path)):
|
||||||
|
#print("Moving " + sig_path + " for processing.")
|
||||||
|
shutil.move(sig_path, os.path.join(release_dir,"@ace","addons",sigFile_name))
|
||||||
except:
|
except:
|
||||||
print_error("Error in moving")
|
print_error("Error in moving")
|
||||||
raise
|
raise
|
||||||
@ -384,7 +395,8 @@ def copy_optionals_for_building(mod,pbos):
|
|||||||
finally:
|
finally:
|
||||||
os.chdir(current_dir)
|
os.chdir(current_dir)
|
||||||
|
|
||||||
def cleanup_optionals(mod,pbos):
|
|
||||||
|
def cleanup_optionals(mod):
|
||||||
print("")
|
print("")
|
||||||
try:
|
try:
|
||||||
for dir_name in mod:
|
for dir_name in mod:
|
||||||
@ -400,9 +412,17 @@ def cleanup_optionals(mod,pbos):
|
|||||||
file_name = "ace_{}.pbo".format(dir_name)
|
file_name = "ace_{}.pbo".format(dir_name)
|
||||||
src_file_path = os.path.join(release_dir, "@ace","addons",file_name)
|
src_file_path = os.path.join(release_dir, "@ace","addons",file_name)
|
||||||
dst_file_path = os.path.join(release_dir, "@ace","optionals",file_name)
|
dst_file_path = os.path.join(release_dir, "@ace","optionals",file_name)
|
||||||
|
|
||||||
|
sigFile_name = file_name +"."+ key_name + ".bisign"
|
||||||
|
src_sig_path = os.path.join(release_dir, "@ace","addons",sigFile_name)
|
||||||
|
dst_sig_path = os.path.join(release_dir, "@ace","optionals",sigFile_name)
|
||||||
|
|
||||||
if (os.path.isfile(src_file_path)):
|
if (os.path.isfile(src_file_path)):
|
||||||
#print("Preserving " + file_name)
|
#print("Preserving " + file_name)
|
||||||
os.renames(src_file_path,dst_file_path)
|
os.renames(src_file_path,dst_file_path)
|
||||||
|
if (os.path.isfile(src_sig_path)):
|
||||||
|
#print("Preserving " + sigFile_name)
|
||||||
|
os.renames(src_sig_path,dst_sig_path)
|
||||||
except FileExistsError:
|
except FileExistsError:
|
||||||
print_error(file_name + " already exists")
|
print_error(file_name + " already exists")
|
||||||
continue
|
continue
|
||||||
@ -411,12 +431,40 @@ def cleanup_optionals(mod,pbos):
|
|||||||
except:
|
except:
|
||||||
print_error("Cleaning Optionals Failed")
|
print_error("Cleaning Optionals Failed")
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
|
||||||
|
def purge(dir, pattern, friendlyPattern="files"):
|
||||||
|
print_green("Deleting " + friendlyPattern + " files from directory: " + dir)
|
||||||
|
for f in os.listdir(dir):
|
||||||
|
if re.search(pattern, f):
|
||||||
|
os.remove(os.path.join(dir, f))
|
||||||
|
|
||||||
|
|
||||||
|
def build_signature_file(file_name):
|
||||||
|
global key
|
||||||
|
global dssignfile
|
||||||
|
print("Signing with " + key + ".")
|
||||||
|
ret = subprocess.call([dssignfile, key, file_name])
|
||||||
|
if ret == 0:
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
return False
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
def main(argv):
|
def main(argv):
|
||||||
"""Build an Arma addon suite in a directory from rules in a make.cfg file."""
|
"""Build an Arma addon suite in a directory from rules in a make.cfg file."""
|
||||||
print_blue(("\nmake.py for Arma, modified for Advanced Combat Environment v" + __version__))
|
print_blue(("\nmake.py for Arma, modified for Advanced Combat Environment v" + __version__))
|
||||||
|
|
||||||
|
global work_drive
|
||||||
|
global module_root
|
||||||
|
global release_dir
|
||||||
|
global module_root_parent
|
||||||
|
global optionals_root
|
||||||
|
global key_name
|
||||||
|
global key
|
||||||
|
global dssignfile
|
||||||
|
|
||||||
if sys.platform != "win32":
|
if sys.platform != "win32":
|
||||||
print_error("Non-Windows platform (Cygwin?). Please re-run from cmd.")
|
print_error("Non-Windows platform (Cygwin?). Please re-run from cmd.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
@ -436,7 +484,7 @@ def main(argv):
|
|||||||
release_version = 0 # Version of release
|
release_version = 0 # Version of release
|
||||||
use_pboproject = True # Default to pboProject build tool
|
use_pboproject = True # Default to pboProject build tool
|
||||||
make_target = "DEFAULT" # Which section in make.cfg to use for the build
|
make_target = "DEFAULT" # Which section in make.cfg to use for the build
|
||||||
new_key = False # Make a new key and use it to sign?
|
new_key = True # Make a new key and use it to sign?
|
||||||
quiet = False # Suppress output from build tool?
|
quiet = False # Suppress output from build tool?
|
||||||
|
|
||||||
# Parse arguments
|
# Parse arguments
|
||||||
@ -512,6 +560,8 @@ See the make.cfg file for additional build options.
|
|||||||
else:
|
else:
|
||||||
check_external = False
|
check_external = False
|
||||||
|
|
||||||
|
print_yellow("\nCheck external references is set to " + str(check_external))
|
||||||
|
|
||||||
# Get the directory the make script is in.
|
# Get the directory the make script is in.
|
||||||
make_root = os.path.dirname(os.path.realpath(__file__))
|
make_root = os.path.dirname(os.path.realpath(__file__))
|
||||||
make_root_parent = os.path.abspath(os.path.join(os.getcwd(), os.pardir))
|
make_root_parent = os.path.abspath(os.path.join(os.getcwd(), os.pardir))
|
||||||
@ -524,26 +574,27 @@ See the make.cfg file for additional build options.
|
|||||||
|
|
||||||
commit_id = subprocess.check_output(["git", "rev-parse", "HEAD"])
|
commit_id = subprocess.check_output(["git", "rev-parse", "HEAD"])
|
||||||
commit_id = str(commit_id, "utf-8")[:8]
|
commit_id = str(commit_id, "utf-8")[:8]
|
||||||
|
key_name = str(key_name+"-"+commit_id)
|
||||||
except:
|
except:
|
||||||
print_error("FAILED TO DETERMINE COMMIT ID.")
|
print_error("FAILED TO DETERMINE COMMIT ID.")
|
||||||
commit_id = "NOGIT"
|
commit_id = "NOGIT"
|
||||||
|
|
||||||
cfg = configparser.ConfigParser();
|
cfg = configparser.ConfigParser();
|
||||||
try:
|
try:
|
||||||
global work_drive
|
|
||||||
global module_root
|
|
||||||
global release_dir
|
|
||||||
global module_root_parent
|
|
||||||
global optionals_root
|
|
||||||
|
|
||||||
cfg.read(os.path.join(make_root, "make.cfg"))
|
cfg.read(os.path.join(make_root, "make.cfg"))
|
||||||
|
|
||||||
# Project name (with @ symbol)
|
# Project name (with @ symbol)
|
||||||
project = cfg.get(make_target, "project", fallback="@"+os.path.basename(os.getcwd()))
|
project = cfg.get(make_target, "project", fallback="@"+os.path.basename(os.getcwd()))
|
||||||
|
|
||||||
|
# BI Tools work drive on Windows
|
||||||
|
work_drive = cfg.get(make_target, "work_drive", fallback="P:\\")
|
||||||
|
|
||||||
# Private key path
|
# Private key path
|
||||||
key = cfg.get(make_target, "key", fallback=None)
|
key = cfg.get(make_target, "key", fallback=None)
|
||||||
|
|
||||||
|
# Private key creation directory
|
||||||
|
private_key_path = cfg.get(make_target, "private_key_path", fallback=os.path.join(work_drive, "private_keys"))
|
||||||
|
|
||||||
# Project prefix (folder path)
|
# Project prefix (folder path)
|
||||||
prefix = cfg.get(make_target, "prefix", fallback="")
|
prefix = cfg.get(make_target, "prefix", fallback="")
|
||||||
|
|
||||||
@ -561,9 +612,6 @@ See the make.cfg file for additional build options.
|
|||||||
# List of directories to ignore when detecting
|
# List of directories to ignore when detecting
|
||||||
ignore = [x.strip() for x in cfg.get(make_target, "ignore", fallback="release").split(',')]
|
ignore = [x.strip() for x in cfg.get(make_target, "ignore", fallback="release").split(',')]
|
||||||
|
|
||||||
# BI Tools work drive on Windows
|
|
||||||
work_drive = cfg.get(make_target, "work_drive", fallback="P:\\")
|
|
||||||
|
|
||||||
# Which build tool should we use?
|
# Which build tool should we use?
|
||||||
build_tool = cfg.get(make_target, "build_tool", fallback="addonbuilder").lower()
|
build_tool = cfg.get(make_target, "build_tool", fallback="addonbuilder").lower()
|
||||||
|
|
||||||
@ -640,6 +688,20 @@ See the make.cfg file for additional build options.
|
|||||||
print ("No cache found.")
|
print ("No cache found.")
|
||||||
cache = {}
|
cache = {}
|
||||||
|
|
||||||
|
if not os.path.isdir(os.path.join(release_dir, project, "addons")):
|
||||||
|
try:
|
||||||
|
os.makedirs(os.path.join(release_dir, project, "addons"))
|
||||||
|
except:
|
||||||
|
print_error("Cannot create release directory")
|
||||||
|
raise
|
||||||
|
|
||||||
|
if not os.path.isdir(os.path.join(release_dir, project, "keys")):
|
||||||
|
try:
|
||||||
|
os.makedirs(os.path.join(release_dir, project, "keys"))
|
||||||
|
except:
|
||||||
|
print_error("Cannot create release directory")
|
||||||
|
raise
|
||||||
|
|
||||||
#Temporarily copy optionals_root for building. They will be removed later.
|
#Temporarily copy optionals_root for building. They will be removed later.
|
||||||
optionals_modules = []
|
optionals_modules = []
|
||||||
optional_files = []
|
optional_files = []
|
||||||
@ -659,32 +721,43 @@ See the make.cfg file for additional build options.
|
|||||||
|
|
||||||
# Make the key specified from command line if necessary.
|
# Make the key specified from command line if necessary.
|
||||||
if new_key:
|
if new_key:
|
||||||
if not os.path.isfile(os.path.join(module_root, key_name + ".biprivatekey")):
|
if not os.path.isfile(os.path.join(private_key_path, key_name + ".biprivatekey")):
|
||||||
print_green("\nRequested key does not exist.")
|
print_yellow("\nRequested key does not exist.")
|
||||||
|
try:
|
||||||
|
os.makedirs(private_key_path)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
curDir = os.getcwd()
|
||||||
|
os.chdir(private_key_path)
|
||||||
ret = subprocess.call([dscreatekey, key_name]) # Created in make_root
|
ret = subprocess.call([dscreatekey, key_name]) # Created in make_root
|
||||||
|
os.chdir(curDir)
|
||||||
if ret == 0:
|
if ret == 0:
|
||||||
print_blue("Created: " + os.path.join(module_root, key_name + ".biprivatekey"))
|
print_green("Created: " + os.path.join(private_key_path, key_name + ".biprivatekey"))
|
||||||
|
print("Removing any old signature keys...")
|
||||||
|
purge(os.path.join(module_root, release_dir, project, "addons"), "^.*\.bisign$","*.bisign")
|
||||||
|
purge(os.path.join(module_root, release_dir, project, "optionals"), "^.*\.bisign$","*.bisign")
|
||||||
|
purge(os.path.join(module_root, release_dir, project, "keys"), "^.*\.bikey$","*.bikey")
|
||||||
else:
|
else:
|
||||||
print_error("Failed to create key!")
|
print_error("Failed to create key!")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
print_blue("Copying public key to release directory.")
|
print("Copying public key to release directory.")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
os.makedirs(os.path.join(module_root, release_dir, "Keys"))
|
os.makedirs(os.path.join(module_root, release_dir, project, "keys"))
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
shutil.copyfile(os.path.join(module_root, key_name + ".bikey"), os.path.join(module_root, release_dir, "Keys", key_name + ".bikey"))
|
shutil.copyfile(os.path.join(private_key_path, key_name + ".bikey"), os.path.join(module_root, release_dir, project, "keys", key_name + ".bikey"))
|
||||||
|
|
||||||
except:
|
except:
|
||||||
raise
|
|
||||||
print_error("Could not copy key to release directory.")
|
print_error("Could not copy key to release directory.")
|
||||||
|
raise
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print_green("\nNOTE: Using key " + os.path.join(module_root, key_name + ".biprivatekey"))
|
print_green("\nNOTE: Using key " + os.path.join(private_key_path, key_name + ".biprivatekey"))
|
||||||
|
|
||||||
key = os.path.join(module_root, key_name + ".biprivatekey")
|
key = os.path.join(private_key_path, key_name + ".biprivatekey")
|
||||||
|
|
||||||
|
|
||||||
# For each module, prep files and then build.
|
# For each module, prep files and then build.
|
||||||
@ -692,6 +765,7 @@ See the make.cfg file for additional build options.
|
|||||||
for module in modules:
|
for module in modules:
|
||||||
print_green("\nMaking " + module + "-"*max(1, (60-len(module))))
|
print_green("\nMaking " + module + "-"*max(1, (60-len(module))))
|
||||||
missing = False
|
missing = False
|
||||||
|
sigMissing = False
|
||||||
|
|
||||||
# Cache check
|
# Cache check
|
||||||
if module in cache:
|
if module in cache:
|
||||||
@ -706,16 +780,23 @@ See the make.cfg file for additional build options.
|
|||||||
# Hash the module
|
# Hash the module
|
||||||
new_sha = get_directory_hash(os.path.join(module_root, module))
|
new_sha = get_directory_hash(os.path.join(module_root, module))
|
||||||
|
|
||||||
# Is the pbo file missing?
|
# Is the pbo or sig file missing?
|
||||||
missing = not os.path.isfile(os.path.join(release_dir, project, "addons", "ace_{}.pbo".format(module)))
|
missing = not os.path.isfile(os.path.join(release_dir, project, "addons", "ace_{}.pbo".format(module)))
|
||||||
|
sigFile = pbo_name_prefix+module + ".pbo." + key_name + ".bisign"
|
||||||
|
sigMissing = not os.path.isfile(os.path.join(release_dir, project, "addons", sigFile ))
|
||||||
|
|
||||||
if missing:
|
if missing:
|
||||||
print("ace_{}.pbo".format(module) + " is missing. Building...")
|
print_yellow("Missing PBO file ace_{}.pbo".format(module) + ". Building...")
|
||||||
|
|
||||||
# Check if it needs rebuilt
|
# Check if it needs rebuilt
|
||||||
# print ("Hash:", new_sha)
|
# print ("Hash:", new_sha)
|
||||||
if old_sha == new_sha and not missing:
|
if old_sha == new_sha and not missing:
|
||||||
if not force_build:
|
if not force_build:
|
||||||
print("Module has not changed.")
|
print("Module has not changed.")
|
||||||
|
if sigMissing:
|
||||||
|
if key:
|
||||||
|
print("Missing Signature key " + sigFile)
|
||||||
|
build_signature_file(os.path.join(module_root, release_dir, project, "addons", pbo_name_prefix + module + ".pbo"))
|
||||||
# Skip everything else
|
# Skip everything else
|
||||||
continue
|
continue
|
||||||
|
|
||||||
@ -740,13 +821,13 @@ See the make.cfg file for additional build options.
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
# Remove the old pbo, key, and log
|
# Remove the old pbo, key, and log
|
||||||
old = os.path.join(module_root, release_dir, project, "Addons", module) + "*"
|
old = os.path.join(module_root, release_dir, project, "addons", pbo_name_prefix+module) + "*"
|
||||||
files = glob.glob(old)
|
files = glob.glob(old)
|
||||||
for f in files:
|
for f in files:
|
||||||
os.remove(f)
|
os.remove(f)
|
||||||
|
|
||||||
if pbo_name_prefix:
|
if pbo_name_prefix:
|
||||||
old = os.path.join(module_root, release_dir, project, "Addons", pbo_name_prefix+module) + "*"
|
old = os.path.join(module_root, release_dir, project, "addons", pbo_name_prefix+module) + "*"
|
||||||
files = glob.glob(old)
|
files = glob.glob(old)
|
||||||
for f in files:
|
for f in files:
|
||||||
os.remove(f)
|
os.remove(f)
|
||||||
@ -759,11 +840,11 @@ See the make.cfg file for additional build options.
|
|||||||
|
|
||||||
# Build the module into a pbo
|
# Build the module into a pbo
|
||||||
print_blue("Building: " + os.path.join(work_drive, prefix, module))
|
print_blue("Building: " + os.path.join(work_drive, prefix, module))
|
||||||
print_blue("Destination: " + os.path.join(module_root, release_dir, project, "Addons"))
|
print_blue("Destination: " + os.path.join(module_root, release_dir, project, "addons"))
|
||||||
|
|
||||||
# Make destination folder (if needed)
|
# Make destination folder (if needed)
|
||||||
try:
|
try:
|
||||||
os.makedirs(os.path.join(module_root, release_dir, project, "Addons"))
|
os.makedirs(os.path.join(module_root, release_dir, project, "addons"))
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -815,7 +896,7 @@ See the make.cfg file for additional build options.
|
|||||||
|
|
||||||
if os.path.isfile(os.path.join(work_drive, prefix, module, "$NOBIN$")):
|
if os.path.isfile(os.path.join(work_drive, prefix, module, "$NOBIN$")):
|
||||||
print_green("$NOBIN$ Found. Proceeding with non-binarizing!")
|
print_green("$NOBIN$ Found. Proceeding with non-binarizing!")
|
||||||
cmd = [makepboTool, "-P","-A","-L","-N","-G", os.path.join(work_drive, prefix, module),os.path.join(module_root, release_dir, project,"Addons")]
|
cmd = [makepboTool, "-P","-A","-L","-N","-G", os.path.join(work_drive, prefix, module),os.path.join(module_root, release_dir, project,"addons")]
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if check_external:
|
if check_external:
|
||||||
@ -837,7 +918,7 @@ See the make.cfg file for additional build options.
|
|||||||
# Prettyprefix rename the PBO if requested.
|
# Prettyprefix rename the PBO if requested.
|
||||||
if pbo_name_prefix:
|
if pbo_name_prefix:
|
||||||
try:
|
try:
|
||||||
os.rename(os.path.join(module_root, release_dir, project, "Addons", module+".pbo"), os.path.join(module_root, release_dir, project, "Addons", pbo_name_prefix+module+".pbo"))
|
os.rename(os.path.join(module_root, release_dir, project, "addons", module+".pbo"), os.path.join(module_root, release_dir, project, "addons", pbo_name_prefix+module+".pbo"))
|
||||||
except:
|
except:
|
||||||
raise
|
raise
|
||||||
print_error("Could not rename built PBO with prefix.")
|
print_error("Could not rename built PBO with prefix.")
|
||||||
@ -845,9 +926,9 @@ See the make.cfg file for additional build options.
|
|||||||
if key:
|
if key:
|
||||||
print("Signing with " + key + ".")
|
print("Signing with " + key + ".")
|
||||||
if pbo_name_prefix:
|
if pbo_name_prefix:
|
||||||
ret = subprocess.call([dssignfile, key, os.path.join(module_root, release_dir, project, "Addons", pbo_name_prefix + module + ".pbo")])
|
ret = subprocess.call([dssignfile, key, os.path.join(module_root, release_dir, project, "addons", pbo_name_prefix + module + ".pbo")])
|
||||||
else:
|
else:
|
||||||
ret = subprocess.call([dssignfile, key, os.path.join(module_root, release_dir, project, "Addons", module + ".pbo")])
|
ret = subprocess.call([dssignfile, key, os.path.join(module_root, release_dir, project, "addons", module + ".pbo")])
|
||||||
|
|
||||||
if ret == 0:
|
if ret == 0:
|
||||||
build_successful = True
|
build_successful = True
|
||||||
@ -887,7 +968,7 @@ See the make.cfg file for additional build options.
|
|||||||
# Call AddonBuilder
|
# Call AddonBuilder
|
||||||
os.chdir("P:\\")
|
os.chdir("P:\\")
|
||||||
|
|
||||||
cmd = [addonbuilder, os.path.join(work_drive, prefix, module), os.path.join(make_root, release_dir, project, "Addons"), "-clear", "-project="+work_drive]
|
cmd = [addonbuilder, os.path.join(work_drive, prefix, module), os.path.join(make_root, release_dir, project, "addons"), "-clear", "-project="+work_drive]
|
||||||
if not do_binarize:
|
if not do_binarize:
|
||||||
cmd.append("-packonly")
|
cmd.append("-packonly")
|
||||||
|
|
||||||
@ -910,7 +991,7 @@ See the make.cfg file for additional build options.
|
|||||||
# Prettyprefix rename the PBO if requested.
|
# Prettyprefix rename the PBO if requested.
|
||||||
if pbo_name_prefix:
|
if pbo_name_prefix:
|
||||||
try:
|
try:
|
||||||
os.rename(os.path.join(make_root, release_dir, project, "Addons", module+".pbo"), os.path.join(make_root, release_dir, project, "Addons", pbo_name_prefix+module+".pbo"))
|
os.rename(os.path.join(make_root, release_dir, project, "addons", module+".pbo"), os.path.join(make_root, release_dir, project, "addons", pbo_name_prefix+module+".pbo"))
|
||||||
except:
|
except:
|
||||||
raise
|
raise
|
||||||
print_error("Could not rename built PBO with prefix.")
|
print_error("Could not rename built PBO with prefix.")
|
||||||
@ -920,9 +1001,9 @@ See the make.cfg file for additional build options.
|
|||||||
if key:
|
if key:
|
||||||
print("Signing with " + key + ".")
|
print("Signing with " + key + ".")
|
||||||
if pbo_name_prefix:
|
if pbo_name_prefix:
|
||||||
ret = subprocess.call([dssignfile, key, os.path.join(make_root, release_dir, project, "Addons", pbo_name_prefix + module + ".pbo")])
|
ret = subprocess.call([dssignfile, key, os.path.join(make_root, release_dir, project, "addons", pbo_name_prefix + module + ".pbo")])
|
||||||
else:
|
else:
|
||||||
ret = subprocess.call([dssignfile, key, os.path.join(make_root, release_dir, project, "Addons", module + ".pbo")])
|
ret = subprocess.call([dssignfile, key, os.path.join(make_root, release_dir, project, "addons", module + ".pbo")])
|
||||||
|
|
||||||
if ret == 0:
|
if ret == 0:
|
||||||
build_successful = True
|
build_successful = True
|
||||||
@ -965,13 +1046,16 @@ See the make.cfg file for additional build options.
|
|||||||
|
|
||||||
print_green("\nDone.")
|
print_green("\nDone.")
|
||||||
|
|
||||||
|
copy_important_files(module_root_parent,os.path.join(release_dir, "@ace"))
|
||||||
|
cleanup_optionals(optionals_modules)
|
||||||
|
|
||||||
# Make release
|
# Make release
|
||||||
if make_release:
|
if make_release:
|
||||||
print_blue("\nMaking release: " + project + "-" + release_version + ".zip")
|
print_blue("\nMaking release: " + project + "-" + release_version + ".zip")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Delete all log files
|
# Delete all log files
|
||||||
for root, dirs, files in os.walk(os.path.join(module_root, release_dir, project, "Addons")):
|
for root, dirs, files in os.walk(os.path.join(module_root, release_dir, project, "addons")):
|
||||||
for currentFile in files:
|
for currentFile in files:
|
||||||
if currentFile.lower().endswith("log"):
|
if currentFile.lower().endswith("log"):
|
||||||
os.remove(os.path.join(root, currentFile))
|
os.remove(os.path.join(root, currentFile))
|
||||||
@ -1004,8 +1088,6 @@ See the make.cfg file for additional build options.
|
|||||||
except:
|
except:
|
||||||
print_error("Could not copy files. Is Arma 3 running?")
|
print_error("Could not copy files. Is Arma 3 running?")
|
||||||
|
|
||||||
copy_important_files(module_root_parent,os.path.join(release_dir, "@ace"))
|
|
||||||
cleanup_optionals(optionals_modules,optional_files)
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main(sys.argv)
|
main(sys.argv)
|
||||||
input("Press Enter to continue...")
|
input("Press Enter to continue...")
|
||||||
|
Loading…
Reference in New Issue
Block a user