From db979df5441f62b2df9599a81c8846a419f866a7 Mon Sep 17 00:00:00 2001 From: RenechCDDA <84619419+RenechCDDA@users.noreply.github.com> Date: Tue, 2 Apr 2024 17:16:00 -0400 Subject: [PATCH] Throw error if no valid recipes despite no loading errors --- src/requirements.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/requirements.cpp b/src/requirements.cpp index 64cba3ba5cf45..39cab3312fe6b 100644 --- a/src/requirements.cpp +++ b/src/requirements.cpp @@ -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