don't panic when recharge event isn't found
This commit is contained in:
parent
c036d97fbc
commit
c3f28a3f1f
@ -1392,7 +1392,10 @@ fn sustain(source: &mut Construct, target: &mut Construct, mut results: Resoluti
|
||||
if red > 0 || blue > 0 { EventStages::PostOnly }
|
||||
else { EventStages::NoStages }
|
||||
}
|
||||
_ => panic!("not recharge")
|
||||
_ => {
|
||||
warn!("no recharge event found {:?}", e);
|
||||
return results;
|
||||
}
|
||||
};
|
||||
|
||||
results.push(Resolution::new(source, target).event(e).stages(stages));
|
||||
@ -1411,7 +1414,10 @@ fn intercept(source: &mut Construct, target: &mut Construct, mut results: Resolu
|
||||
if red > 0 || blue > 0 { EventStages::PostOnly }
|
||||
else { EventStages::NoStages }
|
||||
}
|
||||
_ => panic!("not recharge")
|
||||
_ => {
|
||||
warn!("no recharge event found {:?}", e);
|
||||
return results;
|
||||
}
|
||||
};
|
||||
results.push(Resolution::new(source, target).event(e).stages(stages));
|
||||
|
||||
@ -1713,7 +1719,10 @@ fn reflect(source: &mut Construct, target: &mut Construct, mut results: Resoluti
|
||||
if red > 0 || blue > 0 { EventStages::PostOnly }
|
||||
else { EventStages::NoStages }
|
||||
}
|
||||
_ => panic!("not recharge")
|
||||
_ => {
|
||||
warn!("no recharge event found {:?}", e);
|
||||
return results;
|
||||
}
|
||||
};
|
||||
results.push(Resolution::new(source, target).event(e).stages(stages));
|
||||
return results;;
|
||||
@ -1728,7 +1737,10 @@ fn recharge(source: &mut Construct, target: &mut Construct, mut results: Resolut
|
||||
if red > 0 || blue > 0 { EventStages::AllStages }
|
||||
else { EventStages::StartEnd }
|
||||
}
|
||||
_ => panic!("not recharge")
|
||||
_ => {
|
||||
warn!("no recharge event found {:?}", e);
|
||||
return results;
|
||||
}
|
||||
};
|
||||
results.push(Resolution::new(source, target).event(e).stages(stages));
|
||||
return results;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user