1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-27 06:27:17 +00:00

fixed product shvid

This commit is contained in:
Zeno Rogue 2021-06-17 09:38:27 +02:00
parent c5e8d8aab3
commit 29dee36525
2 changed files with 12 additions and 1 deletions

View File

@ -1198,6 +1198,9 @@ EX namespace dialog {
EX string infix;
string foreign_letters = "ÁÄÇÈÉÍÎÖÚÜßàáâãäçèéêìíîïòóôõöøùúüýąćČčĎďĘęĚěğİıŁłńňŘřŚśŞşŠšŤťůŹźŻżŽž";
string latin_letters = "AACEEIIOUUsAAAAACEEEIIIIOOOOOOUUUYACCCDDEEEEGIILLNNRRSSSSSSTTUZZZZZZ";
EX bool hasInfix(const string &s) {
if(infix == "") return true;
string t = "";
@ -1207,6 +1210,14 @@ EX namespace dialog {
if(c >= 'a' && c <= 'z') tt += c - 32;
else if(c >= 'A' && c <= 'Z') tt += c;
else if(c == '@') tt += c;
if(tt == 0) for(int k=0; k<isize(latin_letters); k++) {
if(s[i] == foreign_letters[2*k] && s[i+1] == foreign_letters[2*k+1]) {
if(latin_letters[k] == 's') t += "SS";
else tt += latin_letters[k];
}
}
if(tt) t += tt;
}
return t.find(infix) != string::npos;

View File

@ -1278,7 +1278,7 @@ EX namespace hybrid {
int shvid(cell *c) override {
cell *c1 = hybrid::get_where(c).first;
return PIU( shvid(c1) );
return PIU( hr::shvid(c1) );
}
virtual transmatrix spin_to(cell *c, int d, ld bonus) override { if(d >= c->type-2) return Id; c = get_where(c).first; return in_underlying([&] { return currentmap->spin_to(c, d, bonus); }); }