Skip to content

Commit

Permalink
Throw error if no valid recipes despite no loading errors
Browse files Browse the repository at this point in the history
  • Loading branch information
RenechCDDA committed Apr 2, 2024
1 parent 4aef748 commit db979df
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/requirements.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1647,6 +1647,10 @@ deduped_requirement_data::deduped_requirement_data( const requirement_data &in,
pending.push( { without_dupes, next.index + 1 } );
}

if( alternatives_.empty() && pending.empty() ) {
debugmsg( "Recipe definition %s somehow has no valid recipes!", context.str() );
}

// Because this algorithm is super-exponential in the worst case, add a
// sanity check to prevent things getting too far out of control.
// The worst case in the core game currently is boots_fur
Expand Down

0 comments on commit db979df

Please sign in to comment.