<commit_before><?php

use UniEngine\Engine\Modules\Development;

use UniEngine\Engine\Includes\Helpers\World\Elements;

function ShipyardPage(&$CurrentPlanet, $CurrentUser, $PageType = 'fleet')
{
    global $_Lang, $_Vars_GameElements, $_Vars_ElementCategories, $_SkinPath, $_GameConfig, $_POST, $UserDev_Log, $_EnginePath;

    include($_EnginePath.'includes/functions/GetMaxConstructibleElements.php');
    include($_EnginePath.'includes/functions/GetElementTechReq.php');
    includeLang('worldElements.detailed');

    $isUserOnVacation = isOnVacation($CurrentUser);

    $Now = time();
    $IsInFleet = false;
    $IsInDefense = false;
    if($PageType == 'fleet')
    {
        $IsInFleet = true;
    }
    else if($PageType == 'defense')
    {
        $IsInDefense = true;
    }
    if($IsInDefense)
    {
        $_Lang['Cart_Ships'] = $_Lang['Cart_Defense'];
        $_Lang['InfoBox_SelectShip'] = $_Lang['InfoBox_SelectDefense'];
        $_Lang['ListBox_ShipsList'] = $_Lang['ListBox_DefensesList'];
        $_Lang['Title_Shipyard'] = $_Lang['Title_Defense'];
    }
    $Parse = &$_Lang;
    $Parse['SkinPath'] = $_SkinPath;
    $Parse['Create_Queue'] = '';

    // Constants
    $ElementsPerRow = 7;
    $QueueSize = ((isPro($CurrentUser)) ? MAX_FLEET_OR_DEFS_PER_ROW_PRO : MAX_FLEET_OR_DEFS_PER_ROW);

    // Get Templates
    $TPL['list_hidden']                        = gettemplate('buildings_compact_list_hidden');
    $TPL['list_row']                        = gettemplate('buildings_compact_list_row');
    $TPL['list_breakrow']                    = gettemplate('buildings_compact_list_breakrow');
    $TPL['queue_topinfo']                    = gettemplate('buildings_compact_queue_topinfo');
    $TPL['infobox_additionalnfo']            = gettemplate('buildings_compact_infobox_additionalnfo');
    $TPL['infobox_additionalnfo_single']    = gettemplate('buildings_compact_infobox_additionalnfo_single');

    $hasShipyard = ($CurrentPlanet[$_Vars_GameElements[21]] > 0);

    PlanetResourceUpdate($CurrentUser, $CurrentPlanet, $Now);

    if($IsInDefense)
    {
        $MissileSizes = array(502 => 1, 503 => 2);
        $Missiles[502] = $CurrentPlanet[$_Vars_GameElements[502]];
        $Missiles[503] = $CurrentPlanet[$_Vars_GameElements[503]];
        $Shields[407] = $CurrentPlanet[$_Vars_GameElements[407]];
        $Shields[408] = $CurrentPlanet[$_Vars_GameElements[408]];
        $SiloSize = $CurrentPlanet[$_Vars_GameElements[44]];
        $MaxMissiles = $SiloSize * SILO_PERLEVELPLACE;
        $SiloFreeSpace = $MaxMissiles;

        $CurrentQueue = $CurrentPlanet['shipyardQueue'];
        if(!empty($CurrentQueue))
        {
            $CurrentQueue = explode(';', $CurrentQueue);
            foreach($CurrentQueue as $QueueData)
            {
                if(empty($QueueData))<commit_msg>GH-63 Minor cleanup<commit_after><?php

use UniEngine\Engine\Modules\Development;

use UniEngine\Engine\Includes\Helpers\World\Elements;

function ShipyardPage(&$CurrentPlanet, $CurrentUser, $PageType = 'fleet')
{
    global $_Lang, $_Vars_GameElements, $_Vars_ElementCategories, $_SkinPath, $_GameConfig, $_POST, $UserDev_Log, $_EnginePath;

    include($_EnginePath.'includes/functions/GetMaxConstructibleElements.php');
    include($_EnginePath.'includes/functions/GetElementTechReq.php');
    includeLang('worldElements.detailed');

    $isUserOnVacation = isOnVacation($CurrentUser);

    $Now = time();
    $IsInFleet = false;
    $IsInDefense = false;
    if($PageType == 'fleet')
    {
        $IsInFleet = true;
    }
    else if($PageType == 'defense')
    {
        $IsInDefense = true;
    }
    if($IsInDefense)
    {
        $_Lang['Cart_Ships'] = $_Lang['Cart_Defense'];
        $_Lang['InfoBox_SelectShip'] = $_Lang['InfoBox_SelectDefense'];
        $_Lang['ListBox_ShipsList'] = $_Lang['ListBox_DefensesList'];
        $_Lang['Title_Shipyard'] = $_Lang['Title_Defense'];
    }
    $Parse = &$_Lang;
    $Parse['SkinPath'] = $_SkinPath;
    $Parse['Create_Queue'] = '';

    // Constants
    $ElementsPerRow = 7;
    $QueueSize = ((isPro($CurrentUser)) ? MAX_FLEET_OR_DEFS_PER_ROW_PRO : MAX_FLEET_OR_DEFS_PER_ROW);

    // Get Templates
    $TPL['list_hidden']                     = gettemplate('buildings_compact_list_hidden');
    $TPL['list_row']                        = gettemplate('buildings_compact_list_row');
    $TPL['list_breakrow']                   = gettemplate('buildings_compact_list_breakrow');
    $TPL['queue_topinfo']                   = gettemplate('buildings_compact_queue_topinfo');
    $TPL['infobox_additionalnfo']           = gettemplate('buildings_compact_infobox_additionalnfo');
    $TPL['infobox_additionalnfo_single']    = gettemplate('buildings_compact_infobox_additionalnfo_single');

    $hasShipyard = ($CurrentPlanet[$_Vars_GameElements[21]] > 0);

    PlanetResourceUpdate($CurrentUser, $CurrentPlanet, $Now);

    if($IsInDefense)
    {
        $MissileSizes = array(502 => 1, 503 => 2);
        $Missiles[502] = $CurrentPlanet[$_Vars_GameElements[502]];
        $Missiles[503] = $CurrentPlanet[$_Vars_GameElements[503]];
        $Shields[407] = $CurrentPlanet[$_Vars_GameElements[407]];
        $Shields[408] = $CurrentPlanet[$_Vars_GameElements[408]];
        $SiloSize = $CurrentPlanet[$_Vars_GameElements[44]];
        $MaxMissiles = $SiloSize * SILO_PERLEVELPLACE;
        $SiloFreeSpace = $MaxMissiles;

        $CurrentQueue = $CurrentPlanet['shipyardQueue'];
        if(!empty($CurrentQueue))
        {
            $CurrentQueue = explode(';', $CurrentQueue);
            foreach($CurrentQueue as $QueueData)
            {
                if(empty($QueueData))
{'fraction_non_alphanumeric': 0.14227498228206945, 'fraction_numerical': 0.013819985825655563, 'mean_word_length': 3.5671521035598706, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3380261', 'n_tokens_mistral': 1937, 'n_tokens_neox': 1824, 'n_words': 223}