From af28dd98da6623dd026de54dbb4f2501db939cd2 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Wed, 31 Mar 2021 02:51:41 +0200 Subject: [PATCH] rogueviz::crystal-sokoban:: add arg::add2 --- rogueviz/crystal-sokoban.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/rogueviz/crystal-sokoban.cpp b/rogueviz/crystal-sokoban.cpp index a78e26ed..1fa0bd4c 100644 --- a/rogueviz/crystal-sokoban.cpp +++ b/rogueviz/crystal-sokoban.cpp @@ -40,6 +40,7 @@ undo_state current_state() { void sb_hooks(); void run_sb() { + showstartmenu = false; crystal::compass_probability = 0; stop_game(); crystal::set_crystal(6); @@ -172,18 +173,7 @@ void sb_hooks() { rv_hook(hooks_handleKey, 50, soko_key); } -auto sbhook = addHook(hooks_args, 100, [] { - using namespace arg; - - if(0) ; - else if(argis("-crystal-sokoban")) { - PHASEFROM(2); - run_sb(); - showstartmenu = false; - } - else return 1; - return 0; - }); +auto sbhook = arg::add2("-crystal-sokoban", run_sb); }