From da98a5054db98465fde4c6e60ef071d8403f9545 Mon Sep 17 00:00:00 2001 From: lethosor Date: Sun, 4 Jun 2017 19:24:26 -0400 Subject: [PATCH] Make sc-script help more helpful --- library/Core.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/library/Core.cpp b/library/Core.cpp index a6b91f588..83b77f7d0 100644 --- a/library/Core.cpp +++ b/library/Core.cpp @@ -1126,13 +1126,9 @@ command_result Core::runCommand(color_ostream &con, const std::string &first_, v } else if (builtin == "sc-script") { - if (parts.size() < 1) + if (parts.empty() || parts[0] == "help" || parts[0] == "?") { con << "Usage: sc-script add|remove|list|help SC_EVENT [path-to-script] [...]" << endl; - return CR_WRONG_USAGE; - } - if (parts[0] == "help" || parts[0] == "?") - { con << "Valid event names (SC_ prefix is optional):" << endl; for (int i = SC_WORLD_LOADED; i <= SC_UNPAUSED; i++) {