Changeset 301 for dev/mods

Show
Ignore:
Timestamp:
12/27/07 12:02:37 (13 years ago)
Author:
ralle030583
Message:

FIX: Items without slotID used slot of partent items (attribute used_with..)<br>
FIX: Items witch has the attribbute used_with(launcher) arent shown in fitting image of fitting mod<br>
DEL: Settings of fitting mod, not needed anymore, if already set, you can delete it in the kb3_config

Location:
dev/mods/fitting
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • dev/mods/fitting/kill_detail.php

    r297 r301  
    122122{ 
    123123        //Admin is able to see classified Systems 
    124         if ($page->isAdmin()){ 
     124        if ($page->isAdmin()) 
     125        { 
    125126            $smarty->assign('System', $system->getName().' (Classified)'); 
    126127        $smarty->assign('SystemURL', "?a=system_detail&amp;sys_id=".$system->getID()); 
    127128            $smarty->assign('SystemSecurity', $system->getSecurity(true)); 
    128         }else{ 
     129        } 
     130        else 
     131        { 
    129132                $smarty->assign('System', 'Classified'); 
    130133        $smarty->assign('SystemURL', ""); 
     
    164167                 
    165168                 
    166                 $fitting_unwanted_groups = explode(";",config::get('fitting_unwanted_types')); 
    167169                //Fitting, KE - add destroyed items to an array of all fitted items. 
    168                 if($destroyed->getLocationID() < 6 && !in_array($item->get_group_id($item->getName()), $fitting_unwanted_groups)){ 
    169                 $count_quntity = 0; 
     170                if($destroyed->getLocationID() < 6 && ($item->get_used_launcher_group($item->getName()) == 0) 
     171                { 
     172                        $count_quntity = 0; 
    170173                        while ($count_quntity < $destroyed->getQuantity()) 
    171174                        { 
     
    200203                 
    201204                //Fitting -KE, add dropped items to the list 
    202                 if(($dropped->getLocationID() != 4) && !in_array($item->get_group_id($item->getName()) , $fitting_unwanted_groups)) 
     205                if(($dropped->getLocationID() != 4) && ($item->get_used_launcher_group($item->getName()) == 0)) 
    203206                { 
    204                 $count_quntity = 0; 
     207                        $count_quntity = 0; 
    205208                        while ($count_quntity < $dropped->getQuantity()) 
    206209                        { 
    207                         $fitting_array[$dropped->getLocationID()][]=array('Name'=>$item->getName(), 'Icon' => $item->getIcon(32), 'itemID' => $item->getID());           
    208                         ++$count_quntity;        
     210                                $fitting_array[$dropped->getLocationID()][]=array('Name'=>$item->getName(), 'Icon' => $item->getIcon(32), 'itemID' => $item->getID());           
     211                                ++$count_quntity;        
    209212                        } 
    210213                } 
     
    222225                 $sort_by_nameh["Name"][] = $array_rowh["Name"]; 
    223226        } 
    224 array_multisort($sort_by_nameh["Name"],SORT_ASC,$fitting_array[1]); 
     227        array_multisort($sort_by_nameh["Name"],SORT_ASC,$fitting_array[1]); 
    225228} 
    226229 
  • dev/mods/fitting/settings.php

    r297 r301  
    66$html .= "No settings to make yet."; 
    77 
    8 if(!is_array(config::get('fitting_unwanted_types'))){ 
    9 //Array of item types we dont want added to the fitted items array.. ammo, scripts etc.  
    10 // - need to find a better place for this. 
    11 $fitting_unwanted_groups = array("",85,377,86,374,376,83,479,492,548,87,482,372,386,655,476,721,);  
    12 config::set('fitting_unwanted_types', implode(";",$fitting_unwanted_groups)); 
    13 $html .= "<p>Config option added. Nothing else needs doing<br/><br/>Greetings Knifee & Ralle030583</p>"; 
    14 } 
    15  
    168$page->setContent( $html ); 
    179$page->addContext( $menubox->generate() );