rsked/playermgr.cc
/// Initializes player preference policy, m_prefs, based on
/// any user-specified policy, followed by default capabilities.
///
Initializes player preference policy, m_prefs, based on
any user-specified policy, followed by default capabilities.
Initializes player preference policy m_prefs based on any user - specified policy followed by default capabilities .
void Player_manager::configure_prefs(Config& config)
{
    if (config.get_schema() < "1.1") {
        LOG_WARNING(Lgr) <<
            "Player_manager: older schema, no user preference support";
    } else {
        load_json_prefs( config );
    }
    for ( auto pn : RankedPlayers ) {
        spPlayer sp = m_players[ pn ];
        if (sp) {
            sp->install_caps(m_prefs);
        } else {
            LOG_ERROR(Lgr) << "Player_mgr could not find player " << pn;
        }
    }
}
void Player_manager :: configure_prefs ( Config & config ) { if ( config . get_schema ( ) < " " ) { LOG_WARNING ( Lgr ) << " " ; } else { load_json_prefs ( config ) ; } for ( auto pn : RankedPlayers ) { spPlayer sp = m_players [ pn ] ; if ( sp ) { sp -> install_caps ( m_prefs ) ; } else { LOG_ERROR ( Lgr ) << " " << pn ; } } }
Initializes player preference policy, m_prefs, based on
any user-specified policy, followed by default capabilities.
Initializes player preference policy m_prefs based on any user - specified policy followed by default capabilities .
// Read user prefs from config here. These are checked first at run time. // Install full capabilities of all enabled players next. // First player installed has default priority 1, and so forth.