mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-06-09 18:04:07 +00:00
rogueviz::seuphorica::invoke function to call from RV Collection
This commit is contained in:
parent
cee4fe4b42
commit
2c7db09da3
@ -1548,10 +1548,19 @@ void launch() {
|
|||||||
|
|
||||||
reset_rv();
|
reset_rv();
|
||||||
restart("", "", "");
|
restart("", "", "");
|
||||||
|
for(int i=0; i<int(sp::first_artifact); i++)
|
||||||
|
special_allowed[i] =among(sp(i), sp::horizontal, sp::vertical, sp::reversing, sp::portal, sp::gigantic, sp::soothing, sp::bending, sp::tricky) && geom_allows(sp(i));
|
||||||
|
new_game();
|
||||||
enable();
|
enable();
|
||||||
reset_seuphorica_screen();
|
reset_seuphorica_screen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void set_seuphorica_geometry(int id) {
|
||||||
|
current_seuphgeom = id;
|
||||||
|
seuphgeoms[id].launcher();
|
||||||
|
launch();
|
||||||
|
}
|
||||||
|
|
||||||
auto seuphorica_hook =
|
auto seuphorica_hook =
|
||||||
arg::add3("-seuphorica", [] { launch(); pushScreen(seuphorica_screen); })
|
arg::add3("-seuphorica", [] { launch(); pushScreen(seuphorica_screen); })
|
||||||
+ addHook(hooks_configfile, 300, default_config)
|
+ addHook(hooks_configfile, 300, default_config)
|
||||||
@ -1562,10 +1571,14 @@ auto seuphorica_hook =
|
|||||||
for(int i=0; i<isize(seuphgeoms); i++) if(appears(seuphgeoms[i].name, s)) which = i;
|
for(int i=0; i<isize(seuphgeoms); i++) if(appears(seuphgeoms[i].name, s)) which = i;
|
||||||
if(which == -1 && s[0] >= '0' && s[0] <= '9') which = atoi(s.c_str());
|
if(which == -1 && s[0] >= '0' && s[0] <= '9') which = atoi(s.c_str());
|
||||||
if(which == -1) throw hr_exception("unknown seuphorica-geo geometry");
|
if(which == -1) throw hr_exception("unknown seuphorica-geo geometry");
|
||||||
current_seuphgeom = which;
|
set_seuphorica_geometry(which);
|
||||||
seuphgeoms[which].launcher();
|
|
||||||
launch();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
void invoke() {
|
||||||
|
set_seuphorica_geometry(0);
|
||||||
|
pushScreen([] { quitmainloop = true; });
|
||||||
|
pushScreen(seuphorica_newgame);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user