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

This commit is contained in:
ulteq 2015-05-10 10:38:12 +02:00
commit 718c38098e
38 changed files with 555 additions and 304 deletions

14
.travis.yml Normal file
View File

@ -0,0 +1,14 @@
branches:
only:
- master
language: python
python:
- "3.4"
before_script:
- pip install pygithub
- pip install pygithub3
script:
- python3 tools/deploy.py
env:
global:
- secure: "KcJQbknBOdC5lA4nFGKPXVRVIGLDXDRzC8XkHuXJCE9pIR/wbxbkvx8fHKcC6SC9eHgzneC3+o4m4+CjIbVvIwDgslRbJ8Y59i90ncONmdoRx1HUYHwuYWVZm9HJFjCsIbrEqhSyyKS+PB3WZVOLbErtNHsgS8f43PTh5Ujg7Vg="

View File

@ -21,7 +21,8 @@ class CfgAISkill {
courage[] = {0,0, 1,0.7}; // {0,0,1,1};
endurance[] = {0,0, 1,0.7}; // {0,0,1,1};
general[] = {0,0, 1,0.9}; // {0,0,1,1};
reloadSpeed[] = {0,0, 1,0.8}; // {0,0,1,1};
// apparently breaks rapid firing in single fire mode for players
//reloadSpeed[] = {0,0, 1,0.8}; // {0,0,1,1};
spotDistance[] = {0,0, 1,0.9}; // {0,0.2,1,0.4};
spotTime[] = {0,0, 1,0.7}; // {0,0,1,0.7};
};

View File

@ -142,6 +142,7 @@ class ATragMX_Display {
name="ATragMX_Display";
idd=-1;
onLoad="uiNamespace setVariable ['ATragMX_Display', (_this select 0)]";
onUnload=QUOTE(_this call FUNC(on_close_dialog));
movingEnable=1;
controlsBackground[]={};
objects[]={};

View File

@ -68,5 +68,6 @@ PREP(update_target_data);
PREP(update_target_selection);
PREP(update_unit_selection);
PREP(update_zero_range);
PREP(on_close_dialog);
ADDON = true;

View File

@ -15,7 +15,7 @@
*/
#include "script_component.hpp"
//if (dialog) exitWith { false };
if (GVAR(active)) exitWith { false };
if (underwater ACE_player) exitWith { false };
if (!("ACE_ATragMX" in (uniformItems ACE_player)) && !("ACE_ATragMX" in (vestItems ACE_player))) exitWith { false };
@ -47,4 +47,6 @@ GVAR(showTargetSpeedAssistTimer) call FUNC(show_target_speed_assist_timer);
lbAdd [6000, _x select 0];
} forEach GVAR(gunList);
GVAR(active) = true;
true

View File

@ -15,6 +15,8 @@
*/
#include "script_component.hpp"
GVAR(active) = false;
GVAR(workingMemory) = +(GVAR(gunList) select 0);
GVAR(scopeUnits) = ["MILs", "TMOA", "SMOA", "Clicks"];

View File

@ -0,0 +1,4 @@
#include "script_component.hpp"
uiNamespace setVariable ['ATragMX_Display', nil];
GVAR(active) = false;

View File

