mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-27 06:27:17 +00:00
twist:: display an error when it fails to solve the twist values, like it does in 14,6,4
This commit is contained in:
parent
6728484cf7
commit
3a8f7fcc3c
@ -1354,10 +1354,14 @@ EX namespace hybrid {
|
||||
}
|
||||
|
||||
if(candidates.size() == 2 && candidates[0] != candidates[1]) {
|
||||
if(!quotient) println(hlog, "two candidates in shift : ", candidates);
|
||||
int val = candidates[0] - candidates[1];
|
||||
int old_disc_quotient = disc_quotient;
|
||||
if(disc_quotient == 0) disc_quotient = val;
|
||||
disc_quotient = gcd(val, disc_quotient);
|
||||
if(disc_quotient < 0) disc_quotient = -disc_quotient;
|
||||
if(old_disc_quotient != disc_quotient && !in_underlying([] { return quotient; }))
|
||||
addMessage(XLAT("ERROR: failed to solve the twist values, the map will be incorrect", its(disc_quotient)));
|
||||
}
|
||||
|
||||
int val = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user