@@ -287,6 +287,16 @@ def check_heat_req(req):
287287 if "or" in req :
288288 return all (check_heat_req (v ) for v in req ["or" ])
289289
290+
291+ def check_cycle_frames_req (req ):
292+ if isinstance (req , dict ):
293+ if "cycleFrames" in req :
294+ return True
295+ if "and" in req :
296+ return any (check_cycle_frames_req (v ) for v in req ["and" ])
297+ if "or" in req :
298+ return all (check_cycle_frames_req (v ) for v in req ["or" ])
299+
290300# give list of keys to check
291301# give label for output message
292302# give list of valid values
@@ -987,6 +997,16 @@ def speed_err_fn(msg):
987997 messages ["reds" ].append (msg )
988998 messages ["counts" ]["reds" ] += 1
989999
1000+ has_cycle_frames = check_cycle_frames_req ({"and" : strat ["requires" ]})
1001+ if has_cycle_frames and "farmCycleDrops" not in strat :
1002+ msg = f"🔴ERROR: Strat has cycleFrames requirement but no farmCycleDrops:{ stratRef } "
1003+ messages ["reds" ].append (msg )
1004+ messages ["counts" ]["reds" ] += 1
1005+ if "farmCycleDrops" in strat and not has_cycle_frames :
1006+ msg = f"🔴ERROR: Strat has farmCycleDrops but is missing cycleFrames covering all cases:{ stratRef } "
1007+ messages ["reds" ].append (msg )
1008+ messages ["counts" ]["reds" ] += 1
1009+
9901010 if "collectsItems" in strat :
9911011 for item_node_id in strat ["collectsItems" ]:
9921012 if item_node_id not in node_lookup or node_lookup [item_node_id ]["nodeType" ] != "item" :
0 commit comments