mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-09 23:49:53 +00:00
fixed symbol changed enable archimedean unexpectedly
This commit is contained in:
parent
fbd2cc6b9d
commit
9752cdede1
@ -1078,12 +1078,13 @@ void archimedean_tiling::parse() {
|
|||||||
prepare();
|
prepare();
|
||||||
}
|
}
|
||||||
|
|
||||||
EX bool load_symbol(const string& s) {
|
EX bool load_symbol(const string& s, bool switch_geom) {
|
||||||
archimedean_tiling at; at.parse(s);
|
archimedean_tiling at; at.parse(s);
|
||||||
if(at.errors) {
|
if(at.errors) {
|
||||||
DEBB(DF_ERROR | DF_GEOM, ("error: ", at.errormsg));
|
DEBB(DF_ERROR | DF_GEOM, ("error: ", at.errormsg));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if(!switch_geom && geometry != gArchimedean) return true;
|
||||||
stop_game();
|
stop_game();
|
||||||
set_geometry(gArchimedean);
|
set_geometry(gArchimedean);
|
||||||
current = at;
|
current = at;
|
||||||
@ -1098,7 +1099,7 @@ int readArgs() {
|
|||||||
if(0) ;
|
if(0) ;
|
||||||
else if(argis("-symbol")) {
|
else if(argis("-symbol")) {
|
||||||
PHASEFROM(2);
|
PHASEFROM(2);
|
||||||
shift(); load_symbol(args());
|
shift(); load_symbol(args(), true);
|
||||||
showstartmenu = false;
|
showstartmenu = false;
|
||||||
}
|
}
|
||||||
else if(argis("-dual")) { PHASEFROM(2); set_variation(eVariation::dual); }
|
else if(argis("-dual")) { PHASEFROM(2); set_variation(eVariation::dual); }
|
||||||
|
@ -1495,7 +1495,7 @@ EX void initConfig() {
|
|||||||
auto arcms = param_str(arcm::current.symbol, "arcm-symbol", "4^5");
|
auto arcms = param_str(arcm::current.symbol, "arcm-symbol", "4^5");
|
||||||
arcms->editor = [] { pushScreen(arcm::show); arcm::init_symbol_edit(); };
|
arcms->editor = [] { pushScreen(arcm::show); arcm::init_symbol_edit(); };
|
||||||
arcms->pre_reaction = non_editable_pre;
|
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
|
#endif
|
||||||
param_enum(hybrid::underlying, "product_underlying", hybrid::underlying)->be_non_editable();
|
param_enum(hybrid::underlying, "product_underlying", hybrid::underlying)->be_non_editable();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user