@ -2,7 +2,7 @@
{
// Conditions: canInteract
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
if (GVAR(active)) exitWith {false};
// Statement
[] call FUNC(create_dialog);
false

View File

@ -64,8 +64,6 @@ if (_currentVersion != _previousVersion) then {
profileNamespace setVariable ["ACE_VersionNumberString", _currentVersion];
};
0 spawn COMPILE_FILE(scripts\Version\checkVersionNumber);
// ACE events
"ACEg" addPublicVariableEventHandler { _this call FUNC(_handleNetEvent); };
"ACEc" addPublicVariableEventHandler { _this call FUNC(_handleNetEvent); };
@ -84,6 +82,7 @@ if(!isServer) then {
["SEH_s", FUNC(_handleRequestSyncedEvent)] call FUNC(addEventHandler);
[FUNC(syncedEventPFH), 0.5, []] call cba_fnc_addPerFrameHandler;
call FUNC(checkFiles);
/***************************************************************/
/***************************************************************/
@ -250,14 +249,3 @@ if(isMultiplayer && { time > 0 || isNull player } ) then {
};
}, 0, []] call cba_fnc_addPerFrameHandler;
};
// check dlls
{
if (_x callExtension "version" == "") then {
private "_errorMsg";
_errorMsg = format ["Extension %1.dll not installed.", _x];
diag_log text format ["[ACE] ERROR: %1", _errorMsg];
["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
};
} forEach getArray (configFile >> "ACE_Extensions" >> "extensions");

View File

@ -21,6 +21,7 @@ PREP(canInteract);
PREP(canInteractWith);
PREP(canUseWeapon);
PREP(changeProjectileDirection);
PREP(checkFiles);
PREP(checkPBOs);
PREP(claim);
PREP(closeDialogIfTargetMoves);

View File

@ -0,0 +1,85 @@
/*
* Author: commy2
*
* Compares version numbers of PBOs and DLLs.
*
* Argument:
* None.
*
* Return value:
* None.
*/
#include "script_component.hpp"
///////////////
// check addons
///////////////
private "_version";
_version = getText (configFile >> "CfgPatches" >> "ace_main" >> "versionStr");
diag_log text format ["[ACE]: ACE is version %1.", _version];
private "_addons";
_addons = activatedAddons;
_addons = [_addons, {_this find "ace_" == 0}] call FUNC(filter);
{
if (getText (configFile >> "CfgPatches" >> _x >> "versionStr") != _version) then {
private "_errorMsg";
_errorMsg = format ["File %1.pbo is outdated.", _x];
diag_log text format ["[ACE] ERROR: %1", _errorMsg];
if (hasInterface) then {
["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
};
};
} forEach _addons;
///////////////
// check dlls
///////////////
{
if (_x callExtension "version" == "") then {
private "_errorMsg";
_errorMsg = format ["Extension %1.dll not installed.", _x];
diag_log text format ["[ACE] ERROR: %1", _errorMsg];
if (hasInterface) then {
["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
};
};
} forEach getArray (configFile >> "ACE_Extensions" >> "extensions");
///////////////
// check server version
///////////////
if (isMultiplayer) then {
if (isServer) then {
// send servers version of ACE to all clients
GVAR(ServerVersion) = _version;
publicVariable QGVAR(ServerVersion);
} else {
// clients have to wait for the variable
[{
if (isNil QGVAR(ServerVersion)) exitWith {};
private "_version";
_version = _this select 0;
if (_version != GVAR(ServerVersion)) then {
private "_errorMsg";
_errorMsg = format ["Client/Server Version Mismatch. Server: %1, Client: %2.", GVAR(ServerVersion), _version];
diag_log text format ["[ACE] ERROR: %1", _errorMsg];
if (hasInterface) then {diag_log str "1";
["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
};
};
[_this select 1] call CBA_fnc_removePerFrameHandler;
}, 1, _version] call CBA_fnc_addPerFrameHandler;
};
};

View File

@ -25,11 +25,11 @@ _checkAll = _this select 1;
_whitelist = _this select 2;
if (isNil "_checkAll") then {
_checkAll = false;
_checkAll = false;
};
if (isNil "_whitelist") then {
_whitelist = "[]";
_whitelist = "[]";
};
_logic = "Logic" createVehicleLocal [0,0,0];

View File

@ -15,6 +15,21 @@
disableSerialization;
endLoadingScreen;
// no message without player possible
if (!hasInterface) exitWith {};
// wait for display
if (isNull (call BIS_fnc_displayMission)) exitWith {
[{
if (isNull (call BIS_fnc_displayMission)) exitWith {};
(_this select 0) call FUNC(errorMessage);
[_this select 1] call CBA_fnc_removePerFrameHandler;
}, 1, _this] call CBA_fnc_addPerFrameHandler;
};
private ["_textHeader", "_textMessage", "_onOK", "_onCancel"];
_textHeader = _this select 0;

View File

@ -22,7 +22,7 @@ _checkAll = _logic getVariable ["CheckAll", false];
_whitelist = call compile (_logic getVariable ["Whitelist", "[]"]);
if (isNil "_whitelist") then {
_whitelist = [];
_whitelist = [];
};
_whitelist = [_whitelist, {toLower _this}] call FUNC(map);
@ -31,67 +31,71 @@ ACE_Version_CheckAll = _checkAll;
ACE_Version_Whitelist = _whitelist;
if (!isServer) then {
[_mode, _checkAll, _whitelist] spawn {
_mode = _this select 0;
_checkAll = _this select 1;
_whitelist = _this select 2;
[_mode, _checkAll, _whitelist] spawn {
_mode = _this select 0;
_checkAll = _this select 1;
_whitelist = _this select 2;
waitUntil {
sleep 1;
!isNil "ACE_Version_ClientErrors"
waitUntil {
sleep 1;
!isNil "ACE_Version_ClientErrors"
};
_missingAddon = ACE_Version_ClientErrors select 0;
_missingAddonServer = ACE_Version_ClientErrors select 1;
_oldVersionClient = ACE_Version_ClientErrors select 2;
_oldVersionServer = ACE_Version_ClientErrors select 3;
// Display error message.
if (_missingAddon || {_missingAddonServer} || {_oldVersionClient} || {_oldVersionServer}) then {
_text = "[ACE] Version mismatch:<br/><br/>";
_error = format ["ACE version mismatch: %1: ", profileName];
if (_missingAddon) then {
_text = _text + "Detected missing addon on client<br/>";
_error = _error + "Missing file(s); ";
};
if (_missingAddonServer) then {
_text = _text + "Detected missing addon on server<br/>";
_error = _error + "Additional file(s); ";
};
if (_oldVersionClient) then {
_text = _text + "Detected old client version<br/>";
_error = _error + "Older version; ";
};
if (_oldVersionServer) then {
_text = _text + "Detected old server version<br/>";
_error = _error + "Newer version; ";
};
//[_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
diag_log text _error;
_text = composeText [lineBreak, parseText format ["<t align='center'>%1</t>", _text]];
_rscLayer = "ACE_RscErrorHint" call BIS_fnc_rscLayer;
_rscLayer cutRsc ["ACE_RscErrorHint", "PLAIN", 0, true];
disableSerialization;
_ctrlHint = uiNamespace getVariable "ACE_ctrlErrorHint";
_ctrlHint ctrlSetStructuredText _text;
if (_mode == 0) then {
sleep 10;
_rscLayer cutFadeOut 0.2;
};
if (_mode == 2) then {
sleep 10;
waitUntil {alive player};
[player] call FUNC(adminKick);
};
};
};
_missingAddon = ACE_Version_ClientErrors select 0;
_missingAddonServer = ACE_Version_ClientErrors select 1;
_oldVersionClient = ACE_Version_ClientErrors select 2;
_oldVersionServer = ACE_Version_ClientErrors select 3;
// Display error message.
if (_missingAddon || {_missingAddonServer} || {_oldVersionClient} || {_oldVersionServer}) then {
_text = "[ACE] Version mismatch:<br/><br/>";
_error = format ["ACE version mismatch: %1: ", profileName];
if (_missingAddon) then {
_text = _text + "Detected missing addon on client<br/>";
_error = _error + "Missing file(s); ";
};
if (_missingAddonServer) then {
_text = _text + "Detected missing addon on server<br/>";
_error = _error + "Additional file(s); ";
};
if (_oldVersionClient) then {
_text = _text + "Detected old client version<br/>";
_error = _error + "Older version; ";
};
if (_oldVersionServer) then {
_text = _text + "Detected old server version<br/>";
_error = _error + "Newer version; ";
};
//[_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
diag_log text _error;
_text = composeText [lineBreak, parseText format ["<t align='center'>%1</t>", _text]];
_rscLayer = "ACE_RscErrorHint" call BIS_fnc_rscLayer;
_rscLayer cutRsc ["ACE_RscErrorHint", "PLAIN", 0, true];
disableSerialization;
_ctrlHint = uiNamespace getVariable "ACE_ctrlErrorHint";
_ctrlHint ctrlSetStructuredText _text;
if (_mode == 0) then {
sleep 10;
_rscLayer cutFadeOut 0.2;
};
if (_mode == 2) then {
sleep 10;
waitUntil {alive player};
[player] call FUNC(adminKick);
};
};
};
};
diag_log text format ["[ACE]: Check-PBOs Module Initialized. Mode: %1.", _mode];
if (_checkAll) then {
0 spawn COMPILE_FILE(scripts\Version\checkVersionNumber);
};

View File

@ -1,193 +1,156 @@
// by commy2
#include "script_component.hpp"
sleep 1; //wait for module
_files = [];
if (missionNamespace getVariable ["ACE_Version_CheckAll", false]) then {
{
if (toLower _x find "a3_" != 0 && {!(toLower _x in (missionNamespace getVariable ["ACE_Version_Whitelist", []]))}) then {
_files pushBack _x;
{
if (_x find "a3_" != 0 && {_x find "ace_" != 0} && {!(toLower _x in (missionNamespace getVariable ["ACE_Version_Whitelist", []]))}) then {
_files pushBack _x;
};
} forEach activatedAddons;
} else {
{
if (toLower _x find "ace_" == 0) then {
_files pushBack _x;
};
} forEach activatedAddons;
};
_versionMain = parseNumber getText (configFile >> "CfgPatches" >> QUOTE(ADDON) >> "version");
} forEach activatedAddons;
_versions = [];
{
_version = parseNumber getText (configFile >> "CfgPatches" >> _x >> "version");
_versions set [_forEachIndex, _version];
_version = parseNumber getText (configFile >> "CfgPatches" >> _x >> "version");
_versions set [_forEachIndex, _version];
} forEach _files;
_versionFull = getText (configFile >> "CfgPatches" >> QUOTE(ADDON) >> "versionStr");
diag_log text format ["[ACE] Full Version Number: %1", _versionFull];
if (isServer) then {
diag_log text format ["[ACE] Server: ACE_Common is Version %1.", _versionMain];
{
if (toLower _x find "ace_" == 0) then {//
_version = _versions select _forEachIndex;
if (_version != _versionMain) then {
diag_log text format ["[ACE] Server: %1 is Version %2.", _x, _version];
};
};
} forEach _files;
ACE_Version_ServerVersions = [_files, _versions];
publicVariable "ACE_Version_ServerVersions";
ACE_Version_ServerVersions = [_files, _versions];
publicVariable "ACE_Version_ServerVersions";
} else {
diag_log text format ["[ACE] Client: ACE_Common is Version %1.", _versionMain];
{
if (toLower _x find "ace_" == 0) then {//
_version = _versions select _forEachIndex;
if (_version != _versionMain) then {
diag_log text format ["[ACE] Client: %1 is Version %2.", _x, _version];
};
};
} forEach _files;
ACE_Version_ClientVersions = [_files, _versions];
ACE_Version_ClientVersions = [_files, _versions];
};
// Begin client version check
if (!isServer) then {
// Wait for server to send the servers files and version numbers
waitUntil {
sleep 1;
!isNil "ACE_Version_ClientVersions" && {!isNil "ACE_Version_ServerVersions"}
};
_client = profileName;
_files = ACE_Version_ClientVersions select 0;
_versions = ACE_Version_ClientVersions select 1;
_serverFiles = ACE_Version_ServerVersions select 0;
_serverVersions = ACE_Version_ServerVersions select 1;
// Compare client and server files and versions
_missingAddons = [];
_oldVersionsClient = [];
_oldVersionsServer = [];
{
_serverVersion = _serverVersions select _forEachIndex;
_index = _files find _x;
if (_index == -1) then {
if (_x != "ace_serverconfig") then {_missingAddons pushBack _x;};
} else {
_clientVersion = _versions select _index;
if (_clientVersion < _serverVersion) then {
_oldVersionsClient pushBack [_x, _clientVersion, _serverVersion];
};
if (_clientVersion > _serverVersion) then {
_oldVersionsServer pushBack [_x, _clientVersion, _serverVersion];
};
// Wait for server to send the servers files and version numbers
waitUntil {
sleep 1;
!isNil "ACE_Version_ClientVersions" && {!isNil "ACE_Version_ServerVersions"}
};
} forEach _serverFiles;
// find client files which the server doesn't have
_missingAddonsServer = [];
{
_index = _serverFiles find _x;
if (_index == -1) then {
_missingAddonsServer pushBack _x;
}
} forEach _files;
_client = profileName;
// display and log error messages
_fnc_cutComma = {
_string = _this;
_string = toArray _string;
_files = ACE_Version_ClientVersions select 0;
_versions = ACE_Version_ClientVersions select 1;
_count = count _string;
_string set [_count - 2, toArray "." select 0];
_string set [_count - 1, -1];
_string = _string - [-1];
_serverFiles = ACE_Version_ServerVersions select 0;
_serverVersions = ACE_Version_ServerVersions select 1;
toString _string;
};
_missingAddon = false;
if (count _missingAddons > 0) then {
_missingAddon = true;
_error = format ["[ACE] %1: ERROR missing addon(s): ", _client];
// Compare client and server files and versions
_missingAddons = [];
_oldVersionsClient = [];
_oldVersionsServer = [];
{
_error = _error + format ["%1, ", _x];
_serverVersion = _serverVersions select _forEachIndex;
if (_forEachIndex > 9) exitWith {};//
} forEach _missingAddons;
_index = _files find _x;
if (_index == -1) then {
if (_x != "ace_serverconfig") then {_missingAddons pushBack _x;};
} else {
_error = _error call _fnc_cutComma;
_clientVersion = _versions select _index;
diag_log text _error;
[_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
};
if (_clientVersion < _serverVersion) then {
_oldVersionsClient pushBack [_x, _clientVersion, _serverVersion];
};
_missingAddonServer = false;
if (count _missingAddonsServer > 0) then {
_missingAddonServer = true;
if (_clientVersion > _serverVersion) then {
_oldVersionsServer pushBack [_x, _clientVersion, _serverVersion];
};
};
} forEach _serverFiles;
_error = format ["[ACE] %1: ERROR missing server addon(s): ", _client];
// find client files which the server doesn't have
_missingAddonsServer = [];
{
_error = _error + format ["%1, ", _x];
_index = _serverFiles find _x;
if (_index == -1) then {
_missingAddonsServer pushBack _x;
}
} forEach _files;
if (_forEachIndex > 9) exitWith {};//
} forEach _missingAddonsServer;
// display and log error messages
_fnc_cutComma = {
_string = _this;
_string = toArray _string;
_error = _error call _fnc_cutComma;
_count = count _string;
_string set [_count - 2, toArray "." select 0];
_string set [_count - 1, -1];
_string = _string - [-1];
diag_log text _error;
[_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
};
toString _string;
};
_oldVersionClient = false;
if (count _oldVersionsClient > 0) then {
_oldVersionClient = true;
_missingAddon = false;
if (count _missingAddons > 0) then {
_missingAddon = true;
_error = format ["[ACE] %1: ERROR outdated addon(s): ", _client];
{
_error = _error + format ["%1 (client: %2, server: %3), ", _x select 0, _x select 1, _x select 2];
_error = format ["[ACE] %1: ERROR missing addon(s): ", _client];
{
_error = _error + format ["%1, ", _x];
if (_forEachIndex > 9) exitWith {};//
} forEach _oldVersionsClient;
if (_forEachIndex > 9) exitWith {};//
} forEach _missingAddons;
_error = _error call _fnc_cutComma;
_error = _error call _fnc_cutComma;
diag_log text _error;
[_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
};
diag_log text _error;
[_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
};
_oldVersionServer = false;
if (count _oldVersionsServer > 0) then {
_oldVersionServer = true;
_missingAddonServer = false;
if (count _missingAddonsServer > 0) then {
_missingAddonServer = true;
_error = format ["[ACE] %1: ERROR outdated server addon(s): ", _client];
{
_error = _error + format ["%1 (client: %2, server: %3), ", _x select 0, _x select 1, _x select 2];
_error = format ["[ACE] %1: ERROR missing server addon(s): ", _client];
{
_error = _error + format ["%1, ", _x];
if (_forEachIndex > 9) exitWith {};//
} forEach _oldVersionsServer;
if (_forEachIndex > 9) exitWith {};//
} forEach _missingAddonsServer;
_error = _error call _fnc_cutComma;
_error = _error call _fnc_cutComma;
diag_log text _error;
[_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
};
diag_log text _error;
[_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
};
ACE_Version_ClientErrors = [_missingAddon, _missingAddonServer, _oldVersionClient, _oldVersionServer];
_oldVersionClient = false;
if (count _oldVersionsClient > 0) then {
_oldVersionClient = true;
_error = format ["[ACE] %1: ERROR outdated addon(s): ", _client];
{
_error = _error + format ["%1 (client: %2, server: %3), ", _x select 0, _x select 1, _x select 2];
if (_forEachIndex > 9) exitWith {};//
} forEach _oldVersionsClient;
_error = _error call _fnc_cutComma;
diag_log text _error;
[_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
};
_oldVersionServer = false;
if (count _oldVersionsServer > 0) then {
_oldVersionServer = true;
_error = format ["[ACE] %1: ERROR outdated server addon(s): ", _client];
{
_error = _error + format ["%1 (client: %2, server: %3), ", _x select 0, _x select 1, _x select 2];
if (_forEachIndex > 9) exitWith {};//
} forEach _oldVersionsServer;
_error = _error call _fnc_cutComma;
diag_log text _error;
[_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
};
ACE_Version_ClientErrors = [_missingAddon, _missingAddonServer, _oldVersionClient, _oldVersionServer];
};

View File

@ -10,6 +10,8 @@ class CfgAmmo {
//};
class Bo_GBU12_LGB;
class ACE_GBU12 : Bo_GBU12_LGB {
GVAR(enabled) = 1;
GVAR(classes)[] = {"ACE_frag_large", "ACE_frag_large", "ACE_frag_large_HD", "ACE_frag_large", "ACE_frag_huge", "ACE_frag_huge_HD", "ACE_frag_huge"};
GVAR(metal) = 140000;
GVAR(charge) = 87000;
@ -23,6 +25,8 @@ class CfgAmmo {
class GrenadeBase;
class Grenade;
class GrenadeHand: Grenade {
GVAR(enabled) = 1;
GVAR(skip) = 0;
GVAR(force) = 1;
// This is a good high-drag frag type for grenades.
@ -46,6 +50,8 @@ class CfgAmmo {
class RocketBase;
class R_Hydra_HE: RocketBase {
// Source: http://fas.org/man/dod-101/sys/missile/hydra-70.htm
GVAR(enabled) = 1;
GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
GVAR(metal) = 3850;
GVAR(charge) = 1040;
@ -66,6 +72,8 @@ class CfgAmmo {
class BombCore;
class Bo_Mk82: BombCore {
GVAR(enabled) = 1;
GVAR(classes)[] = {"ACE_frag_large", "ACE_frag_large", "ACE_frag_large_HD", "ACE_frag_large", "ACE_frag_huge", "ACE_frag_huge_HD", "ACE_frag_huge"};
GVAR(metal) = 140000;
GVAR(charge) = 87000;
@ -75,6 +83,8 @@ class CfgAmmo {
class G_40mm_HE: GrenadeBase {
// Source: http://www.inetres.com/gp/military/infantry/grenade/40mm_ammo.html#M441
GVAR(enabled) = 1;
GVAR(classes)[] = {"ACE_frag_tiny_HD"};
GVAR(metal) = 200;
GVAR(charge) = 32;
@ -83,6 +93,8 @@ class CfgAmmo {
};
class G_40mm_HEDP: G_40mm_HE {
// Source: http://www.inetres.com/gp/military/infantry/grenade/40mm_ammo.html#M433
GVAR(enabled) = 1;
GVAR(classes)[] = {"ACE_frag_tiny_HD"};
GVAR(metal) = 200;
GVAR(charge) = 45;
@ -107,6 +119,8 @@ class CfgAmmo {
class Sh_125mm_HEAT;
class Sh_155mm_AMOS: ShellBase {
// Source: http://www.globalsecurity.org/military/systems/munitions/m795.htm
GVAR(enabled) = 1;
GVAR(classes)[] = {"ACE_frag_large", "ACE_frag_large", "ACE_frag_large_HD", "ACE_frag_large", "ACE_frag_huge", "ACE_frag_huge_HD", "ACE_frag_huge"};
GVAR(metal) = 36000;
GVAR(charge) = 9979;
@ -115,6 +129,8 @@ class CfgAmmo {
};
class Sh_82mm_AMOS : Sh_155mm_AMOS {
// Source: http://www.arsenal-bg.com/defense_police/mortar_bombs_82mm.htm
GVAR(enabled) = 1;
GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
GVAR(metal) = 3200;
GVAR(charge) = 420;
@ -122,6 +138,8 @@ class CfgAmmo {
GVAR(gurney_k) = 1/2;
};
class ModuleOrdnanceMortar_F_Ammo: Sh_82mm_AMOS {
GVAR(enabled) = 1;
GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
GVAR(metal) = 800;
GVAR(charge) = 4200;
@ -129,6 +147,8 @@ class CfgAmmo {
GVAR(gurney_k) = 1/2;
};
class Sh_105mm_HEAT_MP : Sh_125mm_HEAT {
GVAR(enabled) = 1;
GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
GVAR(metal) = 11400;
GVAR(charge) = 7100;
@ -136,6 +156,8 @@ class CfgAmmo {
GVAR(gurney_k) = 1/2;
};
class Sh_120mm_HE : ShellBase {
GVAR(enabled) = 1;
GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
GVAR(metal) = 23000;
GVAR(charge) = 3148;
@ -143,6 +165,8 @@ class CfgAmmo {
GVAR(gurney_k) = 1/2;
};
class Sh_125mm_HE: Sh_120mm_HE {
GVAR(enabled) = 1;
GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
GVAR(metal) = 16000;
GVAR(charge) = 3200;
@ -150,6 +174,8 @@ class CfgAmmo {
GVAR(gurney_k) = 1/2;
};
class ModuleOrdnanceHowitzer_F_ammo: Sh_155mm_AMOS {
GVAR(enabled) = 1;
GVAR(classes)[] = {"ACE_frag_large", "ACE_frag_large", "ACE_frag_large_HD", "ACE_frag_large", "ACE_frag_huge", "ACE_frag_huge_HD", "ACE_frag_huge"};
GVAR(metal) = 1950;
GVAR(charge) = 15800;
@ -175,6 +201,8 @@ class CfgAmmo {
class MissileBase;
class Missile_AGM_02_F : MissileBase {
// Source: http://fas.org/man/dod-101/sys/smart/agm-65.htm
GVAR(enabled) = 1;
GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
GVAR(metal) = 56250;
GVAR(charge) = 39000;
@ -183,6 +211,8 @@ class CfgAmmo {
};
class M_Hellfire_AT: MissileBase {
// Source: http://www.designation-systems.net/dusrm/m-114.html
GVAR(enabled) = 1;
GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
GVAR(metal) = 8000;
GVAR(charge) = 2400;

View File

@ -1,6 +1,6 @@
#include "script_component.hpp"
private ["_gun", "_type", "_round", "_doFragTrack", "_doSpall", "_spallTrack", "_spallTrackID"];
private ["_enabled", "_gun", "_type", "_round", "_doFragTrack", "_doSpall", "_spallTrack", "_spallTrackID"];
if (!GVAR(enabled)) exitWith {};
@ -8,10 +8,14 @@ _gun = _this select 0;
_type = _this select 4;
_round = _this select 6;
_enabled = getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(enabled));
if(_enabled < 1) exitWith {};
if(_round in GVAR(blackList)) exitWith {
GVAR(blackList) = GVAR(blackList) - [_round];
};
_doFragTrack = false;
if(_gun == ACE_player) then {
_doFragTrack = true;

View File

@ -54,6 +54,7 @@ class Kestrel4500_Display
name="Kestrel4500_Display";
idd=-1;
onLoad="uiNamespace setVariable ['Kestrel4500_Display', (_this select 0)]";
onUnload=QUOTE(_this call FUNC(onCloseDialog));
movingEnable=1;
controlsBackground[]={};
objects[]={};
@ -217,6 +218,7 @@ class RscTitles
{
idd=-1;
onLoad="with uiNameSpace do { RscKestrel4500 = _this select 0 };";
onUnload=(_this call FUNC(onCloseDisplay));
movingEnable=0;
duration=60;
fadeIn="false";

View File

@ -22,4 +22,4 @@ GVAR(MeasuredWindSpeed) = 0;
GVAR(ImpellerState) = 0;
GVAR(Kestrel4500) = false;
GVAR(Overlay) = false;
GVAR(Overlay) = false;

View File

@ -13,4 +13,7 @@ PREP(measureWindSpeed);
PREP(updateDisplay);
PREP(updateImpellerState);
PREP(onCloseDialog);
PREP(onCloseDisplay);
ADDON = true;

View File

@ -14,7 +14,7 @@
*/
#include "script_component.hpp"
//if (dialog) exitWith { false };
if (GVAR(Kestrel4500)) exitWith { false };
if (underwater ACE_player) exitWith { false };
if (!("ACE_Kestrel4500" in (uniformItems ACE_player)) && !("ACE_Kestrel4500" in (vestItems ACE_player))) exitWith { false };

View File

@ -0,0 +1,4 @@
#include "script_component.hpp"
uiNamespace setVariable ['Kestrel4500_Display', nil];
GVAR(Kestrel4500) = false;

View File

@ -0,0 +1,4 @@
#include "script_component.hpp"
uiNamespace setVariable ['RscKestrel4500', nil];
GVAR(Overlay) = false;

View File

@ -2,7 +2,8 @@
{
// Conditions: canInteract
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
if(GVAR(Kestrel4500)) exitWith { false };
// Statement
[] call FUNC(createKestrelDialog);
false
@ -14,7 +15,7 @@
{
// Conditions: canInteract
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
// Statement
[] call FUNC(displayKestrel);
false

View File

@ -6,7 +6,7 @@ class CfgPatches {
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_laser"};
version = VERSION;
VERSION_CONFIG;
};
};

View File

@ -29,11 +29,17 @@ _pointer = switch (_weapon) do {
if (_pointer == "") exitWith {};
private "_config";
_config = configFile >> "CfgWeapons" >> _pointer;
private "_nextPointer";
_nextPointer = getText (configFile >> "CfgWeapons" >> _pointer >> "ACE_nextModeClass");
_nextPointer = getText (_config >> "ACE_nextModeClass");
if (_nextPointer == "") exitWith {};
// disable inheritance for this entry, because addons claim this as a base class for convenience
if !((_config >> "ACE_nextModeClass") in configProperties [_config, "true", false]) exitWith {};
private ["_description", "_picture"];
_description = getText (configFile >> "CfgWeapons" >> _nextPointer >> "ACE_modeDescription");

View File

@ -2,8 +2,6 @@
#include "script_component.hpp"
GVAR(enabledFor) = 1; // TODO remove this once we implement settings. Just here to get the vitals working.
GVAR(heartBeatSounds_Fast) = ["ACE_heartbeat_fast_1", "ACE_heartbeat_fast_2", "ACE_heartbeat_fast_3"];
GVAR(heartBeatSounds_Normal) = ["ACE_heartbeat_norm_1", "ACE_heartbeat_norm_2"];
GVAR(heartBeatSounds_Slow) = ["ACE_heartbeat_slow_1", "ACE_heartbeat_slow_2"];

View File

@ -15,7 +15,7 @@ _unit = _this select 0;
_medicalEnabled = _unit getvariable QGVAR(enableMedical);
if (isnil "_medicalEnabled") exitwith {
(((GVAR(enabledFor) == 0 && (isPlayer _unit || (_unit getvariable [QEGVAR(common,isDeadPlayer), false])))) || (GVAR(enabledFor) == 1));
(((GVAR(enableFor) == 0 && (isPlayer _unit || (_unit getvariable [QEGVAR(common,isDeadPlayer), false])))) || (GVAR(enableFor) == 1));
};
_medicalEnabled;

View File

@ -26,39 +26,39 @@ _activated = [_this,2,true,[true]] call BIS_fnc_param;
// We only play this on the locality of the logic, since the sounds are broadcasted across the network
if (_activated && local _logic) then {
_ambianceSounds = [];
_unparsedSounds = _logic getvariable ["soundFiles", ""];
_minimalDistance = (_logic getvariable ["minimalDistance", 400]) max 1;
_maximalDistance = (_logic getvariable ["maximalDistance", 10]) max _minimalDistance;
_minDelayBetweensounds = (_logic getvariable ["minimalDelay", 10]) max 1;
_maxDelayBetweenSounds = (_logic getvariable ["maximalDelay", 170]) max _minDelayBetweensounds;
_volume = (_logic getvariable ["soundVolume", 30]) max 1;
_followPlayers = _logic getvariable ["followPlayers", false];
_unparsedSounds = _logic getVariable ["soundFiles", ""];
_minimalDistance = (_logic getVariable ["minimalDistance", 400]) max 1;
_maximalDistance = (_logic getVariable ["maximalDistance", 10]) max _minimalDistance;
_minDelayBetweensounds = (_logic getVariable ["minimalDelay", 10]) max 1;
_maxDelayBetweenSounds = (_logic getVariable ["maximalDelay", 170]) max _minDelayBetweensounds;
_volume = (_logic getVariable ["soundVolume", 30]) max 1;
_followPlayers = _logic getVariable ["followPlayers", false];
_splittedList = [_unparsedSounds, ","] call BIS_fnc_splitString;
_nilCheckPassedList = "";
{
_x = [_x] call EFUNC(common,string_removeWhiteSpace);
_splittedList set [_foreachIndex, _x];
}foreach _splittedList;
_x = [_x] call EFUNC(common,stringRemoveWhiteSpace);
_splittedList set [_forEachIndex, _x];
}forEach _splittedList;
_soundPath = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString;
{
if (isclass (missionConfigFile >> "CfgSounds" >> _x)) then {
_ambianceSounds pushback (_soundPath + (getArray(missionConfigFile >> "CfgSounds" >> _x >> "sound") select 0));
if (isClass (missionConfigFile >> "CfgSounds" >> _x)) then {
_ambianceSounds pushBack (_soundPath + (getArray(missionConfigFile >> "CfgSounds" >> _x >> "sound") select 0));
} else {
if (isclass (configFile >> "CfgSounds" >> _x)) then {
_ambianceSounds pushback ((getArray(configFile >> "CfgSounds" >> _x >> "sound") select 0));
if (isClass (configFile >> "CfgSounds" >> _x)) then {
_ambianceSounds pushBack ((getArray(configFile >> "CfgSounds" >> _x >> "sound") select 0));
};
};
}foreach _splittedList;
}forEach _splittedList;
if (count _ambianceSounds == 0) exitwith {};
if (count _ambianceSounds == 0) exitWith {};
{
if !([".", _x, true] call BIS_fnc_inString) then {
_ambianceSounds set [_foreachIndex, _x + ".wss"];
_ambianceSounds set [_forEachIndex, _x + ".wss"];
};
}foreach _ambianceSounds;
}forEach _ambianceSounds;
[{
private ["_args", "_logic", "_ambianceSounds", "_minimalDistance", "_maximalDistance", "_minDelayBetweensounds", "_maxDelayBetweenSounds", "_volume", "_followPlayers","_lastTimePlayed", "_newPos"];
@ -68,7 +68,7 @@ if (_activated && local _logic) then {
_maxDelayBetweenSounds = _args select 5;
_lastTimePlayed = _args select 8;
if (!alive _logic) exitwith {
if (!alive _logic) exitWith {
[(_this select 1)] call cba_fnc_removePerFrameHandler;
};

View File

@ -10,10 +10,10 @@ class Extended_PostInit_EventHandlers {
};
};
class Extended_Fired_EventHandlers {
class Extended_FiredBIS_EventHandlers {
class CAManBase {
class ADDON {
fired = QUOTE(_this call FUNC(firedEH););
firedBIS = QUOTE(_this call FUNC(firedEH););
};
};
};

View File

@ -3,12 +3,13 @@
* Adjusts the flight path of the bullet according to the zeroing
*
* Argument:
* 0: Unit <OBJECT>
* 1: Weapon <STRING>
* 3: Muzzle <STRING>
* 4: Magazine <STRING>
* 5: Ammo <STRING>
* 6: Projectile <OBJECT>
* 0: unit - Object the event handler is assigned to <OBJECT>
* 1: weapon - Fired weapon <STRING>
* 2: muzzle - Muzzle that was used <STRING>
* 3: mode - Current mode of the fired weapon <STRING>
* 4: ammo - Ammo used <STRING>
* 5: magazine - magazine name which was used <STRING>
* 6: projectile - Object of the projectile that was shot <OBJECT>
*
* Return value:
* None
@ -17,26 +18,23 @@
*/
#include "script_component.hpp"
private ["_unit", "_adjustment", "_weapon", "_projectile", "_weaponIndex", "_zeroing", "_adjustment"];
private ["_unit", "_adjustment", "_projectile", "_weaponIndex", "_zeroing", "_adjustment"];
_unit = _this select 0;
_projectile = _this select 6;
// Exit if the unit doesn't have any adjusment variable
_adjustment = _unit getVariable QGVAR(Adjustment);
if (isNil "_adjustment") exitWith {};
// Exit if the unit isn't a player
if !([_unit] call EFUNC(common,isPlayer)) exitWith {};
_weapon = _this select 1;
_projectile = _this select 5;
_adjustment = _unit getVariable [QGVAR(Adjustment), []];
if (_adjustment isEqualTo []) exitWith {};
_weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex);
if (_weaponIndex < 0) exitWith {};
_zeroing = _adjustment select _weaponIndex;
if (_zeroing isEqualTo [0,0,0]) exitWith {};
// Convert zeroing from mils to degrees
_zeroing = [_zeroing, {_this * 0.05625}] call EFUNC(common,map);
_zeroing = _zeroing vectorMultiply 0.05625;
[_projectile, (_zeroing select 1), (_zeroing select 0) + (_zeroing select 2), 0] call EFUNC(common,changeProjectileDirection);

View File

@ -103,7 +103,7 @@ if (toLower worldName in ["takistan", "zargabad", "mountains_acr", "shapur_baf",
GVAR(Humidity) = [68, 69, 62, 60, 49, 37, 38, 39, 40, 41, 56, 61];
// Source: https://weatherspark.com/averages/32750/Kabul-Afghanistan
GVAR(WindSpeedMax) = [[4.0, 1.0], [4.1, 1.0], [5.1, 1.1], [6.9, 1.2], [8.9, 1.2], [10.0, 1.1], 0, [8.2, 1.0], [6.9, 1.0], [5.2, 1.0], [3.8, 0.9], [3.7, 0.9]];
GVAR(WindSpeedMax) = [[4.0, 1.0], [4.1, 1.0], [5.1, 1.1], [6.9, 1.2], [8.9, 1.2], [10.0, 1.1], [9.1,1.0], [8.2, 1.0], [6.9, 1.0], [5.2, 1.0], [3.8, 0.9], [3.7, 0.9]];
GVAR(WindSpeedMean) = [2.2, 2.2, 2.5, 2.8, 3.8, 4.4, 0, 3.3, 2.7, 2.4, 1.8, 1.9];
GVAR(WindSpeedMin) = [[0.2, 0.4], [0.2, 0.4], [0.2, 0.4], [0.3, 0.4], [0.6, 0.4], [0.9, 0.4], [0.7, 0.4], [0.5, 0.4], [0.2, 0.5], [0.1, 0.1], [0, 0.1], [0, 0.1]];
GVAR(WindDirectionProbabilities) = [[0.04, 0.02, 0.05, 0.04, 0.05, 0.04, 0.11, 0.29], // January

View File

@ -13,11 +13,16 @@
if (!GVAR(syncWind)) exitWith { ACE_wind = wind };
private ["_newWaves"];
ACE_wind = [] call FUNC(getWind);
setWind [ACE_wind select 0, ACE_wind select 1, true];
2 setGusts 0;
// Set waves: 0 when no wind, 1 when wind >= 16 m/s
1 setWaves (((vectorMagnitude ACE_wind) / 16.0) min 1.0);
_newWaves = ((vectorMagnitude ACE_wind) / 16.0) min 1.0;
if (abs(_newWaves - waves) > 0.1) then {
1 setWaves _newWaves;
};
TRACE_3("Wind/ACE_wind/Deviation(m/s)",wind,ACE_wind,Round((vectorMagnitude (ACE_wind vectorDiff wind)) * 1000) / 1000);

View File

@ -7,9 +7,9 @@ class CfgPatches {
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_weather"};
versionDesc = "ACE Wind Deflection";
version = VERSION;
author[] = {$STR_ACE_Common_ACETeam, "Glowbal", "Ruthberg"};
authorUrl = "http://csemod.com";
VERSION_CONFIG;
};
};

View File

@ -14,6 +14,7 @@ This page describes how you can setup your development environment for ACE3, all
- Arma 3 (duh)
- A proper installation of the Arma 3 Tools (available on Steam)
- A properly setup P-drive
- Run ArmA 3 and Arma 3 Tools directly from steam once to install registry entries (and again after every update)
- Python 3.x, available [here](http://www.python.org)
- The following Mikero Tools (available [here](https://dev.withsix.com/projects/mikero-pbodll/files)): DePBO, Rapify, MakePBO, PBOProject
- A properly setup PATH variable (containing Python and the Mikero tools)

View File

@ -2,7 +2,7 @@
#include <string>
#include <vector>
#include <map>
#include <unordered_map>
#include <random>
#define M_PI 3.14159265358979323846f
@ -57,7 +57,7 @@ struct Map {
};
std::vector<Bullet> bulletDatabase;
std::map<std::string, Map> mapDatabase;
std::unordered_map<std::string, Map> mapDatabase;
std::string worldName = "";
Map* map = &mapDatabase[""];
@ -339,10 +339,8 @@ void __stdcall RVExtension(char *output, int outputSize, const char *function)
tickTime = strtod(strtok_s(NULL, ":", &next_token), NULL);
tickTime += strtod(strtok_s(NULL, ":", &next_token), NULL);
while (index >= bulletDatabase.size()) {
Bullet bullet;
bulletDatabase.push_back(bullet);
}
if (index >= bulletDatabase.size())
bulletDatabase.resize(index+1);
bulletDatabase[index].airFriction = airFriction;
bulletDatabase[index].ballisticCoefficients = ballisticCoefficients;
@ -611,8 +609,12 @@ void __stdcall RVExtension(char *output, int outputSize, const char *function)
mapGrids = (int)ceil((double)mapSize / 50.0) + 1;
gridCells = mapGrids * mapGrids;
auto map_iter = mapDatabase.find(worldName);
if (map_iter == mapDatabase.end())
return;
map = &map_iter->second;
map = &mapDatabase[worldName];
if (map->gridHeights.size() == gridCells) {
int n = sprintf_s(output, outputSize, "%s", "Terrain already initialized");
return;

108
tools/deploy.py Executable file
View File

@ -0,0 +1,108 @@
#!/usr/bin/env python3
####################################
# ACE3 automatic deployment script #
# ================================ #
# This is not meant to be run #
# directly! #
####################################
import os
import sys
import shutil
import traceback
import subprocess as sp
from pygithub3 import Github
TRANSLATIONISSUE = 367
TRANSLATIONBODY = """**How to translate ACE3:**
https://github.com/acemod/ACE3/blob/master/documentation/development/how-to-translate-ace3.md
{}
"""
REPOUSER = "acemod"
REPONAME = "ACE3"
REPOPATH = "{}/{}".format(REPOUSER,REPONAME)
USERNAME = "ACE3 Travis"
USEREMAIL = "travis@ace3mod.com"
def update_translations(token):
diag = sp.check_output(["python3", "tools/stringtablediag.py", "--markdown"])
diag = str(diag, "utf-8")
repo = Github(token).get_repo(REPOPATH)
issue = repo.get_issue(TRANSLATIONISSUE)
issue.edit(body=TRANSLATIONBODY.format(diag))
def deploy_documentation(token):
devnull = open(os.devnull, "w")
url = "https://{}@github.com/{}".format(token, REPOPATH)
sp.check_call(["git", "clone", url, "out", "--depth", "10", "--branch", "gh-pages"], stdout=devnull, stderr=devnull)
os.chdir("out")
sp.check_call(["git", "config", "user.name", USERNAME])
sp.check_call(["git", "config", "user.email", USEREMAIL])
for root, dirs, files in os.walk("../documentation", topdown=False):
target = root.replace("../documentation", "wiki")
if root == "../documentation":
continue
for name in files:
print("{} => {}".format(os.path.join(root, name), os.path.join(target, name)))
shutil.copyfile(os.path.join(root, name), os.path.join(target, name))
sp.check_call(["git", "add", "--all", "."])
filenum = sp.check_output(["git", "status", "--porcelain"])
filenum = len(str(filenum, "utf-8").split("\n")) - 1
if filenum > 0:
sp.check_call(["git", "commit", "-m", "Automatic gh-pages deployment"])
print("Pushing changes ...")
sp.check_call(["git", "push", "origin", "gh-pages"], stdout=devnull, stderr=devnull)
else:
print("No changes.")
os.chdir("..")
def main():
print("Obtaining token ...")
try:
token = os.environ["GH_TOKEN"]
except:
print("Could not obtain token.")
print(traceback.format_exc())
return 1
else:
print("done.")
print("\nUpdating translation issue ...")
try:
update_translations(token)
except:
print("Failed to update translation issue.")
print(traceback.format_exc())
return 1
else:
print("done.")
print("\nDeploying documentation ...")
try:
deploy_documentation(token)
except:
print("Failed to deploy documentation.")
print(traceback.format_exc())
return 1
else:
print("done.")
return 0
if __name__ == "__main__":
sys.exit(main())

View File

@ -57,14 +57,16 @@ def main():
projectpath = os.path.dirname(os.path.dirname(scriptpath))
projectpath = os.path.join(projectpath, "addons")
print("#########################")
print("# Stringtable Diag Tool #")
print("#########################")
if "--markdown" not in sys.argv:
print("#########################")
print("# Stringtable Diag Tool #")
print("#########################")
languages = get_all_languages(projectpath)
print("\nLanguages present in the repo:")
print(", ".join(languages))
if "--markdown" not in sys.argv:
print("\nLanguages present in the repo:")
print(", ".join(languages))
keysum = 0
localizedsum = list(map(lambda x: 0, languages))
@ -76,31 +78,33 @@ def main():
if keynumber == 0:
continue
print("\n# " + module)
if "--markdown" not in sys.argv:
print("\n# " + module)
keysum += keynumber
for i in range(len(localized)):
print(" %s %s / %i" % ((languages[i]+":").ljust(10), str(localized[i]).ljust(3), keynumber))
if "--markdown" not in sys.argv:
print(" %s %s / %i" % ((languages[i]+":").ljust(10), str(localized[i]).ljust(3), keynumber))
localizedsum[i] += localized[i]
if localized[i] < keynumber:
missing[i].append(module)
print("\n###########")
print("# RESULTS #")
print("###########")
if "--markdown" not in sys.argv:
print("\n###########")
print("# RESULTS #")
print("###########")
print("\nTotal number of keys: %i\n" % (keysum))
print("\nTotal number of keys: %i\n" % (keysum))
for i in range(len(languages)):
if localizedsum[i] == keysum:
print("%s No missing stringtable entries." % ((languages[i] + ":").ljust(12)))
else:
print("%s %s missing stringtable entry/entries." % ((languages[i] + ":").ljust(12), str(keysum - localizedsum[i]).rjust(4)), end="")
print(" ("+", ".join(missing[i])+")")
for i in range(len(languages)):
if localizedsum[i] == keysum:
print("%s No missing stringtable entries." % ((languages[i] + ":").ljust(12)))
else:
print("%s %s missing stringtable entry/entries." % ((languages[i] + ":").ljust(12), str(keysum - localizedsum[i]).rjust(4)), end="")
print(" ("+", ".join(missing[i])+")")
print("\n\n### MARKDOWN ###\n")
print("\n\n### MARKDOWN ###")
print("\nTotal number of keys: %i\n" % (keysum))
print("Total number of keys: %i\n" % (keysum))
print("| Language | Missing Entries | Relevant Modules | % done |")
print("|----------|----------------:|------------------|--------|")