From 2ae6c59d3ff4ed3efa0d6d1a123b80c8f07392bd Mon Sep 17 00:00:00 2001 From: AyeZeeBB Date: Fri, 23 Oct 2026 14:35:41 -0500 Subject: [PATCH] Console: the menu command is back, so a key or combo bound to the ReSkate menu opens it again "bind reskatemenu" runs the menu command, which went with the drone's commands when the drone became a plugin, so every press said "Unknown command" and a player without an Insert key had no way into the menu. At startup the log now warns about a bind whose command is not registered. --- Extension/Console/commands.cpp | 17 +++++++++++++++++ Extension/Skater/console_commands.cpp | 8 ++++++++ 2 files changed, 25 insertions(+) diff --git a/Extension/Console/commands.cpp b/Extension/Console/commands.cpp index 53fa0532..9cfe5fe1 100644 --- a/Extension/Console/commands.cpp +++ b/Extension/Console/commands.cpp @@ -1,6 +1,8 @@ #include "commands.h" #include "Engine/Core/Log/logging.h" #include "Engine/Core/Platform/path_text.h" +#include "Engine/Game/Input/controller_bindings.h" +#include #include namespace dingosdk::console { @@ -231,6 +233,21 @@ const Commands &game_commands() { register_trainer_commands(*result); register_replay_keyframes_commands(*result); register_plugin_commands(*result); + // Each switch a player binds runs a command (controller_bindings.h action_binds): one whose + // command is gone reads "Unknown command" at every press, as "menu" once did. + for (const auto &bind : action_binds) { + bool found{}; + std::string name; + for (std::size_t at = 0; !found && at <= bind.command.size();) { + const auto end = std::min(bind.command.find(' ', at), bind.command.size()); + name = std::string(bind.command.substr(0, end)); + found = result->find(name) != nullptr; + at = end + 1; + } + if (!found) + logging::log(logging::Level::warning, logging::Channel::command, "The {} bind runs \"{}\", which is not a command.", + bind.name, bind.command); + } return result; }(); return *registry; diff --git a/Extension/Skater/console_commands.cpp b/Extension/Skater/console_commands.cpp index b3d21dd9..f7a724ad 100644 --- a/Extension/Skater/console_commands.cpp +++ b/Extension/Skater/console_commands.cpp @@ -295,6 +295,14 @@ void register_movement_commands(Commands ®istry) { }; registry.add(std::move(entry)); } + // What "bind reskatemenu" runs, for a player who cannot press the menu's key (no Insert key). + auto open_menu = action("menu", "Open the ReSkate menu (bind it to a controller combo or key: bind reskatemenu)", Group::console); + open_menu.inspect = [](const Model &) { return State{true, {}, {}, {}, false}; }; + open_menu.run = [](const Model &, const Values &, const Output &out) { + overlay::menu_open_flag().store(true); + out("Opening the ReSkate menu."); + }; + registry.add(std::move(open_menu)); } void register_ai_commands(Commands ®istry) { const auto ready = [](const Model &m) {