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

read_model now prioritizes the names from the current geometry

This commit is contained in:
Zeno Rogue 2022-04-07 20:51:29 +02:00
parent 2aeb74511d
commit ca0fc95a52

View File

@ -782,6 +782,11 @@ EX namespace models {
#if CAP_COMMANDLINE
EX eModel read_model(const string& ss) {
for(int i=0; i<isize(mdinf); i++) {
if(hyperbolic && appears(mdinf[i].name_hyperbolic, ss)) return eModel(i);
if(euclid && appears(mdinf[i].name_euclidean, ss)) return eModel(i);
if(sphere && appears(mdinf[i].name_spherical, ss)) return eModel(i);
}
for(int i=0; i<isize(mdinf); i++) {
if(appears(mdinf[i].name_hyperbolic, ss)) return eModel(i);
if(appears(mdinf[i].name_euclidean, ss)) return eModel(i);