1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-09-19 10:19:36 +00:00

fixed symbol changed enable archimedean unexpectedly

This commit is contained in:
Zeno Rogue 2024-05-28 20:20:28 +02:00
parent fbd2cc6b9d
commit 9752cdede1
2 changed files with 4 additions and 3 deletions

View File

@ -1078,12 +1078,13 @@ void archimedean_tiling::parse() {
prepare();
}
EX bool load_symbol(const string& s) {
EX bool load_symbol(const string& s, bool switch_geom) {
archimedean_tiling at; at.parse(s);
if(at.errors) {
DEBB(DF_ERROR | DF_GEOM, ("error: ", at.errormsg));
return false;
}
if(!switch_geom && geometry != gArchimedean) return true;
stop_game();
set_geometry(gArchimedean);
current = at;
@ -1098,7 +1099,7 @@ int readArgs() {
if(0) ;
else if(argis("-symbol")) {
PHASEFROM(2);
shift(); load_symbol(args());
shift(); load_symbol(args(), true);
showstartmenu = false;
}
else if(argis("-dual")) { PHASEFROM(2); set_variation(eVariation::dual); }

View File

@ -1495,7 +1495,7 @@ EX void initConfig() {
auto arcms = param_str(arcm::current.symbol, "arcm-symbol", "4^5");
arcms->editor = [] { pushScreen(arcm::show); arcm::init_symbol_edit(); };
arcms->pre_reaction = non_editable_pre;
arcms->reaction = [] { if(!arcm::load_symbol(arcm::current.symbol)) throw hr_parse_exception("wrong Archimedean symbol"); non_editable_post(); };
arcms->reaction = [] { if(!arcm::load_symbol(arcm::current.symbol, false)) throw hr_parse_exception("wrong Archimedean symbol"); non_editable_post(); };
#endif
param_enum(hybrid::underlying, "product_underlying", hybrid::underlying)->be_non_editable();