R3vo/Sandbox1 – User

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Replaced content with "startloadingscreen [""]; _cfg = _this param [0,"cfgVehicles",[""]]; _patches = _this param [1,[],[[]]]; _patches = +_patches; { _patches set [_foreachindex,tolower _x]; } foreach _patches; _allPatches = count _patches == 0; _product = productversion select 0; _productShort = productversion select 1; _fnc_getItemPage = { switch (_this) do { case "Weapon": {"CfgWeapons Weapons"}; case "VehicleWeapon": {"CfgWeapons Vehicle Weapons"}; case "Item": {"CfgWeapons...")
Tag: Replaced
m (Blanked the page)
Tag: Blanking
 
(35 intermediate revisions by the same user not shown)
Line 1: Line 1:
startloadingscreen [""];
_cfg = _this param [0,"cfgVehicles",[""]];


_patches = _this param [1,[],[[]]];
_patches = +_patches;
{
_patches set [_foreachindex,tolower _x];
} foreach _patches;
_allPatches = count _patches == 0;
_product = productversion select 0;
_productShort = productversion select 1;
_fnc_getItemPage = {
switch (_this) do {
case "Weapon": {"CfgWeapons Weapons"};
case "VehicleWeapon": {"CfgWeapons Vehicle Weapons"};
case "Item": {"CfgWeapons Items"};
case "Equipment": {"CfgWeapons Equipment"};
default {"CfgWeapons"};
};
};
_text = "{| class=""wikitable sortable"" border=""1"" style=""border-collapse:collapse; font-size:100%;"" cellpadding=""3px""" + endl;
_text = _text + "! Class" + endl;
_text = _text + "! Objects" + endl;
_text = _text + "! Objects Gallery" + endl;
{
_class = configname _x;
if (_allPatches || (tolower _class) in _patches) then {
_textAddons = "";
_textUnits = "";
_textWeapons = "";
_textSide = "";
_galleryUnits = "";
_galleryWeapons = "";
_units = getarray (_x >> "units");
if (_cfg == "cfgVehicles" && count _units == 0) exitwith {};
_weapons = getarray (_x >> "weapons");
if (_cfg != "cfgVehicles" && count _weapons == 0) exitwith {};
{
_textSide = if (_x iskindof "allvehicles") then {
str ((getnumber (configfile >> "cfgvehicles" >> _x >> "side") min 3) call bis_fnc_sidetype)
} else {
"EMPTY"
};
_textUnits = _textUnits + endl + format [":[[%1 CfgVehicles %4#%3|%3]]",_product,_productShort,_x,_textSide];
// Get editor preview
private _image = getText (configFile >> "CfgVehicles" >> _x >> "editorPreview");
if (_image != "") then
{
_image = (_image splitString "\");
reverse _image;
_image = _image param [0, ""];
};
if (_image != "") then
{
_image = format ["[[File:%1|150px]]", "arma3-" + toLower _image];
};
_textUnits = _textUnits + endl + format [":[[%1 CfgVehicles %4#%3|%3]]", _product, _productShort, _x, _textSide];
_galleryUnits = _galleryUnits + _image;
} foreach _units;
{
if (isclass (configfile >> "cfgweapons" >> _x)) then {
_type = _x call bis_fnc_itemType;
_page = (_type select 0) call _fnc_getItemPage;
_textWeapons = _textWeapons + endl + format [":[[%1 %4#%3|%3]]", _product, _productShort, _x, _page];
private _image = getText (configfile >> "cfgweapons" >> _x >> "picture");
if (_image != "") then
{
_image = (_image splitString "\");
reverse _image;
_image = _image param [0, ""];
};
if (_image != "") then
{
_image = _image regexReplace [".paa", ".png"];
//Some image paths have no file extension...
if (_image find ".png" == -1) then
{
_image = _image + ".png";
};
_image = format ["[[File:%1|150px]]", "arma3-" + toLower _image];
};
diag_log _image;
_galleryWeapons = _galleryWeapons + _image;
};
} foreach _weapons;
_text = _text + "|-" + endl;
_text = _text + "| " + format ["<span id=""%1"" >'''%1'''</span>",_class] + endl;
if (_cfg == "cfgVehicles") then {
_text = _text + "| " + "<small>" + _textUnits + endl + "</small>" + endl;
_text = _text + "| " + "<small>" + _galleryUnits + endl + "</small>" + endl;
} else {
_text = _text + "| " + "<small>" + _textWeapons + endl + "</small>" + endl;
_text = _text + "| " + "<small>" + _galleryWeapons + endl + "</small>" + endl;
};
};
} foreach ((configfile >> "cfgpatches") call bis_fnc_returnchildren);
_text = _text + "|}" + endl;
_text = _text + format [
"<div style=""color: grey; font-size: 0.9em; padding: 0.5em; text-align: center"">Generated in {{GVI|%1|%2|size= 0.75}} by [[User:R3vo|R3vo]] ([[User talk:R3vo|talk]]) 16:12, 10 August 2024 (CEST)</div>",
tolower (productversion select 0),
(productversion select 2) * 0.01
] + endl;
_text = _text + "{{Navbox/A3Assets}}" + endl;
_text = _text + format ["[[Category:%1: Assets]]",_product] + endl;
_text = _text + format ["[[Category:%1: Editing]]",_product] + endl;
copytoclipboard _text;
endloadingscreen;

Latest revision as of 17:02, 18 October 2024