mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-03-29 06:47:03 +00:00
regenerate notknot on parameter changes
This commit is contained in:
parent
038d209941
commit
07fef1c70c
@ -541,13 +541,21 @@ void create_notknot() {
|
|||||||
gi.shortname = "notknot";
|
gi.shortname = "notknot";
|
||||||
gi.menu_displayed_name = "notknot";
|
gi.menu_displayed_name = "notknot";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void regenerate() {
|
||||||
|
if(geometry == gNotKnot && game_active) {
|
||||||
|
stop_game();
|
||||||
|
start_game();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
auto shot_hooks = addHook(hooks_initialize, 100, create_notknot)
|
auto shot_hooks = addHook(hooks_initialize, 100, create_notknot)
|
||||||
+ addHook(hooks_configfile, 100, [] {
|
+ addHook(hooks_configfile, 100, [] {
|
||||||
param_i(loop, "nk_loop");
|
param_i(loop, "nk_loop")->set_reaction(regenerate);
|
||||||
param_i(margin, "nk_margin");
|
param_i(margin, "nk_margin")->set_reaction(regenerate);
|
||||||
param_i(knotsize, "nk_knotsize");
|
param_i(knotsize, "nk_knotsize")->set_reaction(regenerate);
|
||||||
param_i(terminate_at, "nk_terminate");
|
param_i(terminate_at, "nk_terminate")->set_reaction(regenerate);
|
||||||
|
param_b(self_hiding, "selfhide")->set_reaction(regenerate);
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user