Thread: Hide egg gender
View Single Post
  #2  
Old 01-21-2017, 10:45 AM
IntoRain's Avatar
IntoRain IntoRain is offline
Moderator
 
Join Date: Jul 2013
Location: Portugal
Posts: 461
Gender: Female
Credits: 19,377
IntoRain is on a distinguished road
Default

You can go to class_ownedadoptable.php and modify the getGender() function to, for example, hide the gender when the adopt is under a certain level. Something like this:

PHP Code:
public function getGender($fetchMode ""){
        
    
$showGenderAtLevel 1;
        
    if(
$this->currentlevel $showGenderAtLevel) {
        
//don't show gender
        
if($fetchMode == Model::GUI) return new Image("picuploads/NO_GENDER.png");//or whatever your image for unknown gender is
        
else return "Unknown";
    }
    else {
        
//show gender
        
if($fetchMode == Model::GUI) return new Image("picuploads/{$this->gender}.png");
        else return 
$this->gender;
    }    
        

__________________


asp.net stole my soul.
Reply With Quote