void npc_class::check_consistency() { for( const auto &legacy : legacy_ids ) { if( !npc_class_factory.is_valid( legacy ) ) { debugmsg( "Missing legacy npc class %s", legacy.c_str() ); } } for( auto &cl : npc_class_factory.get_all() ) { if( !item_group::group_is_defined( cl.shopkeeper_item_group ) ) { debugmsg( "Missing shopkeeper item group %s", cl.shopkeeper_item_group.c_str() ); } if( !cl.worn_override.empty() && !item_group::group_is_defined( cl.worn_override ) ) { debugmsg( "Missing worn override item group %s", cl.worn_override.c_str() ); } if( !cl.carry_override.empty() && !item_group::group_is_defined( cl.carry_override ) ) { debugmsg( "Missing carry override item group %s", cl.carry_override.c_str() ); } if( !cl.weapon_override.empty() && !item_group::group_is_defined( cl.weapon_override ) ) { debugmsg( "Missing weapon override item group %s", cl.weapon_override.c_str() ); } for( const auto &pr : cl.skills ) { if( !pr.first.is_valid() ) { debugmsg( "Invalid skill %s", pr.first.c_str() ); } } for( const auto &pr : cl.traits ) { if( !pr.first.is_valid() ) { debugmsg( "Invalid trait %s", pr.first.c_str() ); } } } }
bool string_id<mission_type>::is_valid() const { return mission_type_factory.is_valid( *this ); }
bool string_id<npc_class>::is_valid() const { return npc_class_factory.is_valid( *this ); }