Merge branch 'master' of https://github.com/KoffeinFlummi/ACE3 into repair

This commit is contained in:
commy2 2015-04-21 23:50:02 +02:00
commit d74dfed89b
25 changed files with 219 additions and 68 deletions

View File

@ -891,6 +891,25 @@ class Heli_Attack_01_base_F: Helicopter_Base_F {
class OpticsIn
{
class WideUnstabalized
{
opticsDisplayName = "WU";
initAngleX = 0;
minAngleX = -35;
maxAngleX = 10;
initAngleY = 0;
minAngleY = -100;
maxAngleY = 100;
initFov = 0.466;
minFov = 0.466;
maxFov = 0.466;
visionMode[] = {"Normal","Ti"};
thermalMode[] = {0,1};
gunnerOpticsColor[] = {0,0,0,1};
directionStabilized = 0;
horizontallyStabilized = 1;
gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_wide_F";
};
class Wide
{
opticsDisplayName = "W";

View File

@ -5,7 +5,6 @@ class CfgWeapons {
class ACE_IR_Strobe_Item: ACE_ItemCore {
ACE_attachable = "ACE_IR_Strobe_Effect";
author = "$STR_ACE_Common_ACETeam";
scope = 2;
displayName = "$STR_ACE_IrStrobe_Name";
descriptionShort = "$STR_ACE_IrStrobe_Description";

View File

@ -164,7 +164,7 @@ class CfgVehicles {
scope = 2;
accuracy = 1000;
displayName = "[ACE] Ammo Supply Crate";
// TODO: model = "...";
model = "\A3\weapons_F\AmmoBoxes\AmmoBox_F";
author = "$STR_ACE_Common_ACETeam";
class TransportMagazines {
MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_Mag_SD,4);

View File

@ -2,6 +2,7 @@
class CfgWeapons {
class ItemCore;
class ACE_ItemCore: ItemCore {
author = "$STR_ACE_Common_ACETeam";
type = 4096;//4;
detectRange = -1;
simulation = "ItemMineDetector";
@ -13,6 +14,7 @@ class CfgWeapons {
};
class ACE_FakePrimaryWeapon: Rifle_Base_F {
author = "$STR_ACE_Common_ACETeam";
scope = 2;
scopeCurator = 1;
@ -30,7 +32,6 @@ class CfgWeapons {
class InventoryItem_Base_F;
class ACE_Banana: ACE_ItemCore {
author = "$STR_ACE_Common_ACETeam";
scope = 2;
displayName = "$STR_ACE_Common_bananaDisplayName";
descriptionShort = "$STR_ACE_Common_bananaDescr";

View File

@ -50,7 +50,7 @@ class CfgVehicles {
class Items_base_F;
class ACE_DefuseObject: Items_base_F {
XEH_ENABLED;
author = "ACE";
author = "$STR_ACE_Common_ACETeam";
_generalMacro = "ACE_DefuseObject";
displayName = "ACE Defuse Helper";
mapSize = 0.2;
@ -80,7 +80,7 @@ class CfgVehicles {
};
class ACE_Explosives_Place: Items_base_F {
XEH_ENABLED;
author = "ACE";
author = "$STR_ACE_Common_ACETeam";
_generalMacro = "ACE_Explosives_Place";
displayName = "Multi-meter";
mapSize = 0.2;

View File

@ -1,6 +1,7 @@
class CfgMagazines {
class HandGrenade;
class ACE_HandFlare_Base: HandGrenade {
author = "$STR_ACE_Common_ACETeam";
value = 2;
nameSoundWeapon = "smokeshell";
nameSound = "smokeshell";
@ -41,19 +42,23 @@ class CfgMagazines {
};
class ACE_M84: HandGrenade {
ammo = "ACE_G_M84";
author = "$STR_ACE_Common_ACETeam";
displayname = "$STR_ACE_Grenades_M84_Name";
descriptionshort = "$STR_ACE_Grenades_M84_Description";
displayNameShort = "M84";
mass = 4;
model = PATHTOF(models\ACE_m84.p3d);
picture = PATHTOF(UI\ACE_m84_x_ca.paa);
};
class 3Rnd_UGL_FlareGreen_F;
class 6Rnd_GreenSignal_F: 3Rnd_UGL_FlareGreen_F {
author = "$STR_ACE_Common_ACETeam";
ammo = "F_40mm_Green";
initSpeed = 120;
};
class 6Rnd_RedSignal_F: 6Rnd_GreenSignal_F {
author = "$STR_ACE_Common_ACETeam";
ammo = "F_40mm_Red";
initSpeed = 120;
};

View File

@ -80,7 +80,7 @@ _affected = _grenade nearEntities ["CAManBase", 20];
//Add ace_medical pain effect:
if ((isClass (configFile >> "CfgPatches" >> "ACE_Medical")) && {_strength > 0}) then {
if ((isClass (configFile >> "CfgPatches" >> "ACE_Medical")) && {_strength > 0.1}) then {
[ACE_player, (_strength / 2)] call EFUNC(medical,adjustPainLevel);
};

View File

@ -3,6 +3,15 @@
if (!hasInterface) exitWith {};
//Setup text/shadow color matrix
[] call FUNC(setupTextColors);
["SettingChanged", {
PARAMS_2(_name,_value);
if ((_name == QGVAR(colorTextMax)) || {_name == QGVAR(colorTextMin)} || {_name == QGVAR(colorShadowMax)} || {_name == QGVAR(colorShadowMin)}) then {
[] call FUNC(setupTextColors);
};
}] call EFUNC(common,addEventhandler);
// Install the render EH on the main display
addMissionEventHandler ["Draw3D", DFUNC(render)];

View File

@ -21,6 +21,7 @@ PREP(renderBaseMenu);
PREP(renderIcon);
PREP(renderMenu);
PREP(renderSelector);
PREP(setupTextColors);
PREP(splitPath);
GVAR(keyDown) = false;

View File

@ -37,6 +37,30 @@ class ACE_Settings {
isClientSettable = 1;
displayName = "$STR_ACE_Interact_Menu_UseListMenu";
};
class GVAR(colorTextMax) {
value[] = {1, 1, 1, 1};
typeName = "COLOR";
isClientSettable = 1;
displayName = "$STR_ACE_Interact_Menu_ColorTextMax";
};
class GVAR(colorTextMin) {
value[] = {1, 1, 1, 0.25};
typeName = "COLOR";
isClientSettable = 1;
displayName = "$STR_ACE_Interact_Menu_ColorTextMin";
};
class GVAR(colorShadowMax) {
value[] = {1, 1, 1, 1};
typeName = "COLOR";
isClientSettable = 1;
displayName = "$STR_ACE_Interact_Menu_ColorShadowMax";
};
class GVAR(colorShadowMin) {
value[] = {1, 1, 1, 0.25};
typeName = "COLOR";
isClientSettable = 1;
displayName = "$STR_ACE_Interact_Menu_ColorShadowMin";
};
};
class ACE_Extensions {

View File

@ -4,12 +4,11 @@
*
* Argument:
* 0: Text <STRING>
* 1: Color <STRING>
* 1: Icon <STRING>
* 2: 2d position <ARRAY>
* 3: ?
* 4: ?
* 5: ?
* 6: Icon <STRING>
* 3: Color <STRING>
* 4: Shadow Color <STRING>
* 5: Icon Color <STRING>
*
* Return value:
* None
@ -18,11 +17,8 @@
*/
#include "script_component.hpp"
#define DEFAULT_ICON QUOTE(\z\ace\addons\interaction\ui\dot_ca.paa)
private ["_color", "_sPos", "_ctrl", "_icon"];
_text = _this select 0;
_color = _this select 1;
_sPos = _this select 2;
_icon = _this select 6;
private ["_ctrl"];
PARAMS_6(_text,_icon,_sPos,_textColor,_shadowColor,_iconColor);
//systemChat format ["Icon %1 - %2,%3", _text, _sPos select 0, _sPos select 1];
@ -37,16 +33,15 @@ if(_icon == "") then {
};
_text = if (GVAR(UseListMenu)) then {
format ["<img image='%1' color='%2' align='left'/><t color='%3' size='0.80' shadow='1' shadowColor='#000000' shadowOffset='0.07'>%4</t>", _icon, _color, _color, _text]
format ["<img image='%1' color='%2' align='left'/><t color='%3' size='0.80' shadow='1' shadowColor='%4' shadowOffset='0.06'>%5</t>", _icon, _iconColor, _textColor, _shadowColor, _text]
} else {
format ["<img image='%1' color='%2' align='center'/><br/><t color='%3' size='0.80' align='center' shadow='1' shadowColor='#000000' shadowOffset='0.07'>%4</t>", _icon, _color, _color, "ace_breakLine" callExtension _text];
format ["<img image='%1' color='%2' align='center'/><br/><t color='%3' size='0.80' align='center' shadow='1' shadowColor='%4' shadowOffset='0.06'>%5</t>", _icon, _iconColor, _textColor, _shadowColor, "ace_breakLine" callExtension _text];
};
_ctrl ctrlSetStructuredText (parseText _text);
_text = if (GVAR(UseListMenu)) then {
_ctrl ctrlSetPosition [(_sPos select 0)-(0.0095*SafeZoneW), (_sPos select 1)-(0.0095*SafeZoneW), 0.20*SafeZoneW, 0.035*SafeZoneW];
_ctrl ctrlSetPosition [(_sPos select 0)-(0.0095*SafeZoneW), (_sPos select 1)-(0.0095*SafeZoneW), 0.20*SafeZoneW, 0.035*SafeZoneW];
} else {
_ctrl ctrlSetPosition [(_sPos select 0)-(0.0750*SafeZoneW), (_sPos select 1)-(0.0095*SafeZoneW), 0.15*SafeZoneW, 0.100*SafeZoneW];
_ctrl ctrlSetPosition [(_sPos select 0)-(0.0750*SafeZoneW), (_sPos select 1)-(0.0095*SafeZoneW), 0.15*SafeZoneW, 0.100*SafeZoneW];
};
//_ctrl ctrlSetBackgroundColor [0, 1, 0, 0.1];
_ctrl ctrlCommit 0;

View File

@ -45,19 +45,17 @@ _menuInSelectedPath = true;
// Render icon
// ARGB Color (First Hex Pair is transparancy)
_color = "#FFFFFFFF";
_textColor = GVAR(colorSelected);
_shadowColor = GVAR(colorSelectedShadow);
if(!_menuInSelectedPath) then {
if (_menuDepth > 0) then {
_color = format ["#%1FFFFFF", [255 * ((((count _path) - 1)/_menuDepth) max 0.25)] call EFUNC(common,toHex)];
} else {
_color = format ["#%1FFFFFF", [255 * 0.75] call EFUNC(common,toHex)];
};
_textColor = (GVAR(colorNotSelectedMatrix) select (count _path)) select _menuDepth;
_shadowColor = (GVAR(colorShadowNotSelectedMatrix) select (count _path)) select _menuDepth;
};
//END_COUNTER(constructing_colors);
//BEGIN_COUNTER(fnc_renderIcons);
[_actionData select 1, _color, _sPos, 1, 1, 0, _actionData select 2, 0.5, 0.025, "TahomaB"] call FUNC(renderIcon);
[_actionData select 1, _actionData select 2, _sPos, _textColor, _shadowColor, "#FFFFFFFF"] call FUNC(renderIcon);
//END_COUNTER(fnc_renderIcons);

View File

@ -0,0 +1,52 @@
/*
* Author: PabstMirror
* Builds color strings needed for displaying interaction text
*
* Argument:
* None
*
* Return value:
* None
*
* Public: No
*/
#include "script_component.hpp"
private ["_mixColor", "_rowT", "_rowS", "_menuDepth", "_pathCount", "_menuInSelectedPath", "_color", "_path"];
//Mixes 2 colors (number arrays) and makes a color string "#AARRGGBB" for structured text
_mixColor = {
PARAMS_3(_color1,_color2,_ratio);
private ["_return", "_mix", "_index"];
_return = "";
for "_index" from 0 to 3 do {
_mix = linearConversion [0, 1, _ratio, (_color1 select _index), (_color2 select _index)];
if (_index != 3) then {
_return = _return + ([255 * _mix] call EFUNC(common,toHex));
} else {
_return = "#" + ([255 * _mix] call EFUNC(common,toHex)) + _return;
};
};
_return
};
GVAR(colorSelected) = [GVAR(colorTextMin), GVAR(colorTextMax), 1] call _mixColor;
GVAR(colorSelectedShadow) = [GVAR(colorShadowMin), GVAR(colorShadowMax), 1] call _mixColor;
GVAR(colorNotSelectedMatrix) = [];
GVAR(colorShadowNotSelectedMatrix) = [];
for "_pathCount" from 0 to 15 do {
_rowT = [];
_rowS = [];
for "_menuDepth" from 0 to 15 do {
if (_menuDepth > 0) then {
_rowT pushBack ([GVAR(colorTextMin), GVAR(colorTextMax), (((_pathCount - 1) / _menuDepth) max 0.25)] call _mixColor);
_rowS pushBack ([GVAR(colorShadowMin), GVAR(colorShadowMax), (((_pathCount - 1) / _menuDepth) max 0.25)] call _mixColor);
} else {
_rowT pushBack ([GVAR(colorTextMin), GVAR(colorTextMax), 0] call _mixColor);
_rowS pushBack ([GVAR(colorShadowMin), GVAR(colorShadowMax), 0] call _mixColor);
};
};
GVAR(colorNotSelectedMatrix) pushBack _rowT;
GVAR(colorShadowNotSelectedMatrix) pushBack _rowS;
};

View File

@ -71,5 +71,17 @@
<Hungarian>Járműves cselekvések</Hungarian>
<Italian>Interazioni con veicoli</Italian>
</Key>
<Key ID="STR_ACE_Interact_Menu_ColorTextMax">
<English>Interaction - Text Max</English>
</Key>
<Key ID="STR_ACE_Interact_Menu_ColorTextMin">
<English>Interaction - Text Min</English>
</Key>
<Key ID="STR_ACE_Interact_Menu_ColorShadowMax">
<English>Interaction - Shadow Max</English>
</Key>
<Key ID="STR_ACE_Interact_Menu_ColorShadowMin">
<English>Interaction - Shadow Min</English>
</Key>
</Package>
</Project>
</Project>

View File

@ -3,7 +3,6 @@ class CfgWeapons {
class ACE_ItemCore;
class ACE_wirecutter: ACE_ItemCore {
author = "$STR_ACE_Common_ACETeam";
displayName = "$STR_ACE_logistics_wirecutter_wirecutterName";
descriptionShort = "$STR_ACE_logistics_wirecutter_wirecutterDescription";
model = "\A3\weapons_F\ammo\mag_univ.p3d";

View File

@ -72,7 +72,7 @@ _vehicle = vehicle _unit;
// Do not obscure the map if the player is on a enclosed vehicle (assume internal illumination)
if (_vehicle != _unit) then {
// Player is in a vehicle
if (isTurnedOut _unit && {_vehicle isKindOf "Tank" || {_vehicle isKindOf "Wheeled_APC"}}) then {
if (isTurnedOut _unit && { _vehicle isKindOf "Tank" || { ( _vehicle isKindOf "Helicopter" || _vehicle isKindOf "Plane" ) && { (driver _vehicle) == _unit || { (gunner _vehicle) == _unit } } } || {_vehicle isKindOf "Wheeled_APC"}}) then {
_isEnclosed = true;
};
};

View File

@ -4,10 +4,12 @@
<Key ID="TR_ACE_Medical_litterSimulationDetail">
<English>Litter Simulation Detail</English>
<Polish>Detale zużytych medykamentów</Polish>
<Spanish>Detalle de simulación de basura</Spanish>
</Key>
<Key ID="TR_ACE_Medical_litterSimulationDetail_Desc">
<English>Litter simulation detail level sets the number of litter items which will be locally spawned in the client. Excessive amounts in local areas could cause FPS lag, so this is a client only setting.</English>
<Polish>Opcja ta ustawia liczbę zużytych medykamentów, jakie pojawiają się lokalnie wokół gracza. Ich zbyt duża ilość może spowodować spadki FPS, dlatego jest to ustawienie tylko po stronie klienta.</Polish>
<Spanish>Detalle simulación de basura establece el número de artículos de basura que se generan a nivel local en el cliente. Las cantidades excesivas en áreas locales podrían causar caída de rendimiento, así que esto es un ajuste de cliente únicamente.</Spanish>
</Key>
<Key ID="STR_ACE_Medical_Inject_Atropine">
<English>Inject Atropine</English>
@ -1634,4 +1636,4 @@
<French>Aberration chromatique</French>
</Key>
</Package>
</Project>
</Project>

View File

@ -3,7 +3,6 @@ class CfgWeapons {
class InventoryItem_Base_F;
class ACE_microDAGR: ACE_ItemCore {
author = "$STR_ACE_Common_ACETeam";
scope = 2;
displayName = "$STR_ACE_microdagr_itemName";
descriptionShort = "$STR_ACE_microdagr_itemDescription";

View File

@ -20,7 +20,7 @@ class CfgVehicles {
class ACE_Comanche_Test : B_Heli_Attack_01_F {
displayName = "ACE_Comanche_Test";
author = "ACE Team";
author = "$STR_ACE_Common_ACETeam";
class Library {
libTextDesc = "ACE_Comanche_Test";
};

View File

@ -17,6 +17,7 @@
<Key ID="STR_ACE_MissileGuidance_Desc">
<English>Advanced missile guidance, or AMG, provides multiple enhancements to missile locking and firing. It is also a framework required for missile weapon types.</English>
<Polish>Zaawansowane namierzanie rakiet, lub ZNR, dostarcza wiele poprawek do systemu namierzania rakiet oraz dodaje nowe tryby strzału. Jest to wymagana opcja dla broni rakietowych.</Polish>
<Spanish>Guía de misiles avanzada, o AMG en sus siglas en inglés, ofrece múltiples mejoras en el fijado y disparo de misiles. Es también un framework requerido para armas de tipo misil.</Spanish>
</Key>
<Key ID="STR_ACE_Hydra70_DAGR">
<English>Hydra-70 DAGR Missile</English>

View File

@ -5,10 +5,35 @@ class CfgMovesBasic {
};
class Actions {
class RifleStandActionsNoAdjust;
class RifleLowStandActionsNoAdjust;
class RifleBaseStandActions;
class RifleKneelActions: RifleBaseStandActions {
Civil = "AmovPknlMstpSnonWnonDnon";
};
class RifleProneActions: RifleBaseStandActions {
Civil = "AmovPpneMstpSnonWnonDnon";
SecondaryWeapon = "AmovPpneMstpSrasWlnrDnon";
};
class PistolStandActions;
class PistolProneActions: PistolStandActions {
SecondaryWeapon = "AmovPpneMstpSrasWlnrDnon";
};
class LauncherKneelActions;
/*class LauncherStandActions: LauncherKneelActions {
PlayerProne = "AmovPpneMstpSrasWlnrDnon";
Down = "AmovPpneMstpSrasWlnrDnon";
};*/
class LauncherProneActions: LauncherKneelActions {
TurnL = "AmovPpneMstpSrasWlnrDnon_turnl";
TurnLRelaxed = "AmovPpneMstpSrasWlnrDnon_turnl";
TurnR = "AmovPpneMstpSrasWlnrDnon_turnr";
TurnRRelaxed = "AmovPpneMstpSrasWlnrDnon_turnr";
};
// WEAPON RAISED - RUNNING
class RifleStandActionsNoAdjust;
class RifleStandActionsRunF: RifleStandActionsNoAdjust {
getOver = "AovrPercMrunSrasWrflDf";
};
@ -18,6 +43,7 @@ class CfgMovesBasic {
class RifleStandActionsRunFR: RifleStandActionsNoAdjust {
getOver = "AovrPercMrunSrasWrflDf";
};
// WEAPON RAISED - SPRINTING
class RifleStandEvasiveActionsF: RifleStandActionsNoAdjust {
getOver = "AovrPercMrunSrasWrflDf";
@ -28,7 +54,9 @@ class CfgMovesBasic {
class RifleStandEvasiveActionsFR: RifleStandActionsNoAdjust {
getOver = "AovrPercMrunSrasWrflDf";
};
// WEAPON LOWERED - RUNNING
class RifleLowStandActionsNoAdjust;
class RifleLowStandActionsRunF: RifleLowStandActionsNoAdjust {
getOver = "AovrPercMrunSrasWrflDf";
};

View File

@ -218,6 +218,7 @@
<English>Option Menu UI Scaling</English>
<French>Menu option: taille de l'UI</French>
<Polish>Skalowanie UI menu ustawień</Polish>
<Spanish>Opción de escalado del menú UI</Spanish>
</Key>
</Package>
</Project>
</Project>

View File

@ -5,7 +5,6 @@ class CfgWeapons {
class ACE_SpareBarrel: ACE_ItemCore {
displayname = "$STR_ACE_Overheating_SpareBarrelName";
descriptionshort = "$STR_ACE_Overheating_SpareBarrelDescription";
//model = "";
picture = QUOTE(PATHTOF(UI\spare_barrel_ca.paa));
scope = 2;
class ItemInfo: InventoryItem_Base_F {

View File

@ -3,7 +3,6 @@ class CfgWeapons {
class ACE_ItemCore;
class ACE_key_master: ACE_ItemCore {
author = "$STR_ACE_Common_ACETeam";
displayName = "Vehicle Key: Master";
descriptionShort = "$STR_ACE_Vehicle_Item_Master_Description";
model = "\A3\weapons_F\ammo\mag_univ.p3d";

View File

@ -293,9 +293,9 @@ def print_yellow(msg):
print(msg)
color("reset")
def copy_important_files(source_dir,destination_dir):
originalDir = os.getcwd()
importantFiles = ["mod.cpp",
"README.md",
@ -303,10 +303,10 @@ def copy_important_files(source_dir,destination_dir):
"LICENSE",
"logo_ace3_ca.paa"
]
print_yellow ("source_dir: " + source_dir)
print_yellow("destination_dir: " + destination_dir)
#copy importantFiles
try:
print_blue("\nSearching for important files in " + source_dir)
@ -316,16 +316,16 @@ def copy_important_files(source_dir,destination_dir):
except:
print_error("COPYING IMPORTANT FILES.")
raise
#copy all extension dlls
try:
os.chdir(os.path.join(source_dir))
print_blue("\nSearching for DLLs in " + os.getcwd())
filenames = glob.glob("*.dll")
if not filenames:
print ("Empty SET")
for dll in filenames:
print_green("Copying dll => " + os.path.join(source_dir,dll))
if os.path.isfile(dll):
@ -339,15 +339,15 @@ def copy_important_files(source_dir,destination_dir):
def copy_optionals_for_building(mod,pbos):
src_directories = os.listdir(optionals_root)
current_dir = os.getcwd()
print("")
print_blue("\nChecking Optionals folder...")
try:
#special server.pbo processing
files = glob.glob(os.path.join(release_dir, "@ace","optionals","*.pbo"))
for file in files:
file_name = os.path.basename(file)
print ("Adding the following file: " + file_name)
#print ("Adding the following file: " + file_name)
pbos.append(file_name)
pbo_path = os.path.join(release_dir, "@ace","optionals",file_name)
if (os.path.isfile(pbo_path)):
@ -364,31 +364,38 @@ def copy_optionals_for_building(mod,pbos):
try:
for dir_name in src_directories:
mod.append(dir_name)
#userconfig requires special handling since it is not a PBO source folder.
#CfgConvert fails to build server.pbo if userconfig is not found in P:\
if (dir_name == "userconfig"):
if (os.path.exists(os.path.join(release_dir, "@ace","optionals",dir_name))):
shutil.rmtree(os.path.join(release_dir, "@ace","optionals",dir_name), True)
shutil.copytree(os.path.join(optionals_root,dir_name), os.path.join(release_dir, "@ace","optionals",dir_name))
destination = os.path.join(work_drive,dir_name)
else:
destination = os.path.join(module_root,dir_name)
print("Temporarily copying " + os.path.join(optionals_root,dir_name) + " => " + destination + " for building.")
shutil.rmtree(destination, True)
if (os.path.exists(destination)):
shutil.rmtree(destination, True)
shutil.copytree(os.path.join(optionals_root,dir_name), destination)
except:
print_error("Copy Optionals Failed")
raise
finally:
os.chdir(current_dir)
def cleanup_optionals(mod,pbos):
print("")
try:
try:
for dir_name in mod:
#userconfig requires special handling since it is not a PBO source folder.
if (dir_name == "userconfig"):
destination = os.path.join(work_drive,dir_name)
else:
destination = os.path.join(module_root,dir_name)
print("Cleaning " + destination)
try:
file_name = "ace_{}.pbo".format(dir_name)
src_file_path = os.path.join(release_dir, "@ace","addons",file_name)
@ -400,7 +407,7 @@ def cleanup_optionals(mod,pbos):
print_error(file_name + " already exists")
continue
shutil.rmtree(destination)
except:
print_error("Cleaning Optionals Failed")
raise
@ -528,7 +535,7 @@ See the make.cfg file for additional build options.
global release_dir
global module_root_parent
global optionals_root
cfg.read(os.path.join(make_root, "make.cfg"))
# Project name (with @ symbol)
@ -562,7 +569,7 @@ See the make.cfg file for additional build options.
# Release/build directory, relative to script dir
release_dir = cfg.get(make_target, "release_dir", fallback="release")
# Project PBO file prefix (files are renamed to prefix_name.pbo)
pbo_name_prefix = cfg.get(make_target, "pbo_name_prefix", fallback=None)
@ -571,7 +578,7 @@ See the make.cfg file for additional build options.
module_root = cfg.get(make_target, "module_root", fallback=os.path.join(make_root_parent, "addons"))
optionals_root = os.path.join(module_root_parent, "optionals")
print_green ("module_root: " + module_root)
if (os.path.isdir(module_root)):
os.chdir(module_root)
else:
@ -583,9 +590,9 @@ See the make.cfg file for additional build options.
else:
print_error ("Directory " + optionals_root + " does not exist.")
sys.exit()
print_green ("release_dir: " + release_dir)
except:
raise
print_error("Could not parse make.cfg.")
@ -633,14 +640,14 @@ See the make.cfg file for additional build options.
print ("No cache found.")
cache = {}
#Temporarily copy optionals_root for building. They will be removed later.
#Temporarily copy optionals_root for building. They will be removed later.
optionals_modules = []
optional_files = []
copy_optionals_for_building(optionals_modules,optional_files)
# Get list of subdirs in make root.
dirs = next(os.walk(module_root))[1]
# Autodetect what directories to build.
if module_autodetect and not arg_modules:
modules = []
@ -681,10 +688,11 @@ See the make.cfg file for additional build options.
# For each module, prep files and then build.
print_blue("\nBuilding...")
for module in modules:
print_green("\nMaking " + module + "-"*max(1, (60-len(module))))
missing = False
# Cache check
if module in cache:
old_sha = cache[module]
@ -697,7 +705,7 @@ See the make.cfg file for additional build options.
# Hash the module
new_sha = get_directory_hash(os.path.join(module_root, module))
# Is the pbo file missing?
missing = not os.path.isfile(os.path.join(release_dir, project, "addons", "ace_{}.pbo".format(module)))
if missing:
@ -781,7 +789,7 @@ See the make.cfg file for additional build options.
print_error("CfgConvert -txt return code == " + str(ret) + ". Usually means there is a syntax error within the config.cpp file.")
os.remove(os.path.join(work_drive, prefix, module, "config.cpp"))
shutil.copyfile(os.path.join(work_drive, prefix, module, "config.backup"), os.path.join(work_drive, prefix, module, "config.cpp"))
# Include build number
try:
@ -799,7 +807,7 @@ See the make.cfg file for additional build options.
f.close()
else:
os.remove(os.path.join(work_drive, prefix, module, "config.cpp"))
os.rename(os.path.join(work_drive, prefix, module, "config.backup"), os.path.join(work_drive, prefix, module, "config.cpp"))
os.rename(os.path.join(work_drive, prefix, module, "config.backup"), os.path.join(work_drive, prefix, module, "config.cpp"))
except:
raise
print_error("Failed to include build number")