Exemple #1
0
static bool crafting_allowed( const player &p, const recipe &rec )
{
    if( !p.has_morale_to_craft() ) {
        add_msg( m_info, _( "Your morale is too low to craft..." ) );
        return false;
    }

    if( p.lighting_craft_speed_multiplier( rec ) <= 0.0f ) {
        add_msg( m_info, _( "You can't see to craft!" ) );
        return false;
    }

    return true;
}