diff --git a/addons/aircraft/Heli_Attack_01_base_F.hpp b/addons/aircraft/Heli_Attack_01_base_F.hpp index 22f2da3833..14ca7ef7cd 100644 --- a/addons/aircraft/Heli_Attack_01_base_F.hpp +++ b/addons/aircraft/Heli_Attack_01_base_F.hpp @@ -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"; diff --git a/addons/attach/CfgWeapons.hpp b/addons/attach/CfgWeapons.hpp index 9734ceb273..d2df948718 100644 --- a/addons/attach/CfgWeapons.hpp +++ b/addons/attach/CfgWeapons.hpp @@ -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"; diff --git a/addons/ballistics/CfgVehicles.hpp b/addons/ballistics/CfgVehicles.hpp index 4ea9fc87a2..7ad864a1e4 100644 --- a/addons/ballistics/CfgVehicles.hpp +++ b/addons/ballistics/CfgVehicles.hpp @@ -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); diff --git a/addons/common/CfgWeapons.hpp b/addons/common/CfgWeapons.hpp index cf8c06798e..3e40f360fe 100644 --- a/addons/common/CfgWeapons.hpp +++ b/addons/common/CfgWeapons.hpp @@ -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"; diff --git a/addons/explosives/CfgVehicles.hpp b/addons/explosives/CfgVehicles.hpp index 30e1ff151d..5aa62992fc 100644 --- a/addons/explosives/CfgVehicles.hpp +++ b/addons/explosives/CfgVehicles.hpp @@ -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; diff --git a/addons/grenades/CfgMagazines.hpp b/addons/grenades/CfgMagazines.hpp index 33392f41ee..968b8ed141 100644 --- a/addons/grenades/CfgMagazines.hpp +++ b/addons/grenades/CfgMagazines.hpp @@ -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; }; diff --git a/addons/grenades/functions/fnc_flashbangExplosionEH.sqf b/addons/grenades/functions/fnc_flashbangExplosionEH.sqf index 75e61dab56..67fb2ded9c 100644 --- a/addons/grenades/functions/fnc_flashbangExplosionEH.sqf +++ b/addons/grenades/functions/fnc_flashbangExplosionEH.sqf @@ -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); }; diff --git a/addons/interact_menu/XEH_clientInit.sqf b/addons/interact_menu/XEH_clientInit.sqf index ea4a971563..b8a8fc899b 100644 --- a/addons/interact_menu/XEH_clientInit.sqf +++ b/addons/interact_menu/XEH_clientInit.sqf @@ -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)]; diff --git a/addons/interact_menu/XEH_preInit.sqf b/addons/interact_menu/XEH_preInit.sqf index 747da7083e..65d5dd4305 100644 --- a/addons/interact_menu/XEH_preInit.sqf +++ b/addons/interact_menu/XEH_preInit.sqf @@ -21,6 +21,7 @@ PREP(renderBaseMenu); PREP(renderIcon); PREP(renderMenu); PREP(renderSelector); +PREP(setupTextColors); PREP(splitPath); GVAR(keyDown) = false; diff --git a/addons/interact_menu/config.cpp b/addons/interact_menu/config.cpp index eeff688a1a..433c2388c2 100644 --- a/addons/interact_menu/config.cpp +++ b/addons/interact_menu/config.cpp @@ -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 { diff --git a/addons/interact_menu/functions/fnc_renderIcon.sqf b/addons/interact_menu/functions/fnc_renderIcon.sqf index 3da1777bed..9107b6d998 100644 --- a/addons/interact_menu/functions/fnc_renderIcon.sqf +++ b/addons/interact_menu/functions/fnc_renderIcon.sqf @@ -4,12 +4,11 @@ * * Argument: * 0: Text - * 1: Color + * 1: Icon * 2: 2d position - * 3: ? - * 4: ? - * 5: ? - * 6: Icon + * 3: Color + * 4: Shadow Color + * 5: Icon Color * * 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 ["%4", _icon, _color, _color, _text] + format ["%5", _icon, _iconColor, _textColor, _shadowColor, _text] } else { - format ["
%4", _icon, _color, _color, "ace_breakLine" callExtension _text]; + format ["
%5", _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; diff --git a/addons/interact_menu/functions/fnc_renderMenu.sqf b/addons/interact_menu/functions/fnc_renderMenu.sqf index b46740921e..e80e9d41ab 100644 --- a/addons/interact_menu/functions/fnc_renderMenu.sqf +++ b/addons/interact_menu/functions/fnc_renderMenu.sqf @@ -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); diff --git a/addons/interact_menu/functions/fnc_setupTextColors.sqf b/addons/interact_menu/functions/fnc_setupTextColors.sqf new file mode 100644 index 0000000000..5df9c589da --- /dev/null +++ b/addons/interact_menu/functions/fnc_setupTextColors.sqf @@ -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; +}; diff --git a/addons/interact_menu/stringtable.xml b/addons/interact_menu/stringtable.xml index 0b37f40f5e..55d67788f4 100644 --- a/addons/interact_menu/stringtable.xml +++ b/addons/interact_menu/stringtable.xml @@ -71,5 +71,17 @@ Járműves cselekvések Interazioni con veicoli + + Interaction - Text Max + + + Interaction - Text Min + + + Interaction - Shadow Max + + + Interaction - Shadow Min + - + \ No newline at end of file diff --git a/addons/logistics_wirecutter/CfgWeapons.hpp b/addons/logistics_wirecutter/CfgWeapons.hpp index 648bc3a3f8..5cb2db02c2 100644 --- a/addons/logistics_wirecutter/CfgWeapons.hpp +++ b/addons/logistics_wirecutter/CfgWeapons.hpp @@ -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"; diff --git a/addons/map/functions/fnc_determineMapLight.sqf b/addons/map/functions/fnc_determineMapLight.sqf index a5168bd8a1..441dc8103a 100644 --- a/addons/map/functions/fnc_determineMapLight.sqf +++ b/addons/map/functions/fnc_determineMapLight.sqf @@ -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; }; }; diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index e85283c471..f735de7ebf 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -4,10 +4,12 @@ Litter Simulation Detail Detale zużytych medykamentów + Detalle de simulación de basura 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. 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. + 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. Inject Atropine @@ -1634,4 +1636,4 @@ Aberration chromatique - + \ No newline at end of file diff --git a/addons/microdagr/CfgWeapons.hpp b/addons/microdagr/CfgWeapons.hpp index 73615ea6b6..bf4fc95b5c 100644 --- a/addons/microdagr/CfgWeapons.hpp +++ b/addons/microdagr/CfgWeapons.hpp @@ -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"; diff --git a/addons/missileguidance/CfgVehicles.hpp b/addons/missileguidance/CfgVehicles.hpp index 301795b8d7..bbb1768255 100644 --- a/addons/missileguidance/CfgVehicles.hpp +++ b/addons/missileguidance/CfgVehicles.hpp @@ -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"; }; diff --git a/addons/missileguidance/stringtable.xml b/addons/missileguidance/stringtable.xml index 9311ac2c0b..59a80df0dc 100644 --- a/addons/missileguidance/stringtable.xml +++ b/addons/missileguidance/stringtable.xml @@ -17,6 +17,7 @@ Advanced missile guidance, or AMG, provides multiple enhancements to missile locking and firing. It is also a framework required for missile weapon types. 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. + 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. Hydra-70 DAGR Missile diff --git a/addons/movement/CfgMoves.hpp b/addons/movement/CfgMoves.hpp index 677ad3dc94..bd9519b013 100644 --- a/addons/movement/CfgMoves.hpp +++ b/addons/movement/CfgMoves.hpp @@ -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"; }; diff --git a/addons/optionsmenu/stringtable.xml b/addons/optionsmenu/stringtable.xml index e65087936e..bc8d6dcdec 100644 --- a/addons/optionsmenu/stringtable.xml +++ b/addons/optionsmenu/stringtable.xml @@ -218,6 +218,7 @@ Option Menu UI Scaling Menu option: taille de l'UI Skalowanie UI menu ustawień + Opción de escalado del menú UI - + \ No newline at end of file diff --git a/addons/overheating/CfgWeapons.hpp b/addons/overheating/CfgWeapons.hpp index 12ec43024f..580564e864 100644 --- a/addons/overheating/CfgWeapons.hpp +++ b/addons/overheating/CfgWeapons.hpp @@ -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 { diff --git a/addons/vehiclelock/CfgWeapons.hpp b/addons/vehiclelock/CfgWeapons.hpp index 4b20de15d7..f3d1422a84 100644 --- a/addons/vehiclelock/CfgWeapons.hpp +++ b/addons/vehiclelock/CfgWeapons.hpp @@ -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"; diff --git a/tools/make.py b/tools/make.py index aaaf6501c5..3b7bf9d94e 100644 --- a/tools/make.py +++ b/tools/make.py @@ -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")