Hey Badspot do this
function loadClientAddOns()
{
exec("base/server/crapOns_Cache.cs");
echo("");
%search = "Add-Ons/*/client.cs";
%sorter = new GuiTextListCtrl();
%i = 0;
for(%file = findFirstFile(%search); isFile(%file); %file = findNextFile(%search))
{
%fileName = getSubStr(filePath(%file), 8, strLen(filePath(%file)) - 8);
%sorter.addRow(%i, %fileName);
%i++;
}
%sorter.sort(0, 1);
%count = %sorter.rowCount();
for(%i = 0; %i < %count; %i++)
{
%fileName = %sorter.getRowText(%i);
echo("Client checking Add-On:" SPC %fileName);
if(clientIsValidAddOn(%fileName, true))
{
if(ClientVerifyAddOnScripts(%fileName))
{
if(isFile(%zip = "Add-Ons/" @ %fileName @ ".zip"))
%crc = "\c1(CRC :" @ getFileCRC(%zip) @ ")";
echo("\c4Loading Add-On:" SPC %fileName SPC %crc);
%crc = "";
exec("Add-Ons/" @ %fileName @ "/client.cs");
}
}
echo("");
}
%sorter.delete();
}
function updateAddOnList()
{
echo("");
echo("");
echo("--------- Updating Add-On List ---------");
exec("config/server/ADD_ON_LIST.cs");
exec("base/server/crapOns_Cache.cs");
if(isObject($FixAddOnSorting::Sorter))
$FixAddOnSorting::Sorter.delete();
%search = "Add-Ons/*/server.cs";
$FixAddOnSorting::Sorter = new GuiTextListCtrl();
%i = 0;
for(%file = findFirstFile(%search); isFile(%file); %file = findNextFile(%search))
{
%fileName = getSubStr(filePath(%file), 8, strLen(filePath(%file)) - 8);
if($AddOn__[%fileName])
{
$FixAddOnSorting::Sorter.addRow(%i, %fileName);
%i++;
}
}
$FixAddOnSorting::Sorter.sort(0, 1);
%count = $FixAddOnSorting::Sorter.rowCount();
for(%i = 0; %i < %count; %i++)
{
%fileName = $FixAddOnSorting::Sorter.getRowText(%i);
echo("Checking Add-On" SPC %fileName);
if(!isValidAddOn(%fileName, 1))
{
$FixAddOnSorting::Sorter.removeRow(%i);
}
}
echo("");
}
function loadAddOns()
{
updateAddOnList();
echo("--------- Loading Add-Ons ---------");
if(!isObject($FixAddOnSorting::Sorter))
return;
%count = $FixAddOnSorting::Sorter.rowCount();
for(%i = 0; %i < %count; %i++)
{
%fileName = $FixAddOnSorting::Sorter.getRowText(%i);
if(isValidAddOn(%fileName, true))
{
if(isFile(%zip = "Add-Ons/" @ %fileName @ ".zip"))
%crc = "\c1(CRC :" @ getFileCRC(%zip) @ ")";
echo("\c4Loading Add-On:" SPC %fileName SPC %crc);
%crc = "";
if(VerifyAddOnScripts(%fileName))
{
%preCount = getDataBlockGroupSize();
exec("Add-Ons/" @ %fileName @ "/server.cs");
%dataAdded = getDataBlockGroupSize() - %preCount;
echo("\c1" @ %dataAdded SPC "datablocks added.");
}
}
echo("");
}
echo("");
$FixAddOnSorting::Sorter.delete();
}
function customGameGui::sortAddOnList(%gui)
{
%sorter = new GuiTextListCtrl();
%count = $CustomGameGui::AddOnCount;
for(%i = 0; %i < %count; %i++)
{
%sorter.addRow(%i, $CustomGameGui::AddOn[%i]);
}
%sorter.sort(0, 0);
for(%i = 0; %i < %count; %i++)
{
$CustomGameGui::AddOn[%i] = %sorter.getRowText(%i);
}
%sorter.delete();
}
package Client_FixAddOnSorting
{
function customGameGui::populateAddOnList(%gui)
{
parent::populateAddonList(%gui);
%gui.sortAddOnList();
}
};
activatePackage(Client_FixAddOnSorting);
Fixes the client and server add on execute order for Linux, and the Macs that have that problem too. Also fixes the custom game GUI add-on list that's messed up by the same thing.