MCPcopy Create free account
hub / github.com/DFHack/dfhack / can_invoke

Function can_invoke

plugins/hotkeys.cpp:37–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35static vector<string> sorted_keys;
36
37static bool can_invoke(const string &cmdline, df::viewscreen *screen) {
38 vector<string> cmd_parts;
39 split_string(&cmd_parts, cmdline, " ");
40
41 return Core::getInstance().getPluginManager()->CanInvokeHotkey(cmd_parts[0], screen);
42}
43
44static int cleanupHotkeys(lua_State *) {
45 DEBUG(log).print("cleaning up old stub keybindings for: {}\n", join_strings(", ", Gui::getCurFocus(true)));

Callers 1

add_binding_if_validFunction · 0.85

Calls 2

split_stringFunction · 0.85
CanInvokeHotkeyMethod · 0.80

Tested by

no test coverage detected